ARM: ux500: simplify secondary CPU boot
PATCH 1/1 ARM: ux500: simplify secondary CPU boot
From: Linus Walleij <[email protected]>
This removes a lot of ancient cruft from the Ux500 SMP boot. Instead of the pen grab/release, just point the ROM to secondary_boot() and start the second CPU there, then send the IPI.
Use our own SMP enable method. This enables us to remove the last static mapping and get both CPUs booting properly.
Tested this and it just works.
---
This patch was the 2nd in a 2-patch series. Only the 1st patch made it into v4.2, but this one is also needed for booting on the ste-snowball.
arch/arm/mach-ux500/Makefile | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 1 - arch/arm/mach-ux500/headsmp.S | 37 ----------- arch/arm/mach-ux500/platsmp.c | 132 ++++++++++++--------------------------- arch/arm/mach-ux500/setup.h | 1 - 5 files changed, 40 insertions(+), 133 deletions(-) delete mode 100644 arch/arm/mach-ux500/headsmp.S
arch/arm/mach-ux500/Makefile +1 -1
@@ -7,7 +7,7 @@ obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o obj-$(CONFIG_MACH_MOP500) += board-mop500-regulators.o \ board-mop500-audio.o -obj-$(CONFIG_SMP) += platsmp.o headsmp.o +obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
arch/arm/mach-ux500/cpu-db8500.c +0 -1
@@ -154,7 +154,6 @@ static const char * stericsson_dt_platform_compat[] = { };DT_MACHINE_START (U8500_DT ,"ST-Ericsson Ux5x0 platform (Device Tree Support)" ) - .smp = smp_ops(ux500_smp_ops), .map_io = u8500_map_io, .init_irq = ux500_init_irq,/* we re-use nomadik timer here */
arch/arm/mach-ux500/headsmp.S deleted +0 -37
@@ -1,37 +0,0 @@ -/* - * Copyright (c) 2009 ST-Ericsson - * This file is based ARM Realview platform - * Copyright (c) 2003 ARM Limited - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include <linux/linkage.h> -#include <linux/init.h> - -/* - * U8500 specific entry point for secondary CPUs. - */ -ENTRY(u8500_secondary_startup) - mrc p15, 0, r0, c0, c0, 5 - and r0, r0, #15 - adr r4, 1f - ldmia r4, {r5, r6} - sub r4, r4, r5 - add r6, r6, r4 -pen: ldr r7, [r6] - cmp r7, r0 - bne pen - - /* - * we've been released from the holding pen: secondary_stack - * should now contain the SVC stack for this core - */ - b secondary_startup -ENDPROC(u8500_secondary_startup) - - .align 2 -1: .long . - .long pen_release
arch/arm/mach-ux500/platsmp.c +39 -93
174 lines not on this page · raw message
arch/arm/mach-ux500/setup.h +0 -1
@@ -26,7 +26,6 @@ extern struct device *ux500_soc_device_init(const char *soc_id);extern void ux500_timer_init (void ); -extern struct smp_operations ux500_smp_ops;extern void ux500_cpu_die (unsigned int cpu);#endif /* __ASM_ARCH_SETUP_H */
Signature · 1 line
2.4.5
PATCH 1/1 ARM: ux500: simplify secondary CPU boot
Quoted 21 lines · Kevin Hilman
From: Linus Walleij <[email protected]>
This removes a lot of ancient cruft from the Ux500 SMP boot. Instead of the pen grab/release, just point the ROM to
secondary_boot()and start the second CPU there, then send the IPI.Use our own SMP enable method. This enables us to remove the last static mapping and get both CPUs booting properly.
Tested this and it just works.
Signed-off-by Linus Walleij <[email protected]>Signed-off-by Olof Johansson <[email protected]>(cherry picked from commit c00def71efd919e8ae835a25f4f4c80a4b2d36d3)Cc <[email protected]> # v4.2+Signed-off-by Kevin Hilman <[email protected]>---
This patch was the 2nd in a 2-patch series. Only the 1st patch made it into v4.2, but this one is also needed for booting on the ste-snowball.
Quoted 7 lines
arch/arm/mach-ux500/Makefile | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 1 - arch/arm/mach-ux500/headsmp.S | 37 ----------- arch/arm/mach-ux500/platsmp.c | 132 ++++++++++++--------------------------- arch/arm/mach-ux500/setup.h | 1 - 5 files changed, 40 insertions(+), 133 deletions(-) delete mode 100644 arch/arm/mach-ux500/headsmp.S
This looks to me like a "new feature", is it a regression from something that used to work in 4.1?
thanks,
greg k-h
PATCH 1/1 ARM: ux500: simplify secondary CPU boot
Quoted 30 lines · Greg KH
Quoted 21 lines · Kevin Hilman
From: Linus Walleij <[email protected]>
This removes a lot of ancient cruft from the Ux500 SMP boot. Instead of the pen grab/release, just point the ROM to
secondary_boot()and start the second CPU there, then send the IPI.Use our own SMP enable method. This enables us to remove the last static mapping and get both CPUs booting properly.
Tested this and it just works.
Signed-off-by Linus Walleij <[email protected]>Signed-off-by Olof Johansson <[email protected]>(cherry picked from commit c00def71efd919e8ae835a25f4f4c80a4b2d36d3)Cc <[email protected]> # v4.2+Signed-off-by Kevin Hilman <[email protected]>---
This patch was the 2nd in a 2-patch series. Only the 1st patch made it into v4.2, but this one is also needed for booting on the ste-snowball.Quoted 7 lines
arch/arm/mach-ux500/Makefile | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 1 - arch/arm/mach-ux500/headsmp.S | 37 ----------- arch/arm/mach-ux500/platsmp.c | 132 ++++++++++++--------------------------- arch/arm/mach-ux500/setup.h | 1 - 5 files changed, 40 insertions(+), 133 deletions(-) delete mode 100644 arch/arm/mach-ux500/headsmp.S
Quoted 2 lines
This looks to me like a "new feature", is it a regression from something that used to work in 4.1?
I guess Linus W. will have to explain better, but I'll try...
it's the 2nd part of a 2-part fix that was submitted for v4.2, but only the 1st part made it in because it was late for the merge window.
Kevin
PATCH 1/1 ARM: ux500: simplify secondary CPU boot
Quoted 31 lines · Kevin Hilman
Quoted 30 lines · Greg KH
Quoted 28 lines · Kevin Hilman
From: Linus Walleij <[email protected]>
This removes a lot of ancient cruft from the Ux500 SMP boot. Instead of the pen grab/release, just point the ROM to
secondary_boot()and start the second CPU there, then send the IPI.Use our own SMP enable method. This enables us to remove the last static mapping and get both CPUs booting properly.
Tested this and it just works.
Signed-off-by Linus Walleij <[email protected]>Signed-off-by Olof Johansson <[email protected]>(cherry picked from commit c00def71efd919e8ae835a25f4f4c80a4b2d36d3)Cc <[email protected]> # v4.2+Signed-off-by Kevin Hilman <[email protected]>---
This patch was the 2nd in a 2-patch series. Only the 1st patch made it into v4.2, but this one is also needed for booting on the ste-snowball.arch/arm/mach-ux500/Makefile | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 1 - arch/arm/mach-ux500/headsmp.S | 37 ----------- arch/arm/mach-ux500/platsmp.c | 132 ++++++++++++--------------------------- arch/arm/mach-ux500/setup.h | 1 - 5 files changed, 40 insertions(+), 133 deletions(-) delete mode 100644 arch/arm/mach-ux500/headsmp.S
Quoted 7 lines
Quoted 2 lines
This looks to me like a "new feature", is it a regression from something that used to work in 4.1?
I guess Linus W. will have to explain better, but I'll try...
it's the 2nd part of a 2-part fix that was submitted for v4.2, but only the 1st part made it in because it was late for the merge window.
That doesn't really sound like Documentation/stable_kernel_rules.txt material...
PATCH 1/1 ARM: ux500: simplify secondary CPU boot
Quoted 35 lines · Greg KH
Quoted 34 lines · Kevin Hilman
Quoted 32 lines · Greg KH
Quoted 21 lines · Kevin Hilman
From: Linus Walleij <[email protected]>
This removes a lot of ancient cruft from the Ux500 SMP boot. Instead of the pen grab/release, just point the ROM to
secondary_boot()and start the second CPU there, then send the IPI.Use our own SMP enable method. This enables us to remove the last static mapping and get both CPUs booting properly.
Tested this and it just works.
Signed-off-by Linus Walleij <[email protected]>Signed-off-by Olof Johansson <[email protected]>(cherry picked from commit c00def71efd919e8ae835a25f4f4c80a4b2d36d3)Cc <[email protected]> # v4.2+Signed-off-by Kevin Hilman <[email protected]>---
This patch was the 2nd in a 2-patch series. Only the 1st patch made it into v4.2, but this one is also needed for booting on the ste-snowball.Quoted 7 lines
arch/arm/mach-ux500/Makefile | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 1 - arch/arm/mach-ux500/headsmp.S | 37 ----------- arch/arm/mach-ux500/platsmp.c | 132 ++++++++++++--------------------------- arch/arm/mach-ux500/setup.h | 1 - 5 files changed, 40 insertions(+), 133 deletions(-) delete mode 100644 arch/arm/mach-ux500/headsmp.SThis looks to me like a "new feature", is it a regression from something that used to work in 4.1?
Quoted 7 lines
Quoted 4 lines
I guess Linus W. will have to explain better, but I'll try...
it's the 2nd part of a 2-part fix that was submitted for v4.2, but only the 1st part made it in because it was late for the merge window.
That doesn't really sound like
Documentation/stable_kernel_rules.txtmaterial...
It is. Both patches *should* have gone in the merge window, but because of a misunderstanding and oversight, one of them were missed, so half of the two-part solution was merged, and unfortunately merging half of it boot-regressed the platform.
Yours,
Linus Walleij
PATCH 1/1 ARM: ux500: simplify secondary CPU boot
Quoted 41 lines · Linus Walleij
Quoted 40 lines · Greg KH
Quoted 38 lines · Kevin Hilman
Quoted 30 lines · Greg KH
Quoted 21 lines · Kevin Hilman
From: Linus Walleij <[email protected]>
This removes a lot of ancient cruft from the Ux500 SMP boot. Instead of the pen grab/release, just point the ROM to
secondary_boot()and start the second CPU there, then send the IPI.Use our own SMP enable method. This enables us to remove the last static mapping and get both CPUs booting properly.
Tested this and it just works.
Signed-off-by Linus Walleij <[email protected]>Signed-off-by Olof Johansson <[email protected]>(cherry picked from commit c00def71efd919e8ae835a25f4f4c80a4b2d36d3)Cc <[email protected]> # v4.2+Signed-off-by Kevin Hilman <[email protected]>---
This patch was the 2nd in a 2-patch series. Only the 1st patch made it into v4.2, but this one is also needed for booting on the ste-snowball.Quoted 7 lines
arch/arm/mach-ux500/Makefile | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 1 - arch/arm/mach-ux500/headsmp.S | 37 ----------- arch/arm/mach-ux500/platsmp.c | 132 ++++++++++++--------------------------- arch/arm/mach-ux500/setup.h | 1 - 5 files changed, 40 insertions(+), 133 deletions(-) delete mode 100644 arch/arm/mach-ux500/headsmp.SQuoted 2 lines
This looks to me like a "new feature", is it a regression from something that used to work in 4.1?
I guess Linus W. will have to explain better, but I'll try...
it's the 2nd part of a 2-part fix that was submitted for v4.2, but only the 1st part made it in because it was late for the merge window.
Quoted 7 lines
Quoted 2 lines
That doesn't really sound like
Documentation/stable_kernel_rules.txtmaterial...It is. Both patches *should* have gone in the merge window, but because of a misunderstanding and oversight, one of them were missed, so half of the two-part solution was merged, and unfortunately merging half of it boot-regressed the platform.
I remember discussing the fact that ux500 is only really used in boot farms with mainline these days, so we went with the minimal change for 4.2 (which meant no SMP functionality), with the proper fix for 4.3 due to risk/size. This was unfortunately done off-list, so I can't give you a link. Still, Linus and Tyler both agreed that it didn't seem warranted to fix urgently for 4.2 (and thus, I'd say, for -stable)
So, I'm a little surprised to see this go to stable now.
-Olof