xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, patches@linaro.org,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v3 3/6] xen/arm: gic: Use the correct CPU ID
Date: Fri, 20 Sep 2013 16:58:15 +0100	[thread overview]
Message-ID: <523C7097.7000509@linaro.org> (raw)
In-Reply-To: <1379691897.8994.25.camel@hastur.hellion.org.uk>

On 09/20/2013 04:44 PM, Ian Campbell wrote:
> On Fri, 2013-09-20 at 16:03 +0100, Julien Grall wrote:
> 
>> +static unsigned int gic_cpu_mask(const cpumask_t *cpumask)
>> +{
>> +    unsigned int cpu;
>> +    unsigned int mask = 0;
>> +    cpumask_t possible_mask;
>> +
>> +    cpumask_and(&possible_mask, cpumask, &cpu_possible_map);
> 
> Based on the other subconversation doesn't this need to be online_mask?
> Or is the cpu area setup for cpus which are possible but not online?

cpu area is initialized a little bit before the cpu is bring up:
  * initialize per cpu data (via the notifier_call_chain CPU_UP_PREPARE)
  * signal the cpu to boot (__cpu_up)
  ...
  * call start_secondary
      * initialize the gic cpu interface (gic_cpu_init)
      * route ppis (which used gic_cpu_mask)
      * set the cpu online

If we use the cpu online mask, Xen won't be able to route the different
ppis to the processor.

> Should the check (whichever it is) be an assertion?

If we stay with the cpu_possible_map, I think we are fine without an
assertion.

>> +    for_each_cpu(cpu, &possible_mask)
>> +    {
>> +        ASSERT(cpu < NR_GIC_CPU_IF);
>> +        ASSERT(__per_cpu_offset[cpu] != -(long)__per_cpu_start);
>> +        mask |= per_cpu(gic_cpu_id, cpu);
>> +    }
>> +
>> +    return mask;
>> +}
> 
> 


-- 
Julien Grall

  reply	other threads:[~2013-09-20 15:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 13:15 [PATCH v3 0/6] Dissociate logical and gic/hardware CPU ID Julien Grall
2013-09-18 13:15 ` [PATCH v3 1/6] xen/arm: use cpumask_t to describe cpu mask in gic_route_dt_irq Julien Grall
2013-09-25 15:36   ` Ian Campbell
2013-09-18 13:15 ` [PATCH v3 2/6] xen/arm: Initialize correctly IRQ routing Julien Grall
2013-09-25 15:37   ` Ian Campbell
2013-09-18 13:15 ` [PATCH v3 3/6] xen/arm: gic: Use the correct CPU ID Julien Grall
2013-09-20 12:44   ` Julien Grall
2013-09-20 13:36     ` Ian Campbell
2013-09-20 13:49       ` Julien Grall
2013-09-20 15:03   ` Julien Grall
2013-09-20 15:44     ` Ian Campbell
2013-09-20 15:58       ` Julien Grall [this message]
2013-09-20 16:06         ` Ian Campbell
2013-09-20 18:48           ` Julien Grall
2013-09-25 15:35     ` Ian Campbell
2013-09-25 15:42       ` Julien Grall
2013-09-25 15:48         ` Ian Campbell
2013-09-25 15:53           ` Ian Campbell
2013-09-25 16:34             ` Tim Deegan
2013-09-18 13:15 ` [PATCH v3 4/6] xen/arm: Fix assert in send_SGI_one Julien Grall
2013-09-25 15:37   ` Ian Campbell
2013-09-18 13:15 ` [PATCH v3 5/6] xen/arm: Dissociate logical and hardware CPU ID Julien Grall
2013-09-25 15:38   ` Ian Campbell
2013-09-18 13:15 ` [PATCH v3 6/6] xen/arm: Use the hardware ID to boot correctly secondary cpus Julien Grall
2013-09-25 15:41   ` Ian Campbell
2013-09-26 10:18     ` Julien Grall

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=523C7097.7000509@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=patches@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --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).