Message ID | 843914385.20451.1503420633158@email.1und1.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Aug 22, 2017 at 6:50 PM, Stefan Wahren <stefan.wahren@i2se.com> wrote: >> Florian Fainelli <f.fainelli@gmail.com> hat am 22. August 2017 um 00:16 geschrieben: >> On 08/17/2017 11:37 AM, Florian Fainelli wrote: >> >> 10:12 < arnd> that would also get rid of the branch dependency as an >> added bonus, but avoiding the boot breakage is more important of course > > i already had a discussion with Eric about the case the dts changes are missing and i wasn't able see a boot breakage ("only" a SMP breakage which is still a regression). Yes, that's what I meant. >> 10:13 < arnd> Stefan Wahren did the patch, but he's either not on this >> channel, or I don't know his nick >> >> 10:30 < arnd> on a related note, I see that the match table for the >> machine descriptor doesn't list bcm2837, and the bcm2837.dtsi file >> doesn't list itself as compatible with bcm2836, so that would have to be >> added too to make it actually work >> > > sorry i don't have much time today and i'm not sure how to implement the smp_init. > > Here is my draft (untested) which has a linker error (arch/arm/mach-bcm/board_bcm2835.o:(.arch.info.init+0x34): Undefined reference on `bcm2836_smp_ops). Does it goes in the right direction? Looks good to me. > DT_MACHINE_START(BCM2835, "BCM2835") > - .dt_compat = bcm2835_compat > + .dt_compat = bcm2835_compat, > + .smp = smp_ops(bcm2836_smp_ops), > + .smp_init = smp_init_ops(bcm2836_smp_init_ops), One of the two should actually be sufficient here. Setting the .smp pointer is shorter so if that works, we can leave out the init function completely. Arnd
diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c index 24af33f..4f90f1f 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -19,16 +19,21 @@ #include <asm/mach/arch.h> #include <asm/mach/map.h> +#include "platsmp.h" + static const char * const bcm2835_compat[] = { #ifdef CONFIG_ARCH_MULTI_V6 "brcm,bcm2835", #endif #ifdef CONFIG_ARCH_MULTI_V7 "brcm,bcm2836", + "brcm,bcm2837", #endif NULL }; DT_MACHINE_START(BCM2835, "BCM2835") - .dt_compat = bcm2835_compat + .dt_compat = bcm2835_compat, + .smp = smp_ops(bcm2836_smp_ops), + .smp_init = smp_init_ops(bcm2836_smp_init_ops), MACHINE_END diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c index 7811160..c47c79a 100644 --- a/arch/arm/mach-bcm/platsmp.c +++ b/arch/arm/mach-bcm/platsmp.c @@ -343,3 +343,8 @@ static const struct smp_operations bcm2836_smp_ops __initconst = { .smp_boot_secondary = bcm2836_boot_secondary, }; CPU_METHOD_OF_DECLARE(bcm_smp_bcm2836, "brcm,bcm2836-smp", &bcm2836_smp_ops); + +bool __init bcm2836_smp_init_ops(void) { + smp_set_ops(&bcm2836_smp_ops); + return true; +} diff --git a/arch/arm/mach-bcm/platsmp.h b/arch/arm/mach-bcm/platsmp.h new file mode 100644 index 0000000..50c0ad3 --- /dev/null +++ b/arch/arm/mach-bcm/platsmp.h @@ -0,0 +1,4 @@ + +bool bcm2836_smp_init_ops(void); + +extern const struct smp_operations bcm2836_smp_ops;