From nobody Tue Feb 10 13:17:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) client-ip=209.85.128.45; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f45.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1619972287; cv=none; d=zohomail.com; s=zohoarc; b=nSlvJiRVyekrb8ri6Jnq7RlVJS3C5IC+qY68XAJI5llqV3dqDH4nlOfmgbJR5gHKHNVXDciqeu8e4zqo+Wi8qFAOgTfCsFsKaFz32xwWjS2pgleqg3gZzBE+ww+Zb7rl5cMGpwvBdMHvwf053W/gHkMTif2DPybKNhxYCWgcx5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619972287; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8Q+raHQIs2wulUOjH/a7oHvrT+XycjGTmZz6SqSk5mc=; b=FZG8dTEu/2VT16S5uDxNTqV310xmoAWkZpc9QRYjxxSOkosTA7G/PAQsb8bLfcfN2Mw0XiFNwTLcf9w8NBBPbI47izRKL0rI+s4S3czqpYls4VH9S8ft9LQxOzUeq3Wm9OLD7Os/dLWRuvvQqgVdrPSMEy5GbtKkv292Y8FNX7w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.zohomail.com with SMTPS id 1619972287496207.2954762956847; Sun, 2 May 2021 09:18:07 -0700 (PDT) Received: by mail-wm1-f45.google.com with SMTP id s82so1921977wmf.3 for ; Sun, 02 May 2021 09:18:06 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id v15sm12080084wmj.39.2021.05.02.09.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 09:18:05 -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=8Q+raHQIs2wulUOjH/a7oHvrT+XycjGTmZz6SqSk5mc=; b=E2DF2nkUs6uteuMxtb98eFPf8P9erq8hWAQmMX2Tft7uDoPxF3TgbcIpnz3IoZnaPr NXDVHO98Nz5RGah9UGL4guTomUYTAi1F3Te5iX7xLbQFCtIeSTm++NIAobH6SnH813P6 xv88bAd2jKP7SBtYhZB/Tum9pLefmI/xKt/wMFfqPwGttyRcsOUpiP/2QkLxWppXhIm+ SFnYm9qt6Gn8rQoUU7Ju++qr9uMcasn+aLMdFL4HTPxoShQ7QVfLIJoUl53eo35jRZuB 0jiBmgi/JbdAu+pgJVcPNpzpcs95Q6RNt6L8X66YEAaqZdqaYJYbmz0GZC3jiwjCiSc7 CW+w== 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=8Q+raHQIs2wulUOjH/a7oHvrT+XycjGTmZz6SqSk5mc=; b=MPdwdLZ585MgML7LCA9OZso1CmV5oFNb4/ZvE0VMrGsEpTGRgw+3+2e4WuT44SKBmq Q0DNUt+AJupqy019G3JmR9XhXcid1FN6TAqxzY3o5a6w6efkC2e57J/XelWMquQNb9HH Fcnf305RBl10jncZdYfMSJOtnAhVlon0g5eG8uY2zjjawnWtU5mAJv+gVyyiyJzTGbPV wrL7wipLc2byI4r8C3mAPAjL+aOm6qEn1SAlLtkNDdJ234Z2geFp1pvI/rYbY5TDpxmR 9g6LgkKFEGyebD1zH+tuAlEL8O4DcLHN0HWskZKsMb+MSKQuum8w8JQh+1uYkOv3uKfa KUJw== X-Gm-Message-State: AOAM530xsJp2dNp+dE0RYS77FDizlCJqo6kBBOuysSmvgSVzDONSrThM aQkCpZymFmMceWVqwq9FNz0= X-Google-Smtp-Source: ABdhPJyllZyy74XvsUEauqP0ikYhe1w/hstBcKQW8Be4dITfAgbMLpBhqSdlHHeoePQkh5QN9qwWGw== X-Received: by 2002:a05:600c:4f44:: with SMTP id m4mr17257677wmq.50.1619972285754; Sun, 02 May 2021 09:18:05 -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 , Aurelien Jarno , Aleksandar Rikalo , Huacai Chen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 28/36] target/mips: Restrict CPUMIPSTLBContext::map_address() handlers scope Date: Sun, 2 May 2021 18:15:30 +0200 Message-Id: <20210502161538.534038-29-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210502161538.534038-1-f4bug@amsat.org> References: <20210502161538.534038-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 Message-Id: <20210428170410.479308-23-f4bug@amsat.org> --- 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 558cdca4e84..c1751700731 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