From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: amir.gonnen@neuroblade.ai
Subject: [PATCH 1/7] target/nios2: Remove mmu_read_debug
Date: Sun, 27 Feb 2022 08:21:19 -1000 [thread overview]
Message-ID: <20220227182125.21809-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20220227182125.21809-1-richard.henderson@linaro.org>
This functionality can be had via plugins, if desired.
In the meantime, it is unused code.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/nios2/helper.h | 1 -
target/nios2/mmu.h | 1 -
target/nios2/mmu.c | 20 --------------------
target/nios2/op_helper.c | 5 -----
target/nios2/translate.c | 17 -----------------
5 files changed, 44 deletions(-)
diff --git a/target/nios2/helper.h b/target/nios2/helper.h
index 6c8f0b5b35..6d8eec1814 100644
--- a/target/nios2/helper.h
+++ b/target/nios2/helper.h
@@ -21,7 +21,6 @@
DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_WG, noreturn, env, i32)
#if !defined(CONFIG_USER_ONLY)
-DEF_HELPER_2(mmu_read_debug, void, env, i32)
DEF_HELPER_3(mmu_write, void, env, i32, i32)
DEF_HELPER_1(check_interrupts, void, env)
#endif
diff --git a/target/nios2/mmu.h b/target/nios2/mmu.h
index 4f46fbb82e..b7785b46c0 100644
--- a/target/nios2/mmu.h
+++ b/target/nios2/mmu.h
@@ -44,7 +44,6 @@ void mmu_flip_um(CPUNios2State *env, unsigned int um);
unsigned int mmu_translate(CPUNios2State *env,
Nios2MMULookup *lu,
target_ulong vaddr, int rw, int mmu_idx);
-void mmu_read_debug(CPUNios2State *env, uint32_t rn);
void mmu_write(CPUNios2State *env, uint32_t rn, uint32_t v);
void mmu_init(CPUNios2State *env);
diff --git a/target/nios2/mmu.c b/target/nios2/mmu.c
index 2545c06761..5616c39d54 100644
--- a/target/nios2/mmu.c
+++ b/target/nios2/mmu.c
@@ -35,26 +35,6 @@
#define MMU_LOG(x)
#endif
-void mmu_read_debug(CPUNios2State *env, uint32_t rn)
-{
- switch (rn) {
- case CR_TLBACC:
- MMU_LOG(qemu_log("TLBACC READ %08X\n", env->regs[rn]));
- break;
-
- case CR_TLBMISC:
- MMU_LOG(qemu_log("TLBMISC READ %08X\n", env->regs[rn]));
- break;
-
- case CR_PTEADDR:
- MMU_LOG(qemu_log("PTEADDR READ %08X\n", env->regs[rn]));
- break;
-
- default:
- break;
- }
-}
-
/* rw - 0 = read, 1 = write, 2 = fetch. */
unsigned int mmu_translate(CPUNios2State *env,
Nios2MMULookup *lu,
diff --git a/target/nios2/op_helper.c b/target/nios2/op_helper.c
index a59003855a..61fc4dc903 100644
--- a/target/nios2/op_helper.c
+++ b/target/nios2/op_helper.c
@@ -26,11 +26,6 @@
#include "qemu/main-loop.h"
#if !defined(CONFIG_USER_ONLY)
-void helper_mmu_read_debug(CPUNios2State *env, uint32_t rn)
-{
- mmu_read_debug(env, rn);
-}
-
void helper_mmu_write(CPUNios2State *env, uint32_t rn, uint32_t v)
{
mmu_write(env, rn, v);
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index f9abc2fdd2..194c8ebafd 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -448,23 +448,6 @@ static void rdctl(DisasContext *dc, uint32_t code, uint32_t flags)
gen_check_supervisor(dc);
switch (instr.imm5 + CR_BASE) {
- case CR_PTEADDR:
- case CR_TLBACC:
- case CR_TLBMISC:
- {
-#if !defined(CONFIG_USER_ONLY)
- if (likely(instr.c != R_ZERO)) {
- tcg_gen_mov_tl(cpu_R[instr.c], cpu_R[instr.imm5 + CR_BASE]);
-#ifdef DEBUG_MMU
- TCGv_i32 tmp = tcg_const_i32(instr.imm5 + CR_BASE);
- gen_helper_mmu_read_debug(cpu_R[instr.c], cpu_env, tmp);
- tcg_temp_free_i32(tmp);
-#endif
- }
-#endif
- break;
- }
-
default:
if (likely(instr.c != R_ZERO)) {
tcg_gen_mov_tl(cpu_R[instr.c], cpu_R[instr.imm5 + CR_BASE]);
--
2.25.1
next prev parent reply other threads:[~2022-02-27 18:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-27 18:21 [PATCH 0/7] target/nios2: Rewrite interrupt handling Richard Henderson
2022-02-27 18:21 ` Richard Henderson [this message]
2022-03-02 12:44 ` [PATCH 1/7] target/nios2: Remove mmu_read_debug Peter Maydell
2022-02-27 18:21 ` [PATCH 2/7] target/nios2: Replace MMU_LOG with tracepoints Richard Henderson
2022-02-27 22:01 ` Philippe Mathieu-Daudé
2022-03-02 12:48 ` Peter Maydell
2022-02-27 18:21 ` [PATCH 3/7] target/nios2: Only build mmu.c for system mode Richard Henderson
2022-02-27 22:01 ` Philippe Mathieu-Daudé
2022-03-02 12:49 ` Peter Maydell
2022-02-27 18:21 ` [PATCH 4/7] target/nios2: Hoist R_ZERO check in rdctl Richard Henderson
2022-02-27 22:02 ` Philippe Mathieu-Daudé
2022-03-02 12:50 ` Peter Maydell
2022-02-27 18:21 ` [PATCH 5/7] target/nios2: Split mmu_write Richard Henderson
2022-03-02 12:57 ` Peter Maydell
2022-02-27 18:21 ` [PATCH 6/7] target/nios2: Special case ipending in rdctl and wrctl Richard Henderson
2022-02-27 22:06 ` Philippe Mathieu-Daudé
2022-03-02 13:00 ` Peter Maydell
2022-02-27 18:21 ` [PATCH 7/7] target/nios2: Rewrite interrupt handling Richard Henderson
2022-02-27 22:05 ` Philippe Mathieu-Daudé
2022-03-02 13:06 ` Peter Maydell
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=20220227182125.21809-2-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=amir.gonnen@neuroblade.ai \
--cc=qemu-devel@nongnu.org \
/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).