Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1711153 > unrolled thread

Re: [PATCH] ARM: bcm2836: Send event when onlining other cores

Started byFlorian Fainelli <f.fainelli@gmail.com>
First post2017-08-14 18:30 +0200
Last post2017-08-15 20:10 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] ARM: bcm2836: Send event when onlining other cores Florian Fainelli <f.fainelli@gmail.com> - 2017-08-14 18:30 +0200
    Re: [PATCH] ARM: bcm2836: Send event when onlining other cores Stefan Wahren <stefan.wahren@i2se.com> - 2017-08-14 19:20 +0200
      Re: [PATCH] ARM: bcm2836: Send event when onlining other cores Stefan Wahren <stefan.wahren@i2se.com> - 2017-08-14 20:50 +0200
        Re: [PATCH] ARM: bcm2836: Send event when onlining other cores Eric Anholt <eric@anholt.net> - 2017-08-15 20:10 +0200

#1711153 — Re: [PATCH] ARM: bcm2836: Send event when onlining other cores

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-08-14 18:30 +0200
SubjectRe: [PATCH] ARM: bcm2836: Send event when onlining other cores
Message-ID<ueqpA-6qC-17@gated-at.bofh.it>

On 08/08/2017 04:04 AM, Phil Elwell wrote:
> Secondary cores should enter a low-power idle state when waiting to
> be started. The "wfe" instruction causes a core to wait until an event
> or interrupt arrives before continuing to the next instruction, and
> the "sev" instruction sends a wakeup event to the other cores.
> 
> Add an "sev" (and a memory barrier) to bcm2836_boot_secondary, the
> function that wakes the waiting cores during booting. This is required
> if the secondary cores are sitting in "wfe", and harmless if not.

Eric, should I just pick this up for the upcoming ARM SoC pull requests
that I am preparing, or do you have more changes aside from the two tags
I already merged?

Thanks!

> 
> Signed-off-by: Phil Elwell <phil@raspberrypi.org>
> ---
>  arch/arm/mach-bcm/platsmp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c
> index 3fa1a99..7811160 100644
> --- a/arch/arm/mach-bcm/platsmp.c
> +++ b/arch/arm/mach-bcm/platsmp.c
> @@ -312,6 +312,9 @@ static int bcm2836_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	writel(virt_to_phys(secondary_startup),
>  	       intc_base + LOCAL_MAILBOX3_SET0 + 16 * cpu);
>  
> +	dsb(sy);
> +	sev();
> +
>  	iounmap(intc_base);
>  
>  	return 0;
> 

-- 
Florian

[toc] | [next] | [standalone]


#1711267

FromStefan Wahren <stefan.wahren@i2se.com>
Date2017-08-14 19:20 +0200
Message-ID<uerbZ-6WD-25@gated-at.bofh.it>
In reply to#1711153
Hi Florian,

> Florian Fainelli <f.fainelli@gmail.com> hat am 14. August 2017 um 18:25 geschrieben:
> 
> 
> 
> 
> On 08/08/2017 04:04 AM, Phil Elwell wrote:
> > Secondary cores should enter a low-power idle state when waiting to
> > be started. The "wfe" instruction causes a core to wait until an event
> > or interrupt arrives before continuing to the next instruction, and
> > the "sev" instruction sends a wakeup event to the other cores.
> > 
> > Add an "sev" (and a memory barrier) to bcm2836_boot_secondary, the
> > function that wakes the waiting cores during booting. This is required
> > if the secondary cores are sitting in "wfe", and harmless if not.
> 
> Eric, should I just pick this up for the upcoming ARM SoC pull requests
> that I am preparing, or do you have more changes aside from the two tags
> I already merged?

this patch depends on series "ARM: bcm2836: Move SMP startup code to arch/arm".

I didn't had the time to test Phil's patch in all relevant cases. But i could at least prepare a branch with my changes with the acks.

Stefan

