All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>,
	ian.campbell@citrix.com, tim@xen.org,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org
Subject: Re: [PATCH v5 1/6] xen: Add convenient macro boot_cpu
Date: Tue, 06 May 2014 16:58:57 +0100	[thread overview]
Message-ID: <536906C1.6050109@linaro.org> (raw)
In-Reply-To: <536760F7020000780000EDD1@mail.emea.novell.com>

On 05/05/2014 08:59 AM, Jan Beulich wrote:
>>>> On 02.05.14 at 17:52, <julien.grall@linaro.org> wrote:
>> --- a/xen/include/xen/percpu.h
>> +++ b/xen/include/xen/percpu.h
>> @@ -16,6 +16,9 @@
>>  /* Preferred on Xen. Also see arch-defined per_cpu(). */
>>  #define this_cpu(var)    __get_cpu_var(var)
>>  
>> +/* Access variable on boot CPU */
>> +#define boot_cpu(var)   per_cpu(var, 0)
>> +
>>  /* Linux compatibility. */
>>  #define get_cpu_var(var) this_cpu(var)
>>  #define put_cpu_var(var)
> 
> I can only second Andrew's comment - without it becoming clear when
> and why this would be used, this isn't going to be acceptable (and if
> it really was correct and worthwhile, this small a change wouldn't need
> separating out from the code that's intended to actually make use of it).

It's used in the next patch (ie #2). I thought it was better to move out
this small change rather than introducing it in the patch.

This macro is here for a shortcut of per_cpu(myvar, 0). We have few
usage on ARM, most of them are during boot.

There is another when a secondary CPUs is booting. We need to retrieve
the PPIs type (level/edge...) from the boot CPU.

As said in the answer to Andrew, I can either move this macro in an ARM
specific header or open code per_cpu(...,0).

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-05-06 15:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 15:52 [PATCH v5 0/6] xen/arm: Interrupt management reworking Julien Grall
2014-05-02 15:52 ` [PATCH v5 1/6] xen: Add convenient macro boot_cpu Julien Grall
2014-05-02 15:57   ` Andrew Cooper
2014-05-06 15:54     ` Julien Grall
2014-05-08  9:57       ` Ian Campbell
2014-05-12 12:36         ` Julien Grall
2014-05-08  9:55     ` Ian Campbell
2014-05-08 10:00       ` Jan Beulich
2014-05-08 10:19         ` Ian Campbell
2014-05-05  7:59   ` Jan Beulich
2014-05-06 15:58     ` Julien Grall [this message]
2014-05-06 16:04       ` Jan Beulich
2014-05-06 16:09         ` Andrew Cooper
2014-05-02 15:52 ` [PATCH v5 2/6] xen/arm: IRQ: Store IRQ type in arch_irq_desc Julien Grall
2014-05-08 10:03   ` Ian Campbell
2014-05-12 12:34     ` Julien Grall
2014-05-02 15:52 ` [PATCH v5 3/6] xen/arm: IRQ: Replace {request, setup}_dt_irq by {request, setup}_irq Julien Grall
2014-05-02 15:52 ` [PATCH v5 4/6] xen: IRQ: Add dev_id parameter to release_irq Julien Grall
2014-05-02 15:52 ` [PATCH v5 5/6] xen/arm: IRQ: extend {request, setup}_irq to take an irqflags in parameter Julien Grall
2014-05-02 15:52 ` [PATCH v5 6/6] xen/arm: IRQ: Handle multiple action per IRQ Julien Grall
2014-05-08 10:04   ` 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=536906C1.6050109@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.