From nobody Tue Nov 18 04:26:59 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) client-ip=209.85.128.48; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f48.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 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=1607890910; cv=none; d=zohomail.com; s=zohoarc; b=eWhd4xh+3znNv3qMfzJM4U32ihwQt0SNKApsQ2F7q+wYduUlDsIOahIprx3d3g9gmLszLpn8LDAi3h7GPvtZEnX19FzuRBxCiWxRhbPAyTihdBx6auTN3I3M1T2BSghjDkRkPDsbvkAj1Mcxa0akJ8tIWGQN08f7GvR+yPz7Rxs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607890910; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LJkeleUBcGHGZISXoGddym+wEofBms0JlYm/28m4/UY=; b=NVGtt7Y2qfh+gAUzk+hHJCpeA2FZoLS92d4axyDJB8/CJlc4u9o+8Yh+Xa6AxTJ6Ot9LhIbisYZwxSlMUHNcAk6GzH8vJHOMNN5oOTJ6AFlE5gGMEjViR+9HS7kace8b7SezQxBu/RtIr4RkedR//v68mxJ4MT7ZbC73Zx9I8QE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.zohomail.com with SMTPS id 1607890910454278.36598727099397; Sun, 13 Dec 2020 12:21:50 -0800 (PST) Received: by mail-wm1-f48.google.com with SMTP id d3so11953183wmb.4 for ; Sun, 13 Dec 2020 12:21:49 -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 e16sm31304940wra.94.2020.12.13.12.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Dec 2020 12:21:48 -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=LJkeleUBcGHGZISXoGddym+wEofBms0JlYm/28m4/UY=; b=reyXPlTsnGycXX/TRzVcaYnbIZrraBL/+1KXKqsJN518qKtofjV3OtHNLtKCd+Wqo2 Hy6a4QWpLfWJpOdeaPucv4VDG+ZmA50p+k1bIYMXwunOMS5ZFWEMNjjQJo2hBDPNmJQn qBSUzBgNtwDk8Y3LilDtvW4faxdvEb+ePpYpJNlxO+HqPNAXcCPTvWJ9yuV8NCEjpvzj Yny9byxkkJcZMhMxoHX2lWxrHq0veg6FzSj+5XFNqN1g/xsiVUt2OD9tx+agwiNVqwfs qJ6Fxu0vDt+IHbYZkniWL2ODYcrE9P/QLEnKosFIHTbMnA7esKmJeKQHVLNUNKfuY8w5 w08g== 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=LJkeleUBcGHGZISXoGddym+wEofBms0JlYm/28m4/UY=; b=dau0rnv1oqnSrfZJaZUTont6sYZxd2xz+ir+Z9+XSHegzCRBWNoQKgZr1AlNJl6Xff 1iW5f961zTAB6y9mZ/yp8Wxk+xr99oQxX0bv4uaQTCPjHZa1BQumuRqCMy7gSYg5yPxu MgvqZ+iNXWfdITCJg4Y3tUuGBqPRstEHiumHmcNrJwO0tzeuf+qRAN0ATktQMB6y4CGN eUnBRn+qh41fssQvl9PrbEj4k5ASVL9rREKB571b2U19mJBc9ZS2oYQ9I1FaXg0gcvRK D0ghPxofDbwwMbHaM9WYOIk+Q/tmbebtCxaUhNC5IROIdCHI/X/HQex/Bv9HSR32m1Pp ovlg== X-Gm-Message-State: AOAM531aos4XbM23wRf1OYTIGE/mojRPYtgTHiI0BYqxW1i5Lw86TdXJ frQME+DODmv7/TDqALeY1MA= X-Google-Smtp-Source: ABdhPJzMp3L7Q56kV+1c+M42iFI4YcY1kR8SEFv4g7CMPo7HH5NN8auAyFYmAwgHAOZbOuQSJxuF6w== X-Received: by 2002:a1c:4d05:: with SMTP id o5mr25058616wmh.85.1607890908729; Sun, 13 Dec 2020 12:21:48 -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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Aurelien Jarno , Aleksandar Rikalo , kvm@vger.kernel.org, Jiaxun Yang , Huacai Chen , Paul Burton , Richard Henderson Subject: [PULL 24/26] target/mips: Inline cpu_mips_realize_env() in mips_cpu_realizefn() Date: Sun, 13 Dec 2020 21:19:44 +0100 Message-Id: <20201213201946.236123-25-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201213201946.236123-1-f4bug@amsat.org> References: <20201213201946.236123-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 Message-Id: <20201206233949.3783184-17-f4bug@amsat.org> --- 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 f2c4de7d070..aadc6f8e74d 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); -} - /* 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); =20 cpu_reset(cs); qemu_init_vcpu(cs); --=20 2.26.2