From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Joe Komlodi" <komlodi@xilinx.com>,
"Yoshinori Sato" <ysato@users.sourceforge.jp>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH 3/5] target/sh4: Pass mmu_idx to get_physical_address()
Date: Thu, 28 Jan 2021 00:21:49 +0100 [thread overview]
Message-ID: <20210127232151.3523581-4-f4bug@amsat.org> (raw)
In-Reply-To: <20210127232151.3523581-1-f4bug@amsat.org>
get_mmu_address() and get_physical_address() don't use their
'int access_type' argument: remove it along with ACCESS_INT
in superh_cpu_tlb_fill().
Pass the MMU index along, as other targets do.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/sh4/helper.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/target/sh4/helper.c b/target/sh4/helper.c
index 4303ebf018b..737938d2fd1 100644
--- a/target/sh4/helper.c
+++ b/target/sh4/helper.c
@@ -331,7 +331,7 @@ static int find_utlb_entry(CPUSH4State * env, target_ulong address, int use_asid
*/
static int get_mmu_address(CPUSH4State * env, target_ulong * physical,
int *prot, target_ulong address,
- int rw, int access_type)
+ int rw, int mmu_idx)
{
int use_asid, n;
tlb_t *matching = NULL;
@@ -398,7 +398,7 @@ static int get_mmu_address(CPUSH4State * env, target_ulong * physical,
static int get_physical_address(CPUSH4State * env, target_ulong * physical,
int *prot, target_ulong address,
- int rw, int access_type)
+ int rw, int mmu_idx)
{
/* P1, P2 and P4 areas do not use translation */
if ((address >= 0x80000000 && address < 0xc0000000) || address >= 0xe0000000) {
@@ -432,7 +432,7 @@ static int get_physical_address(CPUSH4State * env, target_ulong * physical,
}
/* We need to resort to the MMU */
- return get_mmu_address(env, physical, prot, address, rw, access_type);
+ return get_mmu_address(env, physical, prot, address, rw, mmu_idx);
}
hwaddr superh_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
@@ -813,11 +813,10 @@ bool superh_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
MMU_DTLB_VIOLATION_READ);
#else
target_ulong physical;
- int prot, sh_access_type;
+ int prot;
- sh_access_type = ACCESS_INT;
ret = get_physical_address(env, &physical, &prot, address,
- access_type, sh_access_type);
+ access_type, mmu_idx);
if (ret == MMU_OK) {
address &= TARGET_PAGE_MASK;
--
2.26.2
next prev parent reply other threads:[~2021-01-27 23:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 23:21 [PATCH 0/5] target/sh4: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
2021-01-27 23:21 ` [PATCH 1/5] target/sh4: Fix code style for checkpatch.pl Philippe Mathieu-Daudé
2021-02-04 2:41 ` Richard Henderson
2021-01-27 23:21 ` [PATCH 2/5] target/sh4: Replace magic value by MMUAccessType definitions Philippe Mathieu-Daudé
2021-02-04 2:41 ` Richard Henderson
2021-01-27 23:21 ` Philippe Mathieu-Daudé [this message]
2021-02-04 2:42 ` [PATCH 3/5] target/sh4: Pass mmu_idx to get_physical_address() Richard Henderson
2021-01-27 23:21 ` [PATCH 4/5] target/sh4: Let get_physical_address() use MMUAccessType access_type Philippe Mathieu-Daudé
2021-02-04 2:42 ` Richard Henderson
2021-01-27 23:21 ` [PATCH 5/5] target/sh4: Remove unused definitions Philippe Mathieu-Daudé
2021-02-04 2:42 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210127232151.3523581-4-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=komlodi@xilinx.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).