From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: mikey@neuling.org, mpe@ellerman.id.au
Subject: [RFC 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list
Date: Tue, 21 Jul 2015 12:28:46 +0530 [thread overview]
Message-ID: <1437461926-8908-8-git-send-email-khandual@linux.vnet.ibm.com> (raw)
In-Reply-To: <1437461926-8908-1-git-send-email-khandual@linux.vnet.ibm.com>
From: "khandual@linux.vnet.ibm.com" <khandual@linux.vnet.ibm.com>
This patch adds some more elements to the existing PACA dump list
inside a xmon session which can be listed here.
- hmi_event_available
- dscr_default
- vmalloc_sllp
- slb_cache_ptr
- sprg_vdso
- tm_scratch
- core_idle_state_ptr
- thread_idle_state
- thread_mask
With this patch, a typical xmon PACA dump looks something like this.
possible = yes
present = yes
online = yes
lock_token = 0x8000 (0x8)
paca_index = 0x0 (0xa)
kernel_toc = 0xc000000000e79300 (0x10)
kernelbase = 0xc000000000000000 (0x18)
kernel_msr = 0xb000000000001032 (0x20)
emergency_sp = 0xc00000003fff0000 (0x28)
mc_emergency_sp = 0xc00000003ffec000 (0x2e0)
in_mce = 0x0 (0x2e8)
hmi_event_available = 0x0 (0x2ea)
data_offset = 0xfa9f0000 (0x30)
hw_cpu_id = 0x0 (0x38)
cpu_start = 0x1 (0x3a)
kexec_state = 0x0 (0x3b)
dscr_default = 0x0 (0x58)
vmalloc_sllp = 0x510 (0x1b8)
slb_cache_ptr = 0x3 (0x1ba)
slb_cache[0]: = 0x3f000
slb_cache[1]: = 0x1
slb_cache[2]: = 0x1000
__current = 0xc00000009ce96620 (0x290)
kstack = 0xc00000009cf2be30 (0x298)
stab_rr = 0x8 (0x2a0)
saved_r1 = 0xc00000009cf2b360 (0x2a8)
trap_save = 0x0 (0x2b8)
soft_enabled = 0x0 (0x2ba)
irq_happened = 0x1 (0x2bb)
io_sync = 0x0 (0x2bc)
irq_work_pending = 0x0 (0x2bd)
nap_state_lost = 0x0 (0x2be)
sprg_vdso = 0x0 (0x2c0)
tm_scratch = 0x800000010280f032 (0x2c8)
core_idle_state_ptr = (null) (0x2d0)
thread_idle_state = 0x0 (0x2d8)
thread_mask = 0x0 (0x2d9)
subcore_sibling_mask = 0x0 (0x2da)
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
arch/powerpc/xmon/xmon.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 1798e21..bc42f6e 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2073,6 +2073,7 @@ static void xmon_rawdump (unsigned long adrs, long ndump)
static void dump_one_paca(int cpu)
{
struct paca_struct *p;
+ int i;
if (setjmp(bus_error_jmp) != 0) {
printf("*** Error dumping paca for cpu 0x%x!\n", cpu);
@@ -2086,12 +2087,12 @@ static void dump_one_paca(int cpu)
printf("paca for cpu 0x%x @ %p:\n", cpu, p);
- printf(" %-*s = %s\n", 16, "possible", cpu_possible(cpu) ? "yes" : "no");
- printf(" %-*s = %s\n", 16, "present", cpu_present(cpu) ? "yes" : "no");
- printf(" %-*s = %s\n", 16, "online", cpu_online(cpu) ? "yes" : "no");
+ printf(" %-*s = %s\n", 20, "possible", cpu_possible(cpu) ? "yes" : "no");
+ printf(" %-*s = %s\n", 20, "present", cpu_present(cpu) ? "yes" : "no");
+ printf(" %-*s = %s\n", 20, "online", cpu_online(cpu) ? "yes" : "no");
#define DUMP(paca, name, format) \
- printf(" %-*s = %#-*"format"\t(0x%lx)\n", 16, #name, 18, paca->name, \
+ printf(" %-*s = %#-*"format"\t(0x%lx)\n", 20, #name, 18, paca->name, \
offsetof(struct paca_struct, name));
DUMP(p, lock_token, "x");
@@ -2103,11 +2104,17 @@ static void dump_one_paca(int cpu)
#ifdef CONFIG_PPC_BOOK3S_64
DUMP(p, mc_emergency_sp, "p");
DUMP(p, in_mce, "x");
+ DUMP(p, hmi_event_available, "x");
#endif
DUMP(p, data_offset, "lx");
DUMP(p, hw_cpu_id, "x");
DUMP(p, cpu_start, "x");
DUMP(p, kexec_state, "x");
+ DUMP(p, dscr_default, "llx");
+ DUMP(p, vmalloc_sllp, "x");
+ DUMP(p, slb_cache_ptr, "x");
+ for (i = 0; i < p->slb_cache_ptr; i++)
+ printf(" slb_cache[%d]: = 0x%lx\n", i, p->slb_cache[i]);
DUMP(p, __current, "p");
DUMP(p, kstack, "lx");
DUMP(p, stab_rr, "lx");
@@ -2118,6 +2125,18 @@ static void dump_one_paca(int cpu)
DUMP(p, io_sync, "x");
DUMP(p, irq_work_pending, "x");
DUMP(p, nap_state_lost, "x");
+ DUMP(p, sprg_vdso, "llx");
+
+#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
+ DUMP(p, tm_scratch, "llx");
+#endif
+
+#ifdef CONFIG_PPC_POWERNV
+ DUMP(p, core_idle_state_ptr, "p");
+ DUMP(p, thread_idle_state, "x");
+ DUMP(p, thread_mask, "x");
+ DUMP(p, subcore_sibling_mask, "x");
+#endif
#undef DUMP
--
2.1.0
next prev parent reply other threads:[~2015-07-21 6:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 6:58 [RFC 1/8] powerpc/slb: Remove a duplicate extern variable Anshuman Khandual
2015-07-21 6:58 ` [RFC 2/8] powerpc/slb: Rename all the 'entry' occurrences to 'slot' Anshuman Khandual
2015-07-21 9:46 ` [RFC, " Michael Ellerman
2015-07-21 11:23 ` [RFC,2/8] " Anshuman Khandual
2015-07-21 6:58 ` [RFC 3/8] powerpc/slb: Define macros for the bolted slots Anshuman Khandual
2015-07-22 9:32 ` Michael Ellerman
2015-07-21 6:58 ` [RFC 4/8] powerpc/slb: Add some helper functions to improve modularization Anshuman Khandual
2015-07-22 9:19 ` Michael Ellerman
2015-07-21 6:58 ` [RFC 5/8] powerpc/slb: Add documentation to runtime patching of SLB encoding Anshuman Khandual
2015-07-22 5:51 ` Michael Ellerman
2015-07-22 5:57 ` Gabriel Paubert
2015-07-22 9:01 ` Michael Ellerman
2015-07-22 12:17 ` Segher Boessenkool
2015-07-21 6:58 ` [RFC 6/8] powerpc/prom: Simplify the logic while fetching SLB size Anshuman Khandual
2015-07-21 10:21 ` [RFC, " Michael Ellerman
2015-07-21 11:24 ` Anshuman Khandual
2015-07-21 6:58 ` [RFC 7/8] powerpc/xmon: Drop 'valid' from the condition inside 'dump_segments' Anshuman Khandual
2015-07-21 10:00 ` [RFC, " Michael Ellerman
2015-07-21 11:45 ` Anshuman Khandual
2015-07-22 4:52 ` Michael Ellerman
2015-07-21 6:58 ` Anshuman Khandual [this message]
2015-07-21 10:08 ` [RFC, 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list Michael Ellerman
2015-07-21 11:48 ` Anshuman Khandual
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=1437461926-8908-8-git-send-email-khandual@linux.vnet.ibm.com \
--to=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
/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).