From: Michael Ellerman <michael@ellerman.id.au>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Add an xmon command to dump one or all pacas
Date: Fri, 14 Sep 2012 14:45:12 +1000 [thread overview]
Message-ID: <1347597912.6883.1.camel@concordia> (raw)
In-Reply-To: <20120912210704.54cc517b6f39c8e2f73523af@canb.auug.org.au>
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 <michael@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
Well sure, but it's xmon :)
I can change it to take p as a parameter.
> shouldn't you use offsetof(struct paca_struct, name) (from
> linux/stddef.h)?
Yes!
cheers
next prev parent reply other threads:[~2012-09-14 4:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 7:52 [PATCH] powerpc: Add an xmon command to dump one or all pacas Michael Ellerman
2012-09-12 8:45 ` Benjamin Herrenschmidt
2012-09-14 4:44 ` Michael Ellerman
2012-09-14 5:45 ` Benjamin Herrenschmidt
2012-09-12 11:07 ` Stephen Rothwell
2012-09-14 4:45 ` Michael Ellerman [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-14 6:03 Michael Ellerman
2012-09-14 8:59 ` Michael Ellerman
2012-09-14 9:01 Michael Ellerman
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=1347597912.6883.1.camel@concordia \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=sfr@canb.auug.org.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).