public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Nicholas Piggin" <npiggin@gmail.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Anton Johansson" <anjo@rev.ng>,
	"Glenn Miles" <milesg@linux.ibm.com>,
	"Dr . David Alan Gilbert" <dave@treblig.org>,
	qemu-ppc@nongnu.org, "Max Filippov" <jcmvbkbc@gmail.com>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Chinmay Rath" <rathc@linux.ibm.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH-for-11.1 v2 4/7] target/xtensa: Display [ID]TLB header within dump_tlb()
Date: Fri, 20 Mar 2026 17:50:17 +0100	[thread overview]
Message-ID: <20260320165021.39521-5-philmd@linaro.org> (raw)
In-Reply-To: <20260320165021.39521-1-philmd@linaro.org>

Move common code from caller to callee.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/xtensa/mmu_helper.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c
index 9dbf671228b..48e1d64a3d7 100644
--- a/target/xtensa/mmu_helper.c
+++ b/target/xtensa/mmu_helper.c
@@ -1091,6 +1091,7 @@ static void dump_tlb(Monitor *mon, CPUXtensaState *env, bool dtlb)
         xtensa_option_enabled(env->config, XTENSA_OPTION_MMU) ?
         mmu_attr_to_access : region_attr_to_access;
 
+    monitor_printf(mon, "\n%cTLB:\n", dtlb ? 'D' : 'I');
     for (wi = 0; wi < conf->nways; ++wi) {
         uint32_t sz = ~xtensa_tlb_get_addr_mask(env, dtlb, wi) + 1;
         const char *sz_text;
@@ -1203,10 +1204,7 @@ void dump_mmu(Monitor *mon, CPUXtensaState *env)
                 XTENSA_OPTION_BIT(XTENSA_OPTION_REGION_PROTECTION) |
                 XTENSA_OPTION_BIT(XTENSA_OPTION_REGION_TRANSLATION) |
                 XTENSA_OPTION_BIT(XTENSA_OPTION_MMU))) {
-
-        monitor_puts(mon, "ITLB:\n");
         dump_tlb(mon, env, false);
-        monitor_puts(mon, "\nDTLB:\n");
         dump_tlb(mon, env, true);
     } else if (xtensa_option_enabled(env->config, XTENSA_OPTION_MPU)) {
         monitor_puts(mon, "Foreground map:\n");
-- 
2.53.0



  parent reply	other threads:[~2026-03-20 16:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 16:50 [PATCH-for-11.1 v2 0/7] monitor: Have 'info tlb' dump MMU information on monitor Philippe Mathieu-Daudé
2026-03-20 16:50 ` [PATCH-for-11.1 v2 1/7] target/m68k: " Philippe Mathieu-Daudé
2026-03-20 16:50 ` [PATCH-for-11.1 v2 2/7] target/ppc: " Philippe Mathieu-Daudé
2026-03-20 16:50 ` [PATCH-for-11.1 v2 3/7] target/xtensa: " Philippe Mathieu-Daudé
2026-03-20 18:07   ` Max Filippov
2026-03-20 16:50 ` Philippe Mathieu-Daudé [this message]
2026-03-20 18:09   ` [PATCH-for-11.1 v2 4/7] target/xtensa: Display [ID]TLB header within dump_tlb() Max Filippov
2026-03-20 16:50 ` [PATCH-for-11.1 v2 5/7] target/m68k: Rename dump_mmu() -> m68k_monitor_dump_mmu() Philippe Mathieu-Daudé
2026-03-20 16:50 ` [PATCH-for-11.1 v2 6/7] target/ppc: Rename dump_mmu() -> ppc_monitor_dump_mmu() Philippe Mathieu-Daudé
2026-03-20 16:50 ` [PATCH-for-11.1 v2 7/7] target/xtensa: Rename dump_mmu() -> xtensa_monitor_dump_mmu() Philippe Mathieu-Daudé
2026-03-20 18:10   ` Max Filippov
2026-03-21 14:01 ` [PATCH-for-11.1 v2 0/7] monitor: Have 'info tlb' dump MMU information on monitor Max Filippov

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=20260320165021.39521-5-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=anjo@rev.ng \
    --cc=dave@treblig.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=milesg@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rathc@linux.ibm.com \
    /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