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

Stephen Rothwell sfr at canb.auug.org.au
Wed Sep 12 21:07:04 EST 2012


Hi Michael,

On Wed, 12 Sep 2012 17:52:40 +1000 Michael Ellerman <michael at ellerman.id.au> 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) globals and
shouldn't you use offsetof(struct paca_struct, name) (from
linux/stddef.h)?

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20120912/d39be638/attachment.sig>


More information about the Linuxppc-dev mailing list