From nobody Tue Feb 10 11:56:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) client-ip=209.85.128.46; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f46.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 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=1618786352; cv=none; d=zohomail.com; s=zohoarc; b=m2TQP/uDifLKt2A7tSkfrkyjfFsH1fW99+Zllxm47XvvLZIOUS+ZU02kxvaSGYe+CFLpOleZYIqfOF2gVc9XrgzdonSN9ixlU3RpDh7GIdI9LuX+OCqtVT2nC/+A4ADxqfsKzad56D+AFCFGqgkvvdMOW1olvbGL7wnDLLLTG9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618786352; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0RTWbP4MmlnppIWfa0PRIL4VrYTBFtlHQvR22xPFBSg=; b=QzhtYvJT0Odmnd8WQwKrAza1571+04tuIBxhtwOiviBbv67xTJpjCs+sAbqNlrRyB908/+rpnm2z9K+szmb2XxY+gP6f6BpidcdfCMj1WaW2Sb1sCJ8o8v8cBurryTImbtFFBJjEEHwsKBXByeZW+R0yPyP5A/Tr6mGJ7996jEQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.zohomail.com with SMTPS id 1618786352756364.1896319456847; Sun, 18 Apr 2021 15:52:32 -0700 (PDT) Received: by mail-wm1-f46.google.com with SMTP id w186so12622720wmg.3 for ; Sun, 18 Apr 2021 15:52:32 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id l25sm12908901wmi.17.2021.04.18.15.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 15:52:30 -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=0RTWbP4MmlnppIWfa0PRIL4VrYTBFtlHQvR22xPFBSg=; b=ghKd8DfPOOGJNDSa6uPiKOKKbh1tiINtd7eUpl23wEoKPhu2mNV/kUbepxJPtZ5rmt Y7BDc11t2Vsu2nU9B7/9yErqsWRLE6oR/PG3PBHQcELa6Yy3RHSRp9DGPaU91REJe8Za q6IYgTm1Z5cA3HHBPh8cE5uaYfqJX27Udpyd39gbiypCpz/824DHp1CLBMPN4WheLRuF B/pHN6c0mX0tgXXNVUZ55Z+VGOzweh6MyFlDIUm8wyUZtHEai29nCVBSG4LArsw5u7c5 BqGMa2aWY10uOEeF53lZ1BZtEuNr93GlT/0iyuhY4YPTUvaz4r69PWXw8wm49OMtrwOX PlIQ== 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=0RTWbP4MmlnppIWfa0PRIL4VrYTBFtlHQvR22xPFBSg=; b=GKwDV6CRkwKS/LuiX0ipBOMa8DRfCSrRwlN8iD/sebZB3CbtJDkA+HppntCSSJo7AV NHpPanqZ4PHmIzYCwi3CEp+FrgL37H3Xpt/SEwdSpBhvzH9Eo0ohWYfpvrHwAFIt421U RsX7FqIuk2lQ1qwEwt2qIqmXswwn0EavV+JwBeVgD15k9W9B7hHb+lNYXGrNojDlty+v 1HdLhTpsOPzr64KbR0cmzpBsBuMUAR66s4i0Q5fkdMetQqCi62zqyFjFQtytSdm1SeFt +n4LTfc2J1jn8pIZS2DD+KhloBtVwHQ9Vtm5z/5PQTw9S81ZFKDa3BxrchzC+G03nkif uWEg== X-Gm-Message-State: AOAM5302F8997cAAFJLgfB6ANxxU0TMQcOd0q4GHjN1njyUfSqIJfil6 xvN+33TC+H/BzPHTWC8G78s= X-Google-Smtp-Source: ABdhPJykJCH7zuiWqXWwE5JjOOWpN/WSfI4RoaZ62b6Q228eS3xsw9DCJf1aRh2Sn6VZENtv3ZARog== X-Received: by 2002:a1c:7f4a:: with SMTP id a71mr18680917wmd.1.1618786351062; Sun, 18 Apr 2021 15:52:31 -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: Aurelien Jarno , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Huacai Chen , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH v2 19/29] target/mips: Restrict mmu_init() to TCG Date: Mon, 19 Apr 2021 00:50:48 +0200 Message-Id: <20210418225058.1257014-20-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210418225058.1257014-1-f4bug@amsat.org> References: <20210418225058.1257014-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 d7980ba9a94..548fd73c7cc 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