[PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-14 Thread Michael Ellerman
This was originally motivated by a desire to see the mapping between logical and hardware cpu numbers. But it seemed that it made more sense to just add a command to dump (most of) the paca. With no arguments "dp" will dump the paca for the current cpu. It also takes an argument, eg. "dp 3" whic

Re: [PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-14 Thread Michael Ellerman
On Fri, 2012-09-14 at 16:03 +1000, Michael Ellerman wrote: > This was originally motivated by a desire to see the mapping between > logical and hardware cpu numbers. Thanks to everyone who reminded me that the paca is 64-bit only :) New patch on the way. cheers _

[PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-13 Thread Michael Ellerman
This was originally motivated by a desire to see the mapping between logical and hardware cpu numbers. But it seemed that it made more sense to just add a command to dump (most of) the paca. With no arguments "dp" will dump the paca for the current cpu. It also takes an argument, eg. "dp 3" whic

Re: [PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-13 Thread Benjamin Herrenschmidt
On Fri, 2012-09-14 at 14:44 +1000, Michael Ellerman wrote: > On Wed, 2012-09-12 at 18:45 +1000, Benjamin Herrenschmidt wrote: > > On Wed, 2012-09-12 at 17:52 +1000, Michael Ellerman wrote: > > > This was originally motivated by a desire to see the mapping between > > > logical and hardware cpu numb

Re: [PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-13 Thread Michael Ellerman
On Wed, 2012-09-12 at 21:07 +1000, Stephen Rothwell wrote: > Hi Michael, > > On Wed, 12 Sep 2012 17:52:40 +1000 Michael Ellerman > wrote: > > > > +#define DUMP(name, format) \ > > + printf(" %-*s = %#-*"format"\t(0x%lx)\n", 16, #name, 18, p->name, \ > > + (u64)((void *)&(p->name) - (

Re: [PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-13 Thread Michael Ellerman
On Wed, 2012-09-12 at 18:45 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-09-12 at 17:52 +1000, Michael Ellerman wrote: > > This was originally motivated by a desire to see the mapping between > > logical and hardware cpu numbers. > > > > But it seemed that it made more sense to just add a c

Re: [PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-12 Thread Stephen Rothwell
Hi Michael, On Wed, 12 Sep 2012 17:52:40 +1000 Michael Ellerman wrote: > > +#define DUMP(name, format) \ > + printf(" %-*s = %#-*"format"\t(0x%lx)\n", 16, #name, 18, p->name, \ > + (u64)((void *)&(p->name) - (void *)p)); I must say that I hate macros that reference (assumed) glo

Re: [PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-12 Thread Benjamin Herrenschmidt
On Wed, 2012-09-12 at 17:52 +1000, Michael Ellerman wrote: > This was originally motivated by a desire to see the mapping between > logical and hardware cpu numbers. > > But it seemed that it made more sense to just add a command to dump > (most of) the paca. > > With no arguments "dp" will dump

[PATCH] powerpc: Add an xmon command to dump one or all pacas

2012-09-12 Thread Michael Ellerman
This was originally motivated by a desire to see the mapping between logical and hardware cpu numbers. But it seemed that it made more sense to just add a command to dump (most of) the paca. With no arguments "dp" will dump the paca for all possible cpus. If there are no possible cpus, like early