ARM: ux500: simplify secondary CPU boot
Subsystems (3)
PATCH 2/2 ARM: ux500: simplify secondary CPU boot
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.
---
Hi ARM SoC folks: please apply this to fixes for v4.2. I was intending it for v4.3 but we might as well just kill off the legacy boot method right now so we do not need to restore any static maps and undo the cleanup (which would be just as invasive).
--- 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.3
PATCH 2/2 ARM: ux500: simplify secondary CPU boot
Quoted 10 lines · Linus Walleij
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.
Quoted 7 lines
Signed-off-by Linus Walleij <[email protected]>---
Hi ARM SoC folks: please apply this to fixes for v4.2. I was intending it for v4.3 but we might as well just kill off the legacy boot method right now so we do not need to restore any static maps and undo the cleanup (which would be just as invasive).
It's a bit late in the cycle for that. I'll apply it in cleanup for 4.3 though.
-Olof
PATCH 2/2 ARM: ux500: simplify secondary CPU boot
Quoted 19 lines · Olof Johansson
Quoted 10 lines · Linus Walleij
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.
Quoted 7 lines
Signed-off-by Linus Walleij <[email protected]>---
Hi ARM SoC folks: please apply this to fixes for v4.2. I was intending it for v4.3 but we might as well just kill off the legacy boot method right now so we do not need to restore any static maps and undo the cleanup (which would be just as invasive).
Quoted 1 line
It's a bit late in the cycle for that. I'll apply it in cleanup for 4.3 though.
OK I've got a bunch of cleanups for Ux500, shall I include these in the pull request or will you apply this separately?
Yours,
Linus Walleij
PATCH 2/2 ARM: ux500: simplify secondary CPU boot
Quoted 20 lines · Linus Walleij
Quoted 19 lines · Olof Johansson
Quoted 17 lines · Linus Walleij
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]>---
Hi ARM SoC folks: please apply this to fixes for v4.2. I was intending it for v4.3 but we might as well just kill off the legacy boot method right now so we do not need to restore any static maps and undo the cleanup (which would be just as invasive).
Quoted 4 lines
Quoted 1 line
It's a bit late in the cycle for that. I'll apply it in cleanup for 4.3 though.
OK I've got a bunch of cleanups for Ux500, shall I include these in the pull request or will you apply this separately?
I've applied it already so just send a pull request with the rest of it (hopefully not too much conflicts).
-Olof