From nobody Tue Feb 10 05:41:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) client-ip=209.85.128.52; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f52.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1607298076; cv=none; d=zohomail.com; s=zohoarc; b=mUmnvdhQdRfmmHMCRimMzuHFjsB70arki10hH2jPjf0zXohGTw/T8yQ/CoLwRO/ReaOLTQWppKqdrtNqMOCtvW6FWd+cTveaqGBW5CWsbbt1PYKCLxT8IxD3EmMjZjcEKrHD3IotP7+COJngElWn0jCVilyYy3OvxE0iH8yY1vg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607298076; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rwJkcz0lXzb5vYIm5eeEUAMRTcJm9OyTFdsDcyLncdA=; b=PPbSip7FttMaAugl/80vTaj0AJfqKBW1/SfYgHtgewhr6+S5nKChRj80T0of50TN0ci7+JZkqprM5eAGkhOUuW5mTSiGMu9AdcBxyNjYLu0YnL/eBI3GRm6w9NHiUE1oth8ClO2h8m69ZFSAZGB/GPayivBw5V6uqKE9MlyNzd8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.zohomail.com with SMTPS id 1607298076039214.2556509274956; Sun, 6 Dec 2020 15:41:16 -0800 (PST) Received: by mail-wm1-f52.google.com with SMTP id w206so8473776wma.0 for ; Sun, 06 Dec 2020 15:41:15 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id y2sm12424711wrn.31.2020.12.06.15.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 15:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rwJkcz0lXzb5vYIm5eeEUAMRTcJm9OyTFdsDcyLncdA=; b=laKKK4RHTXy8RCtw8YQNsRI6lS8XnVTBs+k0U5wnfrp96iRrU7cYGLqtfaO7/imgqa AiUBjkAOSesZfYzma0jBgAy5zgRZot01FKcYILx6sFBv6NPtQvBZ7Ux5vPyjxsmhQn+A qhJp82N5XKYSBvrAfAKZr+zZ23+v+JWzlnCJtUc8WJdYbmDS9F97ztnSDflsxjTx0YMK 7k3UADxCZn2OBBt9rVwM2IxFykAXJ4PkMYrBG6h1odWUSVeFZP70NWDZ8N21EanXXPnr aZWc2fsPyknluRq+qH+x/dhJGo2c6/LHoUq6ejkxmO5vGu1kVZpzk8vEl3yz2rZnJkfc sf8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rwJkcz0lXzb5vYIm5eeEUAMRTcJm9OyTFdsDcyLncdA=; b=sIAkGx2iE9Wu+IcV6obhJa8VjadW4m3W4OClIJdgLTkHg0weUhOhUsa2J3n6V9dKix hJe8VZyJHRJxaBbn9wjrVhQy4L9KrA7EHPD37tOzL4ukQ2GV5SXhrOkKRzsTgarbaabZ YXS6w8zM6zc78QyDP1C+Y0v0bc5LHnBawdZnGPwL4lxBw/ti28Vr5yTH2TiuXqBC6avt WbKjz6XOawYZLcwAyk/bIhBdLu9KWIYZyIXlglfpkCw+HeIARYCPtCZ76dASA67fVD6P LDh9E6R1mz+xUWQfAiJQjVGjj8twylXZV35ho1OpKE9xpOKGgPBo5snJoRfC+VZIwtvC vYbQ== X-Gm-Message-State: AOAM532IvlRvOAVLIA2O2HYj7+LEuX4PxyGce/ifs+LwpNTmsXhHpbzo sK3RYBDEc1FGab7WriygW3I= X-Google-Smtp-Source: ABdhPJzhZk3PMkFWuwgqgm+vSByS3t56zMO6H60iDu1eNSR/tUHRY2Ir5MnTTAjNiAl+UrHL28WeTA== X-Received: by 2002:a1c:3c09:: with SMTP id j9mr15542997wma.180.1607298074148; Sun, 06 Dec 2020 15:41:14 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Jiaxun Yang , Paul Burton , kvm@vger.kernel.org, Huacai Chen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Aleksandar Rikalo , Paolo Bonzini Subject: [PATCH 16/19] target/mips: Inline cpu_mips_realize_env() in mips_cpu_realizefn() Date: Mon, 7 Dec 2020 00:39:46 +0100 Message-Id: <20201206233949.3783184-17-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201206233949.3783184-1-f4bug@amsat.org> References: <20201206233949.3783184-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/cpu.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 1073db7f257..899a746c3e5 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -104,17 +104,6 @@ static bool mips_cpu_has_work(CPUState *cs) =20 #include "translate_init.c.inc" =20 -static void cpu_mips_realize_env(CPUMIPSState *env) -{ - env->exception_base =3D (int32_t)0xBFC00000; - -#ifndef CONFIG_USER_ONLY - mmu_init(env, env->cpu_model); -#endif - fpu_init(env, env->cpu_model); - mvp_init(env, env->cpu_model); -} - /* TODO QOM'ify CPU reset and remove */ static void cpu_state_reset(CPUMIPSState *env) { @@ -400,6 +389,7 @@ static void mips_cpu_realizefn(DeviceState *dev, Error = **errp) { CPUState *cs =3D CPU(dev); MIPSCPU *cpu =3D MIPS_CPU(dev); + CPUMIPSState *env =3D &cpu->env; MIPSCPUClass *mcc =3D MIPS_CPU_GET_CLASS(dev); Error *local_err =3D NULL; =20 @@ -423,7 +413,13 @@ static void mips_cpu_realizefn(DeviceState *dev, Error= **errp) return; } =20 - cpu_mips_realize_env(&cpu->env); + env->exception_base =3D (int32_t)0xBFC00000; + +#ifndef CONFIG_USER_ONLY + mmu_init(env, env->cpu_model); +#endif + fpu_init(env, env->cpu_model); + mvp_init(env, env->cpu_model); =20 cpu_reset(cs); qemu_init_vcpu(cs); --=20 2.26.2