From: Ian Campbell <Ian.Campbell@citrix.com>
To: Tim Deegan <tim@xen.org>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH] arm: Use HTPIDR to point to per-CPU state
Date: Fri, 30 Mar 2012 20:35:05 +0100 [thread overview]
Message-ID: <1333136105.12209.3.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <20120330163730.GC90203@ocelot.phlegethon.org>
On Fri, 2012-03-30 at 17:37 +0100, Tim Deegan wrote:
> At 17:13 +0100 on 30 Mar (1333127612), Ian Campbell wrote:
> > > +DECLARE_PER_CPU(unsigned int, cpu_id);
> > > +#define get_processor_id() (this_cpu(cpu_id))
> > > +#define set_processor_id(id) do { \
> > > + WRITE_CP32(__per_cpu_offset[cpuid], HTPIDR); \
> > > + this_cpu(cpu_id) = (id); \
> >
> > This macro uses id, cpu_id and cpuid all at the same time...
> >
> > The one I'm not really sure about is cpuid, where did he come from?
> > Looks like it might be a local variable in the two places which call
> > set_processor_id, and also happens to be the id argument in one of those
> > cases (the other using literal 0).
>
> Yes, that's a silly mistake that just happens to be OK in all callers.
> Yet another reason to use static inlines rather than macros. :)
> Should I resubmit with s/cpuid/id/ or can you fix up as you apply?
If it's a simple as that I'll fix it as I apply.
Ian.
next prev parent reply other threads:[~2012-03-30 19:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 14:20 [PATCH] arm: Use HTPIDR to point to per-CPU state Tim Deegan
2012-03-30 16:13 ` Ian Campbell
2012-03-30 16:37 ` Tim Deegan
2012-03-30 19:35 ` Ian Campbell [this message]
2012-04-02 9:55 ` Ian Campbell
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=1333136105.12209.3.camel@dagon.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/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).