* [PATCH] powerpc/xmon: Add kstack base to paca dump
@ 2017-10-09 10:59 Michael Ellerman
2017-10-24 8:08 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2017-10-09 10:59 UTC (permalink / raw)
To: linuxppc-dev
When dumping the paca in xmon we currently show kstack. Although it's
not hard it's a bit fiddly to work out what the bounds of the kernel
stack should be based on the kstack value.
To make life easier and "kstack_base" which is the base (lowest
address) of the kernel stack, eg:
kstack = 0xc0000000f1a7be30 (0x258)
kstack_base = 0xc0000000f1a78000
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/xmon/xmon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 429339df0e8e..b45741c50253 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2388,6 +2388,7 @@ static void dump_one_paca(int cpu)
#endif
DUMP(p, __current, "p");
DUMP(p, kstack, "lx");
+ printf(" kstack_base = 0x%016lx\n", p->kstack & ~(THREAD_SIZE - 1));
DUMP(p, stab_rr, "lx");
DUMP(p, saved_r1, "lx");
DUMP(p, trap_save, "x");
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/xmon: Add kstack base to paca dump
2017-10-09 10:59 [PATCH] powerpc/xmon: Add kstack base to paca dump Michael Ellerman
@ 2017-10-24 8:08 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-10-24 8:08 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
On Mon, 2017-10-09 at 10:59:32 UTC, Michael Ellerman wrote:
> When dumping the paca in xmon we currently show kstack. Although it's
> not hard it's a bit fiddly to work out what the bounds of the kernel
> stack should be based on the kstack value.
>
> To make life easier and "kstack_base" which is the base (lowest
> address) of the kernel stack, eg:
>
> kstack = 0xc0000000f1a7be30 (0x258)
> kstack_base = 0xc0000000f1a78000
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/90d6473747b289739b435d5fa6ae8e
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-24 8:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 10:59 [PATCH] powerpc/xmon: Add kstack base to paca dump Michael Ellerman
2017-10-24 8:08 ` Michael Ellerman
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).