From nobody Tue Feb 10 20:07:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.47 as permitted sender) client-ip=209.85.128.47; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f47.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.47 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1618860014; cv=none; d=zohomail.com; s=zohoarc; b=M8Ea0KNmstiwqO0xWJn8i5q4IL5X+JU62wZMuCZitjONZf/4ovWiN0h2S3yvRF1LJgQXmU7OBkLK9hs+j2GfiUYO7XVkCRBfic9OEMhQmEzTThFtxql7/YYyzQFMKQhlyfqPkOrQXH4KZAotD1hPtfy2rXbYBKvcDMlm0lKmsKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618860014; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uiRGPC8hJpSSu/BlNtbaRgowW+aTxxcCgHW1Tb9Qg8I=; b=Sl93ajNKKKA75lF/1J81CAWN3HzLuQNZFNHollq28bU9SqJd3ANXmTmsgEA2O3MC4HwZ50/q4KU5N5qsNnrK3UGFO7i6AG+iPk9L0tqxtfjrQyT7nWI/zvYZPM/DBNkNGiTvTkTQfdIlc7x9AxJZJpR29ILucQx7a63TS86b6mE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.47 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.zohomail.com with SMTPS id 1618860014127767.5273866155819; Mon, 19 Apr 2021 12:20:14 -0700 (PDT) Received: by mail-wm1-f47.google.com with SMTP id n4-20020a05600c4f84b029013151278decso7454151wmq.4 for ; Mon, 19 Apr 2021 12:20:13 -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 f6sm23206333wrt.19.2021.04.19.12.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 12:20:12 -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=uiRGPC8hJpSSu/BlNtbaRgowW+aTxxcCgHW1Tb9Qg8I=; b=SyBNtQ/i3AvzeUSxBP45Qkv/h3PE+RqZ2uRSldvZwVSjBYx0Lu3mZMcoTIQ7S1xNCi Niz3LYpgAl9Csd9lgIO9kgsN8CwmooVMbVF7wDXN+lRzISGUfKfnDnlR8rzAIY2r7uWP qpdBYbr8fdqfufoa4uUdpx79WSl/3eVdEoooFK9q7ZEFvXSz2Dagbse8+Bzjb0sMwgFC iyvjAKxALEAQjGdDJTlk2+FEcKrktdUrO1hGxddA1Q8u3Q5KIdo4qClPocd1c0Dxumu+ wxOV1NkoTRYETFt3D6LTrvn0otEu/PEPwhU70/LRLzVTgHwfOt4pW+mh/fSXL38xxIXZ VH3Q== 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=uiRGPC8hJpSSu/BlNtbaRgowW+aTxxcCgHW1Tb9Qg8I=; b=FuPFhITZX2YnCnZMhdgWEb89aypc0QgSCJPHhXxCBHUQE8Oc84UCCfvMiD8mrCN9dU 3TPv7+QKC6nNDSRQREN/AJg9z25dcqXDROi8sqYjh6lPmS5coixwjxrMidd5h3aEmAFr Petox1GcJ3vaEw7TaT47Z1gowYP3E4MYFlGM7X8+a8cBn+2UVRMES43Idm8r/CNvQ7UZ sf5ZoHOpf0YKIGk1BHZDGWhg2GU10opDldk5PqUU62SsXzPzyProlUU43hGGgcnciJ+f gL6+4QF6JoiweOkM7BzdEEDG1hFHLiZhFfI4YERXZx4715QggHiLfxFnTsqytbkHjsar uh/A== X-Gm-Message-State: AOAM531oTgRymk2/ywVT75+Uc+cPsb1NR7vviCT3We+Kt3v0vW/yCO4E oTMiBKnSefz3HWKG58avSNk= X-Google-Smtp-Source: ABdhPJzgSog+d1Q/wnTHYZH6tLUQIXxps0d7V5Htbd1Jk2+qe9O+oTB0G74unMCg1mad2fvcr+m1+g== X-Received: by 2002:a1c:e20a:: with SMTP id z10mr570824wmg.158.1618860012408; Mon, 19 Apr 2021 12:20:12 -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 22/30] target/mips: Restrict CPUMIPSTLBContext::map_address() handlers scope Date: Mon, 19 Apr 2021 21:18:15 +0200 Message-Id: <20210419191823.1555482-23-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) The 3 map_address() handlers are local to tlb_helper.c, no need to have their prototype declared publically. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 df419760df0..a59e2f9007d 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 bf242f5e65a..a45146a2b21 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