From nobody Tue Feb 10 09:59:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) client-ip=209.85.128.53; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f53.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1618860004; cv=none; d=zohomail.com; s=zohoarc; b=IycWpbivl817kBqyUX82PxqmAwKdY7IZ/ux2kxg3XW5LtDGGKCYbRB2lId5mMwW4Wpgq0NFR7YjiB/UEFc249JqfGCx6fV/VaXJBPLfsW9vSEt0J4ReNmD2M1T+jHRxAmjA/1xcgiVCGX7jcDQ1S/FQXRUMhwC/COojt6SAd7xI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618860004; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UwCC1UpHM/jSWsuRMtR8URBWtsAsFHj4UD0F2s/h0Ok=; b=n0lKUIQvIADkGfBAcgyCTQvwr4Z6q0/1UCHCaeRCRlHIEWeVvXPbI3rhHfkFVTvSKk/CIXmcA+3iYIv6pASQvsIm7d+Yq4aH833qrjq2sGxz1roMCs2iR3m66fEJ+Ma1fyFRkA5/grl5sMEHgFkhQE9duQaO40Ped5pegZ/aTMg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.zohomail.com with SMTPS id 16188600045121020.8603947844499; Mon, 19 Apr 2021 12:20:04 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id y5-20020a05600c3645b0290132b13aaa3bso6922615wmq.1 for ; Mon, 19 Apr 2021 12:20:03 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id f6sm23205854wrt.19.2021.04.19.12.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 12:20:02 -0700 (PDT) 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=UwCC1UpHM/jSWsuRMtR8URBWtsAsFHj4UD0F2s/h0Ok=; b=fv7qWImZs3AEUxNs+qc7ml/ZdGa28Yg5n5a8Tqz571jzDXQ7DxpFaRy08zzgw2kB8D lOMxNaMJgexxrFIKaaydstcayMI2IAYE95oA8iPFQ3XvYKzZYp18nby/aHsus+cKnplQ 310kwe1RZt/L90z2Xw86z5Ga0+5dAPKHJ99nejM3sE4LztOEQ+QIPIetCP02133aBsNZ SJiREfb5aJyPfM9lCSIemXs9yNw8fQozIUtm5a+sCODgKYoj3qMlliUv8SGbE5jKlnjt h18RA1ZIKos1rZQBeArSAJo+Ab9LqAC+RjucZrwBQ5fb2ObbmFZpLoXAqvaH2tKsJX7s 7+7Q== 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=UwCC1UpHM/jSWsuRMtR8URBWtsAsFHj4UD0F2s/h0Ok=; b=gyNeoQZFPL6eRIzIVGriqmWUnz7TGJEwW9uW5frej2RRpmwWVytuwjtr5R8LvfN9ct MjkJIEuyygjTNDcDimDbm8OP311sCu/5fR0mk4Fm2Oh3ZZBrHwVC/3L73ZBhLhv3W7t7 K1xag5J2NqslVsrxbL+HLx+31Uo0Sgx/5MOxmL7R2Axlgvh3qGd+phJGqir93ARqWmQU 9hQd2FN7C4+Ag++5+PNj7i4S0nBgLvzNkhtzg/yoVdYITyLFIQlEjO1jJWcOkMkWJIZK us3FFqi67tls/exN6KDq2BzN7urmho31q0O2ZaGioNBqoucwU+69mMQhk3b2W3UlIaGO jFrA== X-Gm-Message-State: AOAM531KOHUVvXNxsaLmzWZgavk8vy/lTVZaIEqFfuyCqkrYq/wAF31h FMgL2Pq08SjXJd7pZLYWv9c= X-Google-Smtp-Source: ABdhPJzoBqsZuthHYTUeH6znYQsbEnJI4YV/zEq802EjjBvOvezqMHTzjVvIn7wpQG8ZpF71juUj5A== X-Received: by 2002:a05:600c:49a4:: with SMTP id h36mr593878wmp.102.1618860002718; Mon, 19 Apr 2021 12:20:02 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Aurelien Jarno , Huacai Chen Subject: [PATCH v3 20/30] target/mips: Restrict mmu_init() to TCG Date: Mon, 19 Apr 2021 21:18:13 +0200 Message-Id: <20210419191823.1555482-21-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210419191823.1555482-1-f4bug@amsat.org> References: <20210419191823.1555482-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) mmu_init() is only required by TCG accelerator. Restrict its declaration and call to TCG. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/internal.h | 3 --- target/mips/tcg/tcg-internal.h | 2 ++ target/mips/cpu.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 0bce0950b2c..54e6f08f560 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -233,9 +233,6 @@ void cpu_mips_store_compare(CPUMIPSState *env, uint32_t= value); void cpu_mips_start_count(CPUMIPSState *env); void cpu_mips_stop_count(CPUMIPSState *env); =20 -/* helper.c */ -void mmu_init(CPUMIPSState *env, const mips_def_t *def); - static inline void mips_cpu_set_error_pc(CPUMIPSState *env, target_ulong error_pc) { diff --git a/target/mips/tcg/tcg-internal.h b/target/mips/tcg/tcg-internal.h index b65580af211..70655bab45c 100644 --- a/target/mips/tcg/tcg-internal.h +++ b/target/mips/tcg/tcg-internal.h @@ -20,6 +20,8 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int s= ize, =20 #if !defined(CONFIG_USER_ONLY) =20 +void mmu_init(CPUMIPSState *env, const mips_def_t *def); + void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagema= sk); =20 uint32_t cpu_mips_get_random(CPUMIPSState *env); diff --git a/target/mips/cpu.c b/target/mips/cpu.c index fcbf95c85b9..acc149aa573 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -708,7 +708,7 @@ static void mips_cpu_realizefn(DeviceState *dev, Error = **errp) =20 env->exception_base =3D (int32_t)0xBFC00000; =20 -#ifndef CONFIG_USER_ONLY +#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) mmu_init(env, env->cpu_model); #endif fpu_init(env, env->cpu_model); --=20 2.26.3