From nobody Sat Apr 20 07:58:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) client-ip=209.85.221.42; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f42.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1618763579; cv=none; d=zohomail.com; s=zohoarc; b=ifsIOqk/sCQ6n2I9MYuGJtCjqjSYWkngiWAdP1YtTNKM9Pma58y1QXhsvo3E6Vg4Rb6JsVtfjY62SGx5L9Ut17AFNsVjpPwrBkysOtEVbpk8CF3ToNBma/+el+rtPmXcTpH3WexJKcV5sB2zp1X10NbkVfQWHtgtdXxoxn5Y0AY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618763579; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N5k78fRA0nra+VbPuCAyAs9Q3C25mTx/9Lz4UoRw3W4=; b=YSeMNjugFV6/qiZRnIJ/Uy7olJl+l/v73YfdjWEe/i56cE8WpTt2uaFBXUmLknhVBMnUgrqlhqczirZEBZEQwBScY5ItzS3KCKP9q82iXy++qQLAJMN99GZi0q2kMC20HSzvrRIkR6if+GmTo6z13Eq2Hje23RfMRQ2jT4VTQ6o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.zohomail.com with SMTPS id 1618763579348255.68428461508722; Sun, 18 Apr 2021 09:32:59 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id g9so15481833wrx.0 for ; Sun, 18 Apr 2021 09:32:58 -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 y11sm17072854wro.37.2021.04.18.09.32.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 09:32:57 -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=N5k78fRA0nra+VbPuCAyAs9Q3C25mTx/9Lz4UoRw3W4=; b=cId7VKM0tChz9lIx+AomFv7/jXrlvqRysbpdwVanfRUhDfrbXUUcfMakkbSspC4896 +bOT1ue4vaJqO8uIMr2c7Yelk0MkNjgWb+7vhetMo5r9strbo9G/Z6p5TKNukew3aC9G Mgqhr4VYTRLfJUH4wPb/BHqyXuvZNaCxmNg0V7utQHfkRNJurrCQduNCYbL+M757AClx Mq3EqXeSC8Sce9z8tfNZVUlnorOqSKsPZ/A8yXHdWZZLJT8qTLBvWFgk8bGJ4zzJEldv LSpufDyLVir/RVBB9X+YAWgk7nJSkf3KBzZe//7s/lS6pMDj/dhv6iksmMNNoOEG8/oX /KEg== 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=N5k78fRA0nra+VbPuCAyAs9Q3C25mTx/9Lz4UoRw3W4=; b=JhqQTMm542MX8AGmFz5UGr0ipWMkVMdFs/QPeUg5CBK4xpfgfZxkpBJ2c8vwxm9qef CaojtMl9sTM/a9m2EQXHwv1Bh0Y77+qz3caUj+WkE9EVE25H0SsFM6PGrED/1ZHNbba8 0c25U+ERsem/GdfSt/LKA9CHzpuB/3FvM26reMT2xAXUb76Lews9wv5NMGGg87EUVPvD vJgDzeWpfMCsn7GWkEoWL3Anz9MHQximXWNVle+bXsBKefsQPqNP6c/3DJrcrkg0rR6Q 1qAHJweOwK6l8flWgFmEfyoHnZpPZYt3sRW/XKu+ZE+IuIEj2Kk5IiORzykYlwBBpFRM KrQQ== X-Gm-Message-State: AOAM530VXSpmxdJ9OhAshmQnUlhvrUdCqrMsXP1vLoO5HtyMHGt/v8L3 JZ6QJbGPtLHY7VnAGleeMls= X-Google-Smtp-Source: ABdhPJzikpj83JjHxvi76vmx3BUn9NG0WIjpLGUJ7Rtw8rMjaivTWy3muvw/+AvJZDSURzuW0uvITA== X-Received: by 2002:adf:f0cc:: with SMTP id x12mr10068827wro.16.1618763577556; Sun, 18 Apr 2021 09:32:57 -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: Huacai Chen , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Richard Henderson , Aurelien Jarno Subject: [PATCH 17/26] target/mips: Restrict CPUMIPSTLBContext::map_address() handlers scope Date: Sun, 18 Apr 2021 18:31:25 +0200 Message-Id: <20210418163134.1133100-18-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210418163134.1133100-1-f4bug@amsat.org> References: <20210418163134.1133100-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) The 3 map_address() handlers are local to tlb_helper.c, no need to have their prototype declared publically. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/internal.h | 6 ------ target/mips/tcg/sysemu/tlb_helper.c | 13 +++++++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index b1b1681bf8d..2fdb7d9cd12 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -152,12 +152,6 @@ struct CPUMIPSTLBContext { } mmu; }; =20 -int no_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot, - target_ulong address, MMUAccessType access_type); -int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot, - target_ulong address, MMUAccessType access_type); -int r4k_map_address(CPUMIPSState *env, hwaddr *physical, int *prot, - target_ulong address, MMUAccessType access_type); void r4k_helper_tlbwi(CPUMIPSState *env); void r4k_helper_tlbwr(CPUMIPSState *env); void r4k_helper_tlbp(CPUMIPSState *env); diff --git a/target/mips/tcg/sysemu/tlb_helper.c b/target/mips/tcg/sysemu/t= lb_helper.c index 82cfb0a9135..cbb4ccf0dac 100644 --- a/target/mips/tcg/sysemu/tlb_helper.c +++ b/target/mips/tcg/sysemu/tlb_helper.c @@ -26,8 +26,8 @@ #include "hw/mips/cpudevs.h" =20 /* no MMU emulation */ -int no_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot, - target_ulong address, MMUAccessType access_type) +static int no_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *pr= ot, + target_ulong address, MMUAccessType access_t= ype) { *physical =3D address; *prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; @@ -35,8 +35,9 @@ int no_mmu_map_address(CPUMIPSState *env, hwaddr *physica= l, int *prot, } =20 /* fixed mapping MMU emulation */ -int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot, - target_ulong address, MMUAccessType access_type) +static int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *physical, + int *prot, target_ulong address, + MMUAccessType access_type) { if (address <=3D (int32_t)0x7FFFFFFFUL) { if (!(env->CP0_Status & (1 << CP0St_ERL))) { @@ -55,8 +56,8 @@ int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *phys= ical, int *prot, } =20 /* MIPS32/MIPS64 R4000-style MMU emulation */ -int r4k_map_address(CPUMIPSState *env, hwaddr *physical, int *prot, - target_ulong address, MMUAccessType access_type) +static int r4k_map_address(CPUMIPSState *env, hwaddr *physical, int *prot, + target_ulong address, MMUAccessType access_type) { uint16_t ASID =3D env->CP0_EntryHi & env->CP0_EntryHi_ASID_mask; uint32_t MMID =3D env->CP0_MemoryMapID; --=20 2.26.3