> 
> Thanks!
> 
> > 
> > Signed-off-by: Phil Elwell <phil@raspberrypi.org>
> > ---
> >  arch/arm/mach-bcm/platsmp.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c
> > index 3fa1a99..7811160 100644
> > --- a/arch/arm/mach-bcm/platsmp.c
> > +++ b/arch/arm/mach-bcm/platsmp.c
> > @@ -312,6 +312,9 @@ static int bcm2836_boot_secondary(unsigned int cpu, struct task_struct *idle)
> >  	writel(virt_to_phys(secondary_startup),
> >  	       intc_base + LOCAL_MAILBOX3_SET0 + 16 * cpu);
> >  
> > +	dsb(sy);
> > +	sev();
> > +
> >  	iounmap(intc_base);
> >  
> >  	return 0;
> > 
> 
> -- 
> Florian

[toc] | [prev] | [next] | [standalone]


#1711342

FromStefan Wahren <stefan.wahren@i2se.com>
Date2017-08-14 20:50 +0200
Message-ID<uesB4-7Hs-11@gated-at.bofh.it>
In reply to#1711267
Hi Eric,

> Stefan Wahren <stefan.wahren@i2se.com> hat am 14. August 2017 um 19:11 geschrieben:
> 
> 
> Hi Florian,
> 
> > Florian Fainelli <f.fainelli@gmail.com> hat am 14. August 2017 um 18:25 geschrieben:
> > 
> > 
> > 
> > 
> > On 08/08/2017 04:04 AM, Phil Elwell wrote:
> > > Secondary cores should enter a low-power idle state when waiting to
> > > be started. The "wfe" instruction causes a core to wait until an event
> > > or interrupt arrives before continuing to the next instruction, and
> > > the "sev" instruction sends a wakeup event to the other cores.
> > > 
> > > Add an "sev" (and a memory barrier) to bcm2836_boot_secondary, the
> > > function that wakes the waiting cores during booting. This is required
> > > if the secondary cores are sitting in "wfe", and harmless if not.
> > 
> > Eric, should I just pick this up for the upcoming ARM SoC pull requests
> > that I am preparing, or do you have more changes aside from the two tags
> > I already merged?
> 
> this patch depends on series "ARM: bcm2836: Move SMP startup code to arch/arm".
> 
> I didn't had the time to test Phil's patch in all relevant cases. But i could at least prepare a branch with my changes with the acks.

i prepared the branches bcm2835-dt-next-v2 and bcm2835-soc-next.

Stefan

[toc] | [prev] | [next] | [standalone]


#1712403

FromEric Anholt <eric@anholt.net>
Date2017-08-15 20:10 +0200
Message-ID<ueOrU-4Hl-11@gated-at.bofh.it>
In reply to#1711342

[Multipart message — attachments visible in raw view] — view raw

Stefan Wahren <stefan.wahren@i2se.com> writes:

> Hi Eric,
>
>> Stefan Wahren <stefan.wahren@i2se.com> hat am 14. August 2017 um 19:11 geschrieben:
>> 
>> 
>> Hi Florian,
>> 
>> > Florian Fainelli <f.fainelli@gmail.com> hat am 14. August 2017 um 18:25 geschrieben:
>> > 
>> > 
>> > 
>> > 
>> > On 08/08/2017 04:04 AM, Phil Elwell wrote:
>> > > Secondary cores should enter a low-power idle state when waiting to
>> > > be started. The "wfe" instruction causes a core to wait until an event
>> > > or interrupt arrives before continuing to the next instruction, and
>> > > the "sev" instruction sends a wakeup event to the other cores.
>> > > 
>> > > Add an "sev" (and a memory barrier) to bcm2836_boot_secondary, the
>> > > function that wakes the waiting cores during booting. This is required
>> > > if the secondary cores are sitting in "wfe", and harmless if not.
>> > 
>> > Eric, should I just pick this up for the upcoming ARM SoC pull requests
>> > that I am preparing, or do you have more changes aside from the two tags
>> > I already merged?
>> 
>> this patch depends on series "ARM: bcm2836: Move SMP startup code to arch/arm".
>> 
>> I didn't had the time to test Phil's patch in all relevant cases. But i could at least prepare a branch with my changes with the acks.
>
> i prepared the branches bcm2835-dt-next-v2 and bcm2835-soc-next.

bcm2835-soc-next on its own breaks boot for me on the Pi2, so I had to
merge in the DT branch first.  I've rebased to do that, pulled in this
patch (and the clk one), and sent PRs for -dt and -soc.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web