From: Andre Przywara <andre.przywara@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, julien.grall@linaro.org,
patches@linaro.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH v2 2/6] arm: move GIC SGI kicking into separate function
Date: Wed, 04 Dec 2013 13:33:45 +0100 [thread overview]
Message-ID: <529F2129.4090308@linaro.org> (raw)
In-Reply-To: <1386160111.17466.70.camel@kazak.uk.xensource.com>
On 12/04/2013 01:28 PM, Ian Campbell wrote:
> On Wed, 2013-12-04 at 13:15 +0100, Andre Przywara wrote:
>> On 12/02/2013 04:01 PM, Ian Campbell wrote:
>>> On Mon, 2013-12-02 at 12:08 +0100, Andre Przywara wrote:
>>>> Currently we unconditionally send SGIs to all cores on SMP bringup.
>>>> PSCI will not need this, so we move this into a function and call it
>>>> explicitly from the platforms that need it. This gets us get rid of
>>>> the empty cpu_up() platform functions in ARM32 and the comment in
>>>> there.
>>>
>>> I don't think this is quite true -- even on a PSCI system the kick is
>>> required to get past the gate in head.S.
>>
>> Right, but this is the responsibility of the PSCI handler in the
>> firmware, right?
>
> Note that I am talking about a gate which is implemented in Xen's
> head.S, not in the firmware. It is Xen's reponsibility to get the CPU
> past that point, which is somewhat independent from the firmware wakeup,
> except in reality it is intertwined because they use the same mechanism.
>
> However, I think I was mistaken. In the case of PSCI we are able to wake
> up specific targetted CPUs individually and we do so having already
> opened the gate in out head.S, so the CPU must necessarily fall through
> without waiting. I think this is worth mentioning in the commit log if
> you don't mind.
>
>> I was under the assumption that the semantics of cpu_on
>> is to start executing code at the given address, whatever this takes
>> internally.
>
> Right, the issue here is a gate which we have subsequent to that
> happening.
>
>> Calxeda firmware for instance does the SGI kick.
>>
>>>
>>> I wonder how this interacts with PSCI implementations which use an SGI
>>> themselves internally...
>>>
>>>> @@ -376,11 +386,6 @@ int __cpu_up(unsigned int cpu)
>>>> return rc;
>>>> }
>>>>
>>>> - /* We don't know the GIC ID of the CPU until it has woken up, so just signal
>>>> - * everyone and rely on our own smp_up_cpu gate to ensure only the one we
>>>> - * want gets through. */
>>>> - send_SGI_allbutself(GIC_SGI_EVENT_CHECK);
>>>> -
>>>
>>> So, I was saying in the 00 mail I'm not sure we can get rid of this
>>> altogether.
>>
>> Please note that we do not get rid of this, but just move it. ARM64
>> calls it in arm64/smpboot.c,
>
> How does this interact with the sev() In smp_spin_table_cpu_up I wonder.
Me, too ;-)
The original code does the sev() in arm/arm64/smpboot.c, then returns to
the caller in arm/smpboot.c, which does the GIC kick. I was already
wondering if that is correct, I guess you could answer this much better.
> I think the GIC send should be only for the non-PSCI case here too.
It is. The arm64 code has the GIC kick moved into the spin_table
function only. PSCI is a different beast, not using the GIC. Also arm32
does it only in platform specific functions, which don't get called when
PSCI is available.
Regards,
Andre.
>
>> ARM32 non-PSCI platforms call this now
>> explicitly by pointing to that function in their platforms/foo.c file.
>
> OK.
>
>>
>>>
>>> But I suppose it is the intention that the platform code always has both
>>> its own logic and this SGI kick (possibly coalesced) in such
>>> circumstances? Which is probably ok?
>>
>> That was my thinking, yes.
>>
>> Regards,
>> Andre.
>>
>>
>>>> while ( !cpu_online(cpu) )
>>>> {
>>>> cpu_relax();
>>>> diff --git a/xen/include/asm-arm/smp.h b/xen/include/asm-arm/smp.h
>>>> index 1485cc6..a1de03c 100644
>>>> --- a/xen/include/asm-arm/smp.h
>>>> +++ b/xen/include/asm-arm/smp.h
>>>> @@ -21,6 +21,8 @@ extern int arch_smp_init(void);
>>>> extern int arch_cpu_init(int cpu, struct dt_device_node *dn);
>>>> extern int arch_cpu_up(int cpu);
>>>>
>>>> +int cpu_up_send_sgi(int cpu);
>>>> +
>>>> /* Secondary CPU entry point */
>>>> extern void init_secondary(void);
>>>>
>>>
>>>
>>
>
>
next prev parent reply other threads:[~2013-12-04 12:34 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 11:08 [PATCH v2 0/6] Andre Przywara
2013-12-02 11:08 ` [PATCH v2 1/6] arm: rename xen/arch/arm/psci.c into vpsci.c Andre Przywara
2013-12-02 13:02 ` Julien Grall
2013-12-02 13:06 ` Ian Campbell
2013-12-02 13:08 ` Julien Grall
2013-12-02 14:53 ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 2/6] arm: move GIC SGI kicking into separate function Andre Przywara
2013-12-02 13:16 ` Julien Grall
2013-12-02 13:24 ` Andre Przywara
2013-12-02 13:57 ` Julien Grall
2013-12-02 15:01 ` Ian Campbell
2013-12-04 12:15 ` Andre Przywara
2013-12-04 12:28 ` Ian Campbell
2013-12-04 12:33 ` Andre Przywara [this message]
2013-12-04 12:35 ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 3/6] arm: parse PSCI node from the host device-tree Andre Przywara
2013-12-02 13:28 ` Julien Grall
2013-12-02 13:44 ` Andre Przywara
2013-12-02 15:00 ` Julien Grall
2013-12-02 15:14 ` Ian Campbell
2013-12-02 15:05 ` Ian Campbell
2013-12-04 12:37 ` Andre Przywara
2013-12-04 12:41 ` Ian Campbell
2013-12-04 12:44 ` Andre Przywara
2013-12-02 11:08 ` [PATCH v2 4/6] arm: add a function to invoke the PSCI handler Andre Przywara
2013-12-02 15:07 ` Ian Campbell
2013-12-04 12:25 ` Andre Przywara
2013-12-04 12:32 ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 5/6] arm32: enable PSCI secondary CPU bringup Andre Przywara
2013-12-02 15:09 ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 6/6] arm64: " Andre Przywara
2013-12-02 15:11 ` Ian Campbell
2013-12-02 14:52 ` [PATCH v2 0/6] Ian Campbell
2013-12-04 12:16 ` Andre Przywara
2013-12-04 12:29 ` 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=529F2129.4090308@linaro.org \
--to=andre.przywara@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=patches@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--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.