Per sub-architecture SMP operations
Subsystems (10)
v8 cover Per sub-architecture SMP operations
This patch series is a small departure from the earlier series, which was trying to introduce a SoC descriptor. Instead, this one focusses on SMP operations, and only this, as per Arnd's request.
Each platforms exports a "struct smp_ops" that is pointed to by their mach_desc. The last patch consolidates the definition of pen_release into the SMP code, though this is arguably wrong (most platforms shouldn't need the whole pen_release thing at all).
Patches against v3.5-rc2. Tested on VExpress (Cortex A15).
Also available at:git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git smp_ops-v3.5-rc2
Changelog:
Quoted 1 line
From v7:
- Dropped soc_desc, and focussed only on smp_ops
- Fixed CONFIG_HOTPLUG_CPU typo (courtesy of Shawn Guo)
- Marked {realview,vexpress}_cpu_die() as __cpuinit
- Added support for spear13xx
- Added pen_release consolidation (based on Arnd Bergman's patch)
Quoted 1 line
From v6:
- Dropped the dummy_* stuff
- Support for a number of new platforms
- Added the soc_hotplug_ops() macro to hide some #ifdef-ery away
- More exynos[ 45] churn
- Fixed section mismatches
Quoted 1 line
From v5:
- Added support for highbank and imx6q
- Added support for new shmobile SMP platform
- Add dummy_cpu_kill, dummy_cpu_disable and cpu_lowpower
Quoted 1 line
From v4:
- Added an SMP registration interface and moved all SMP structures to smp.c. The end result is much cleaner.
- Cleaned up patch 2 (leftovers from a previous rework)
- NVIDIA/EXYNOS4 naming cleanup.
Quoted 1 line
From v3:
- Converted all SMP platforms
- Added some cleanup as a last patch
Quoted 1 line
From v2:
- Split the SMP ops between init and runtime operations in order to have separate lifetimes for the different structures. This is not perfect though, as it still allows an __init function to make it to a runtime structure (all smp_*_ops structures are __initdata in order to be able to discard them). Thanks to Nico for pointing this out.
- Use macros to hide the #ifdef-ery in the SoC descriptor init, courtesy of Arnd.
Quoted 1 line
From v1:
- Move the SMP ops out of the descriptor, which makes the structure init a bit cleaner (thanks to Arnd).
- Mark all structures __initdata and keep a copy of the used ones.
- Keep a global pointer for the SMP ops.
Marc Zyngier (13):
ARM: Add per-platform SMP/CPU-hotplug operations
ARM: convert VExpress/RealView to smp_ops
ARM: convert OMAP4 to smp_ops
ARM: convert Tegra to smp_ops
ARM: convert Exynos to smp_ops
ARM: convert MSM SMP to smp_ops
ARM: convert ux500 to smp_ops
ARM: convert shmobile SMP to smp_ops
ARM: convert highbank to smp_ops
ARM: convert imx6q to smp_ops
ARM: convert spear13xx to smp_ops
ARM: smp: Make smp_ops mandatory for SMP platforms
ARM: consolidate pen_release instead of having per platform
definitions
arch/arm/include/asm/mach/arch.h | 10 +++ arch/arm/include/asm/smp.h | 15 +--- arch/arm/include/asm/smp_ops.h | 87 ++++++++++++++++++++++++ arch/arm/kernel/setup.c | 2 + arch/arm/kernel/smp.c | 86 ++++++++++++++++++++++- arch/arm/mach-exynos/common.h | 8 +++ arch/arm/mach-exynos/hotplug.c | 8 +-- arch/arm/mach-exynos/mach-armlex4210.c | 1 + arch/arm/mach-exynos/mach-exynos4-dt.c | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 1 + arch/arm/mach-exynos/mach-nuri.c | 1 + arch/arm/mach-exynos/mach-origen.c | 1 + arch/arm/mach-exynos/mach-smdk4x12.c | 2 + arch/arm/mach-exynos/mach-smdkv310.c | 2 + arch/arm/mach-exynos/mach-universal_c210.c | 1 + arch/arm/mach-exynos/platsmp.c | 23 ++++--- arch/arm/mach-highbank/core.h | 7 ++ arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/hotplug.c | 6 +- arch/arm/mach-highbank/platsmp.c | 14 ++-- arch/arm/mach-imx/hotplug.c | 6 +- arch/arm/mach-imx/mach-imx6q.c | 2 + arch/arm/mach-imx/platsmp.c | 15 ++-- arch/arm/mach-msm/board-msm8960.c | 3 + arch/arm/mach-msm/board-msm8x60.c | 7 ++ arch/arm/mach-msm/core.h | 7 ++ arch/arm/mach-msm/hotplug.c | 8 +-- arch/arm/mach-msm/platsmp.c | 20 +++--- arch/arm/mach-omap2/board-4430sdp.c | 1 + arch/arm/mach-omap2/board-generic.c | 1 + arch/arm/mach-omap2/board-omap4panda.c | 1 + arch/arm/mach-omap2/common.h | 10 +++ arch/arm/mach-omap2/omap-hotplug.c | 6 +- arch/arm/mach-omap2/omap-smp.c | 15 ++-- arch/arm/mach-realview/core.c | 1 + arch/arm/mach-realview/core.h | 7 ++ arch/arm/mach-realview/hotplug.c | 8 +-- arch/arm/mach-realview/platsmp.c | 15 ++-- arch/arm/mach-realview/realview_eb.c | 1 + arch/arm/mach-realview/realview_pb11mp.c | 1 + arch/arm/mach-realview/realview_pbx.c | 1 + arch/arm/mach-shmobile/board-ag5evm.c | 1 + arch/arm/mach-shmobile/board-kota2.c | 1 + arch/arm/mach-shmobile/board-kzm9d.c | 1 + arch/arm/mach-shmobile/board-kzm9g.c | 1 + arch/arm/mach-shmobile/board-marzen.c | 1 + arch/arm/mach-shmobile/hotplug.c | 26 +++++-- arch/arm/mach-shmobile/include/mach/common.h | 19 ++---- arch/arm/mach-shmobile/include/mach/emev2.h | 8 +-- arch/arm/mach-shmobile/include/mach/r8a7779.h | 6 ++ arch/arm/mach-shmobile/include/mach/sh73a0.h | 4 ++ arch/arm/mach-shmobile/platsmp.c | 86 +---------------------- arch/arm/mach-shmobile/setup-emev2.c | 1 + arch/arm/mach-shmobile/smp-emev2.c | 21 ++++-- arch/arm/mach-shmobile/smp-r8a7779.c | 21 ++++-- arch/arm/mach-shmobile/smp-sh73a0.c | 22 ++++-- arch/arm/mach-spear13xx/hotplug.c | 8 +-- arch/arm/mach-spear13xx/include/mach/generic.h | 7 ++ arch/arm/mach-spear13xx/platsmp.c | 21 +++--- arch/arm/mach-spear13xx/spear1310.c | 1 + arch/arm/mach-spear13xx/spear1340.c | 1 + arch/arm/mach-tegra/board-dt-tegra20.c | 2 + arch/arm/mach-tegra/board-dt-tegra30.c | 2 + arch/arm/mach-tegra/board-harmony.c | 2 + arch/arm/mach-tegra/board-paz00.c | 2 + arch/arm/mach-tegra/board-seaboard.c | 4 ++ arch/arm/mach-tegra/board-trimslice.c | 2 + arch/arm/mach-tegra/common.c | 2 + arch/arm/mach-tegra/common.h | 6 ++ arch/arm/mach-tegra/hotplug.c | 6 +- arch/arm/mach-tegra/platsmp.c | 17 +++-- arch/arm/mach-ux500/board-mop500.c | 4 ++ arch/arm/mach-ux500/hotplug.c | 8 +-- arch/arm/mach-ux500/include/mach/setup.h | 7 ++ arch/arm/mach-ux500/platsmp.c | 20 +++--- arch/arm/mach-vexpress/core.h | 8 +++ arch/arm/mach-vexpress/hotplug.c | 8 +-- arch/arm/mach-vexpress/platsmp.c | 16 +++-- arch/arm/mach-vexpress/v2m.c | 4 ++ arch/arm/plat-mxc/include/mach/common.h | 8 +++ arch/arm/plat-versatile/include/plat/platsmp.h | 14 ++++ arch/arm/plat-versatile/platsmp.c | 10 +-- 82 files changed, 578 insertions(+), 244 deletions(-) create mode 100644 arch/arm/include/asm/smp_ops.h create mode 100644 arch/arm/mach-msm/core.h create mode 100644 arch/arm/mach-tegra/common.h create mode 100644 arch/arm/plat-versatile/include/plat/platsmp.h
Signature · 1 line
1.7.10.3
PATCH v8 1/13 ARM: Add per-platform SMP/CPU-hotplug operations
Allow platforms to export their SMP and CPU hotplug operations through a new smp_ops structure.
To allow the kernel to continue building, the platform hooks are defined as weak symbols which are overridden by the platform code. Once all platforms are converted, the "weak" attribute will be removed and the functions made static.
--- arch/arm/include/asm/mach/arch.h | 10 +++++ arch/arm/include/asm/smp_ops.h | 87 ++++++++++++++++++++++++++++++++++++++ arch/arm/kernel/setup.c | 2 + arch/arm/kernel/smp.c | 76 +++++++++++++++++++++++++++++++++ 4 files changed, 175 insertions(+) create mode 100644 arch/arm/include/asm/smp_ops.h
arch/arm/include/asm/mach/arch.h +10 -0
@@ -14,6 +14,7 @@ struct tag;struct meminfo ;struct sys_timer ;struct pt_regs ; +struct smp_ops ;struct machine_desc {unsigned int nr;/* architecture number */
@@ -35,6 +36,9 @@ struct machine_desc { unsigned char reserve_lp1 :1; /* never has lp1 */ unsigned char reserve_lp2 :1; /* never has lp2 */char restart_mode;/* default restart mode */ +#ifdef CONFIG_SMP +struct smp_ops *smp_ops;/* SMP operations */ +#endif void (*fixup)(struct tag *,char **,struct meminfo *);void (*reserve)(void );/* reserve mem blocks */
@@ -50,6 +54,12 @@ struct machine_desc {void (*restart)(char ,const char *); }; +#ifdef CONFIG_SMP +#define smp_ops (s) .smp_ops = (&s), +#else +#define smp_ops (s)/* empty */ +#endif +/* * Current machine - only accessible during boot. */
arch/arm/include/asm/smp_ops.h new file +87 -0
87 lines not on this page · raw message
arch/arm/kernel/setup.c +2 -0
@@ -45,6 +45,7 @@#include <asm/cacheflush.h> #include <asm/cachetype.h> #include <asm/tlbflush.h> +#include <asm/smp_ops.h> #include <asm/prom.h> #include <asm/mach/arch.h>
@@ -947,6 +948,7 @@ void __init setup_arch(char **cmdline_p) mdesc =setup_machine_tags (machine_arch_type); machine_desc = mdesc; machine_name = mdesc->name; +smp_ops_register (mdesc->smp_ops);setup_dma_zone (mdesc);
arch/arm/kernel/smp.c +76 -0
91 lines not on this page · raw message
Signature · 1 line
1.7.10.3
PATCH v8 1/13 ARM: Add per-platform SMP/CPU-hotplug operations
Quoted 11 lines · Marc Zyngier
arch/arm/include/asm/mach/arch.h +3
-0@@ -35,6 +36,9 @@ struct machine_desc { unsigned char reserve_lp1 :1; /* never has lp1 */ unsigned char reserve_lp2 :1; /* never has lp2 */char restart_mode;/* default restart mode */ +#ifdef CONFIG_SMP +struct smp_ops *smp_ops;/* SMP operations */ +#endif void (*fixup)(struct tag *,char **,struct meminfo *);void (*reserve)(void );/* reserve mem blocks */
arch/arm/include/asm/mach/arch.h struct machine_desc { · line 62
Quoted 9 lines
arch/arm/include/asm/mach/arch.h +6
-0@@ -50,6 +54,12 @@ struct machine_desc {void (*restart)(char ,const char *); }; +#ifdef CONFIG_SMP +#define smp_ops (s) .smp_ops = (&s), +#else +#define smp_ops (s)/* empty */ +#endif +
I think we should just leave these in unconditionally as before. The price is one pointer per machine_desc, but the advantage is that we don't have to use an ugly macro.
If people think the savings are worth doing the macro for, can we at least kill the "," and the "&" in it, to make it more regular syntax?
arch/arm/include/asm/smp_ops.h line 56
Quoted 5 lines
arch/arm/include/asm/smp_ops.h new file +5
-0+struct smp_ops { +struct smp_init_ops init_ops; +struct smp_secondary_ops secondary_ops; +struct smp_hotplug_ops hotplug_ops; +};
Ok, I don't really mind this split so much, although it still feels like it's making the structure more complicated than it should.
Quoted 18 lines
arch/arm/include/asm/smp_ops.h new file +18
-0+#ifdef CONFIG_SMP +#define smp_init_ops (prefix) .init_ops = { \ + .smp_init_cpus = prefix##_smp_init_cpus, \ + .smp_prepare_cpus = prefix##_smp_prepare_cpus, \ + }, + +#define smp_secondary_ops (prefix) .secondary_ops = { \ + .smp_secondary_init = prefix##_secondary_init, \ + .smp_boot_secondary = prefix##_boot_secondary, \ + }, + +extern void smp_ops_register (struct smp_ops *); + +#else +#define smp_init_ops (prefix) .init_ops = {}, +#define smp_secondary_ops (prefix) .secondary_ops = {}, +#define smp_ops_register (a) do {} while(0) +#endif
arch/arm/include/asm/smp_ops.h line 85
Quoted 10 lines
arch/arm/include/asm/smp_ops.h new file +10
-0+ +#ifdef CONFIG_HOTPLUG_CPU +#define smp_hotplug_ops (prefix) .hotplug_ops = { \ + .cpu_kill = prefix##_cpu_kill, \ + .cpu_die = prefix##_cpu_die, \ + .cpu_disable = prefix##_cpu_disable, \ + }, +#else +#define smp_hotplug_ops (prefix) .hotplug_ops = {}, +#endif
But these macros are just horrible. The string concatenation makes it impossible to grep for where the function pointers are actually used. Just open-code the initialization, it's really not too much to ask to write something like
struct smp_ops vexpress_smp_ops = {
.init_ops = {
.smp_init_cpus = vexpress_smp_init_cpus,
.smp_prepare_cpus = vexpress_smp_prepare_cpus,
},
.secondary_ops = {
.smp_secondary_init = vexpress_secondary_init,
.smp_boot_secondary = vexpress_boot_secondary,
},
#ifdef CONFIG_HOTPLUG_CPU
.hotplug_ops = {
.cpu_kill = vexpress_cpu_kill,
.cpu_die = vexpress_cpu_die,
.cpu_disable = vexpress_cpu_disable,
},#endif
};
Anyone can read this, and it's not all that much to write either. Whereas the macro version requires everybody who wants to modify that code to understand all the macros you introduced.
Arnd
PATCH v8 2/13 ARM: convert VExpress/RealView to smp_ops
In reply to Marc ZyngierConvert both Realview and VExpress to use the smp_ops to provide their SMP and CPU hotplug operation.
--- arch/arm/mach-realview/core.c | 1 + arch/arm/mach-realview/core.h | 7 +++++++ arch/arm/mach-realview/hotplug.c | 6 +++--- arch/arm/mach-realview/platsmp.c | 15 +++++++++++---- arch/arm/mach-realview/realview_eb.c | 1 + arch/arm/mach-realview/realview_pb11mp.c | 1 + arch/arm/mach-realview/realview_pbx.c | 1 + arch/arm/mach-vexpress/core.h | 8 ++++++++ arch/arm/mach-vexpress/hotplug.c | 6 +++--- arch/arm/mach-vexpress/platsmp.c | 16 ++++++++++++---- arch/arm/mach-vexpress/v2m.c | 4 ++++ arch/arm/plat-versatile/include/plat/platsmp.h | 14 ++++++++++++++ arch/arm/plat-versatile/platsmp.c | 4 ++-- 13 files changed, 68 insertions(+), 16 deletions(-) create mode 100644 arch/arm/plat-versatile/include/plat/platsmp.h
arch/arm/mach-realview/core.c +1 -0
@@ -37,6 +37,7 @@#include <asm/irq.h> #include <asm/leds.h> #include <asm/mach-types.h> +#include <asm/smp_ops.h> #include <asm/hardware/arm_timer.h> #include <asm/hardware/icst.h>
arch/arm/mach-realview/core.h +7 -0
@@ -27,6 +27,7 @@#include <asm/setup.h> #include <asm/leds.h> +#include <asm/smp_ops.h> #define APB_DEVICE (name, busid, base, plat) \ static AMBA_APB_DEVICE(name, busid, 0, REALVIEW_##base##_BASE, base##_IRQ, plat)
@@ -56,4 +57,10 @@ extern void realview_init_early(void);extern void realview_fixup (struct tag *tags,char **from,struct meminfo *meminfo); +extern struct smp_ops realview_smp_ops; + +extern int realview_cpu_kill (unsigned int cpu); +extern void realview_cpu_die (unsigned int cpu); +extern int realview_cpu_disable (unsigned int cpu); +#endif
arch/arm/mach-realview/hotplug.c +3 -3
@@ -89,7 +89,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) } } -int platform_cpu_kill (unsigned int cpu) +int realview_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -99,7 +99,7 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void platform_cpu_die (unsigned int cpu) +void __cpuinit realview_cpu_die (unsigned int cpu) {int spurious =0 ;
@@ -119,7 +119,7 @@ void platform_cpu_die(unsigned int cpu)pr_warn ("CPU%u: %u spurious wakeup calls\n" , cpu, spurious); } -int platform_cpu_disable (unsigned int cpu) +int realview_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-realview/platsmp.c +11 -4
@@ -17,14 +17,15 @@#include <asm/hardware/gic.h> #include <asm/mach-types.h> #include <asm/smp_scu.h> +#include <asm/smp_ops.h> #include <mach/board-eb.h> #include <mach/board-pb11mp.h> #include <mach/board-pbx.h> -#include "core.h" +#include <plat/platsmp.h> -extern void versatile_secondary_startup (void ); +#include "core.h" static void __iomem *scu_base_addr (void ) {
@@ -43,7 +44,7 @@ static void __iomem *scu_base_addr(void)* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init realview_smp_init_cpus (void ) {void __iomem *scu_base =scu_base_addr ();unsigned int i, ncores;
@@ -63,7 +64,7 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init realview_smp_prepare_cpus (unsigned int max_cpus) {scu_enable (scu_base_addr ());
@@ -77,3 +78,9 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)__raw_writel (virt_to_phys (versatile_secondary_startup),__io_address (REALVIEW_SYS_FLAGSSET )); } + +struct smp_ops realview_smp_ops__initdata = { + smp_init_ops(realview) + smp_secondary_ops(versatile) +smp_hotplug_ops (realview) +};
arch/arm/mach-realview/realview_eb.c +1 -0
@@ -470,6 +470,7 @@ static void __init realview_eb_init(void)MACHINE_START (REALVIEW_EB ,"ARM-RealView EB" ) /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ +smp_ops (realview_smp_ops) .atag_offset = 0x100, .fixup = realview_fixup, .map_io = realview_eb_map_io,
arch/arm/mach-realview/realview_pb11mp.c +1 -0
@@ -365,6 +365,7 @@ static void __init realview_pb11mp_init(void)MACHINE_START (REALVIEW_PB11MP ,"ARM-RealView PB11MPCore" ) /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ +smp_ops (realview_smp_ops) .atag_offset = 0x100, .fixup = realview_fixup, .map_io = realview_pb11mp_map_io,
arch/arm/mach-realview/realview_pbx.c +1 -0
@@ -402,6 +402,7 @@ static void __init realview_pbx_init(void)MACHINE_START (REALVIEW_PBX ,"ARM-RealView PBX" ) /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ +smp_ops (realview_smp_ops) .atag_offset = 0x100, .fixup = realview_pbx_fixup, .map_io = realview_pbx_map_io,
arch/arm/mach-vexpress/core.h +8 -0
@@ -5,3 +5,11 @@#define V2T_PERIPH 0xf8200000void vexpress_dt_smp_map_io (void ); + +struct smp_ops ; + +extern struct smp_ops vexpress_smp_ops; + +extern int vexpress_cpu_kill (unsigned int cpu); +extern void vexpress_cpu_die (unsigned int cpu); +extern int vexpress_cpu_disable (unsigned int cpu);
arch/arm/mach-vexpress/hotplug.c +3 -3
@@ -84,7 +84,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) } } -int platform_cpu_kill (unsigned int cpu) +int vexpress_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -94,7 +94,7 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void platform_cpu_die (unsigned int cpu) +void __cpuinit vexpress_cpu_die (unsigned int cpu) {int spurious =0 ;
@@ -114,7 +114,7 @@ void platform_cpu_die(unsigned int cpu)pr_warn ("CPU%u: %u spurious wakeup calls\n" , cpu, spurious); } -int platform_cpu_disable (unsigned int cpu) +int vexpress_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-vexpress/platsmp.c +12 -4
@@ -18,11 +18,13 @@#include <asm/hardware/gic.h> #include <asm/mach/map.h> +#include <asm/smp_ops.h> +#include <mach/motherboard.h> -#include "core.h" +#include <plat/platsmp.h> -extern void versatile_secondary_startup (void ); +#include "core.h" #if defined(CONFIG_OF )
@@ -167,7 +169,7 @@ void __init vexpress_dt_smp_prepare_cpus(unsigned int max_cpus)* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init vexpress_smp_init_cpus (void ) {if (ct_desc) ct_desc->init_cpu_map ();
@@ -176,7 +178,7 @@ void __init smp_init_cpus(void) } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init vexpress_smp_prepare_cpus (unsigned int max_cpus) {/* * Initialise the present map, which describes the set of CPUs
@@ -195,3 +197,9 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)*/ v2m_flags_set (virt_to_phys (versatile_secondary_startup)); } + +struct smp_ops vexpress_smp_ops__initdata = { + smp_init_ops(vexpress) + smp_secondary_ops(versatile) +smp_hotplug_ops (vexpress) +};
arch/arm/mach-vexpress/v2m.c +4 -0
@@ -20,6 +20,7 @@#include <asm/arch_timer.h> #include <asm/mach-types.h> +#include <asm/smp_ops.h> #include <asm/sizes.h> #include <asm/smp_twd.h> #include <asm/mach/arch.h>
@@ -35,6 +36,7 @@#include <mach/motherboard.h> #include <plat/sched_clock.h> +#include <plat/platsmp.h> #include "core.h"
@@ -474,6 +476,7 @@ static void __init v2m_init(void) } MACHINE_START(VEXPRESS, "ARM-Versatile Express") +smp_ops (vexpress_smp_ops) .atag_offset = 0x100, .map_io = v2m_map_io, .init_early = v2m_init_early,
@@ -678,6 +681,7 @@ const static char *v2m_dt_match[] __initconst = { }; DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") +smp_ops (vexpress_smp_ops) .dt_compat = v2m_dt_match, .map_io = v2m_dt_map_io, .init_early = v2m_dt_init_early,
arch/arm/plat-versatile/include/plat/platsmp.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* linux/arch/arm/plat-versatile/include/plat/platsmp.h +* +* Copyright (C) 2011 ARM Ltd. +* 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. +*/ + +extern void versatile_secondary_startup (void ); +extern void versatile_secondary_init (unsigned int cpu); +extern int versatile_boot_secondary (unsigned int cpu,struct task_struct *idle);
arch/arm/plat-versatile/platsmp.c +2 -2
@@ -40,7 +40,7 @@ static void __cpuinit write_pen_release(int val)static DEFINE_SPINLOCK (boot_lock); -void __cpuinit platform_secondary_init (unsigned int cpu) +void __cpuinit versatile_secondary_init (unsigned int cpu) {/* * if any interrupts are already enabled for the primary
@@ -62,7 +62,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)spin_unlock (&boot_lock); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +int __cpuinit versatile_boot_secondary (unsigned int cpu,struct task_struct *idle) {unsigned long timeout;
Signature · 1 line
1.7.10.3
PATCH v8 3/13 ARM: convert OMAP4 to smp_ops
In reply to Marc ZyngierConvert OMAP4 to use the smp_ops to provide its SMP and CPU hotplug operations.
Tested on both Panda and IGEPv2 (MULTI_OMAP kernel)
--- arch/arm/mach-omap2/board-4430sdp.c | 1 + arch/arm/mach-omap2/board-generic.c | 1 + arch/arm/mach-omap2/board-omap4panda.c | 1 + arch/arm/mach-omap2/common.h | 10 ++++++++++ arch/arm/mach-omap2/omap-hotplug.c | 6 +++--- arch/arm/mach-omap2/omap-smp.c | 15 +++++++++++---- 6 files changed, 27 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/board-4430sdp.c +1 -0
@@ -905,6 +905,7 @@ static void __init omap_4430sdp_init(void)MACHINE_START (OMAP_4430SDP ,"OMAP4430 4430SDP board" ) /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ +smp_ops (omap4_smp_ops) .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap4_map_io,
arch/arm/mach-omap2/board-generic.c +1 -0
@@ -119,6 +119,7 @@ static const char *omap4_boards_compat[] __initdata = { }; DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)") +smp_ops (omap4_smp_ops) .reserve = omap_reserve, .map_io = omap4_map_io, .init_early = omap4430_init_early,
arch/arm/mach-omap2/board-omap4panda.c +1 -0
@@ -514,6 +514,7 @@ static void __init omap4_panda_init(void)MACHINE_START (OMAP4_PANDA ,"OMAP4 Panda board" ) /* Maintainer: David Anders - Texas Instruments Inc */ +smp_ops (omap4_smp_ops) .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap4_map_io,
arch/arm/mach-omap2/common.h +10 -0
@@ -256,8 +256,18 @@ extern void omap_secondary_startup(void);extern u32 omap_modify_auxcoreboot0 (u32 set_mask,u32 clear_mask);extern void omap_auxcoreboot_addr (u32 cpu_addr);extern u32 omap_read_auxcoreboot0 (void ); + +extern int omap4_cpu_kill (unsigned int cpu); +extern void omap4_cpu_die (unsigned int cpu); +extern int omap4_cpu_disable (unsigned int cpu); + +struct smp_ops ; +extern struct smp_ops omap4_smp_ops;#endif +struct arm_soc_desc ; +extern struct arm_soc_desc omap4_soc_desc; +#if defined(CONFIG_SMP ) && defined(CONFIG_PM )extern int omap4_mpuss_init (void );extern int omap4_enter_lowpower (unsigned int cpu,unsigned int power_state);
arch/arm/mach-omap2/omap-hotplug.c +3 -3
@@ -24,7 +24,7 @@#include "powerdomain.h" -int platform_cpu_kill (unsigned int cpu) +int omap4_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -33,7 +33,7 @@ int platform_cpu_kill(unsigned int cpu)* platform-specific code to shutdown a CPU * Called with IRQs disabled */ -void __ref platform_cpu_die (unsigned int cpu) +void __ref omap4_cpu_die (unsigned int cpu) {unsigned int this_cpu;
@@ -62,7 +62,7 @@ void __ref platform_cpu_die(unsigned int cpu) } } -int platform_cpu_disable (unsigned int cpu) +int omap4_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-omap2/omap-smp.c +11 -4
@@ -23,6 +23,7 @@#include <asm/cacheflush.h> #include <asm/hardware/gic.h> #include <asm/smp_scu.h> +#include <asm/smp_ops.h> #include <mach/hardware.h> #include <mach/omap-secure.h>
@@ -41,7 +42,7 @@ void __iomem *omap4_get_scu_base(void)return scu_base; } -void __cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit omap4_secondary_init (unsigned int cpu) {/* * Configure ACTRL and enable NS SMP bit access on CPU1 on HS device.
@@ -69,7 +70,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)spin_unlock (&boot_lock); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +static int __cpuinit omap4_boot_secondary (unsigned int cpu,struct task_struct *idle) {static struct clockdomain *cpu1_clkdm;static bool booted;
@@ -145,7 +146,7 @@ static void __init wakeup_secondary(void)* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init omap4_smp_init_cpus (void ) {unsigned int i, ncores;
@@ -171,7 +172,7 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init omap4_smp_prepare_cpus (unsigned int max_cpus) {/*
@@ -181,3 +182,9 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)scu_enable (scu_base);wakeup_secondary (); } + +struct smp_ops omap4_smp_ops__initdata = { + smp_init_ops(omap4) + smp_secondary_ops(omap4) +smp_hotplug_ops (omap4) +};
Signature · 1 line
1.7.10.3
PATCH v8 4/13 ARM: convert Tegra to smp_ops
In reply to Marc ZyngierConvert Tegra to use the smp_ios to provide its SMP and CPU hotplug operations.
Tested on Harmony.
--- arch/arm/mach-tegra/board-dt-tegra20.c | 2 ++ arch/arm/mach-tegra/board-dt-tegra30.c | 2 ++ arch/arm/mach-tegra/board-harmony.c | 2 ++ arch/arm/mach-tegra/board-paz00.c | 2 ++ arch/arm/mach-tegra/board-seaboard.c | 4 ++++ arch/arm/mach-tegra/board-trimslice.c | 2 ++ arch/arm/mach-tegra/common.c | 2 ++ arch/arm/mach-tegra/common.h | 6 ++++++ arch/arm/mach-tegra/hotplug.c | 6 +++--- arch/arm/mach-tegra/platsmp.c | 17 +++++++++++++---- 10 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 arch/arm/mach-tegra/common.h
arch/arm/mach-tegra/board-dt-tegra20.c +2 -0
@@ -45,6 +45,7 @@#include "board-harmony.h" #include "clock.h" #include "devices.h" +#include "common.h" struct of_dev_auxdata tegra20_auxdata_lookup[]__initdata = {OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,TEGRA_SDMMC1_BASE ,"sdhci-tegra.0" ,NULL ),
@@ -104,6 +105,7 @@ static const char *tegra20_dt_board_compat[] = { }; DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") +smp_ops (tegra_smp_ops) .map_io = tegra_map_common_io, .init_early = tegra20_init_early, .init_irq = tegra_dt_init_irq,
arch/arm/mach-tegra/board-dt-tegra30.c +2 -0
@@ -35,6 +35,7 @@#include "board.h" #include "clock.h" +#include "common.h" static struct of_device_id tegra_dt_match_table[]__initdata = { { .compatible ="simple-bus" , },
@@ -84,6 +85,7 @@ static const char *tegra30_dt_board_compat[] = { }; DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)") +smp_ops (tegra_smp_ops) .map_io = tegra_map_common_io, .init_early = tegra30_init_early, .init_irq = tegra_dt_init_irq,
arch/arm/mach-tegra/board-harmony.c +2 -0
@@ -45,6 +45,7 @@#include "clock.h" #include "devices.h" #include "gpio-names.h" +#include "common.h" static struct plat_serial8250_port debug_uart_platform_data[] = { {
@@ -184,6 +185,7 @@ static void __init tegra_harmony_init(void) } MACHINE_START(HARMONY, "harmony") +smp_ops (tegra_smp_ops) .atag_offset = 0x100, .fixup = tegra_harmony_fixup, .map_io = tegra_map_common_io,
arch/arm/mach-tegra/board-paz00.c +2 -0
@@ -47,6 +47,7 @@#include "clock.h" #include "devices.h" #include "gpio-names.h" +#include "common.h" static struct plat_serial8250_port debug_uart_platform_data[] = { {
@@ -217,6 +218,7 @@ static void __init tegra_paz00_init(void) } MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ") +smp_ops (tegra_smp_ops) .atag_offset = 0x100, .fixup = tegra_paz00_fixup, .map_io = tegra_map_common_io,
arch/arm/mach-tegra/board-seaboard.c +4 -0
@@ -43,6 +43,7 @@#include "clock.h" #include "devices.h" #include "gpio-names.h" +#include "common.h" static struct plat_serial8250_port debug_uart_platform_data[] = { {
@@ -270,6 +271,7 @@ static void __init tegra_wario_init(void) MACHINE_START(SEABOARD, "seaboard") +smp_ops (tegra_smp_ops) .atag_offset = 0x100, .map_io = tegra_map_common_io, .init_early = tegra20_init_early,
@@ -282,6 +284,7 @@ MACHINE_START(SEABOARD, "seaboard") MACHINE_END MACHINE_START(KAEN, "kaen") + smp_ops(tegra_smp_ops) .atag_offset = 0x100, .map_io = tegra_map_common_io, .init_early = tegra20_init_early,
@@ -294,6 +297,7 @@ MACHINE_START(KAEN, "kaen") MACHINE_END MACHINE_START(WARIO, "wario") + smp_ops(tegra_smp_ops) .atag_offset = 0x100, .map_io = tegra_map_common_io, .init_early = tegra20_init_early,
arch/arm/mach-tegra/board-trimslice.c +2 -0
@@ -40,6 +40,7 @@#include "clock.h" #include "devices.h" #include "gpio-names.h" +#include "common.h" #include "board-trimslice.h"
@@ -170,6 +171,7 @@ static void __init tegra_trimslice_init(void) } MACHINE_START(TRIMSLICE, "trimslice") +smp_ops (tegra_smp_ops) .atag_offset = 0x100, .fixup = tegra_trimslice_fixup, .map_io = tegra_map_common_io,
arch/arm/mach-tegra/common.c +2 -0
@@ -23,6 +23,7 @@#include <linux/delay.h> #include <linux/of_irq.h> +#include <asm/smp_ops.h> #include <asm/hardware/cache-l2x0.h> #include <asm/hardware/gic.h>
@@ -31,6 +32,7 @@#include "board.h" #include "clock.h" +#include "common.h" #include "fuse.h" #include "pmc.h"
arch/arm/mach-tegra/common.h new file +6 -0
@@ -0,0 +1,6 @@ +struct smp_ops ; +extern struct smp_ops tegra_smp_ops; + +extern int tegra_cpu_kill (unsigned int cpu); +extern void tegra_cpu_die (unsigned int cpu); +extern int tegra_cpu_disable (unsigned int cpu);
arch/arm/mach-tegra/hotplug.c +3 -3
@@ -87,7 +87,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) } } -int platform_cpu_kill (unsigned int cpu) +int tegra_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -97,7 +97,7 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void platform_cpu_die (unsigned int cpu) +void tegra_cpu_die (unsigned int cpu) {int spurious =0 ;
@@ -117,7 +117,7 @@ void platform_cpu_die(unsigned int cpu)pr_warn ("CPU%u: %u spurious wakeup calls\n" , cpu, spurious); } -int platform_cpu_disable (unsigned int cpu) +int tegra_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-tegra/platsmp.c +13 -4
@@ -23,6 +23,7 @@#include <asm/hardware/gic.h> #include <asm/mach-types.h> #include <asm/smp_scu.h> +#include <asm/smp_ops.h> #include <mach/clk.h> #include <mach/iomap.h>
@@ -32,6 +33,8 @@#include "flowctrl.h" #include "reset.h" +#include "common.h" +extern void tegra_secondary_startup (void );static void __iomem *scu_base =IO_ADDRESS (TEGRA_ARM_PERIF_BASE );
@@ -50,7 +53,7 @@ static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE);#define CPU_CLOCK (cpu) (0x1<<(8+cpu))#define CPU_RESET (cpu) (0x1111ul<<(cpu)) -void __cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit tegra_secondary_init (unsigned int cpu) {/* * if any interrupts are already enabled for the primary
@@ -117,7 +120,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)return 0 ; } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +static int __cpuinit tegra_boot_secondary (unsigned int cpu,struct task_struct *idle) {int status;
@@ -165,7 +168,7 @@ done:* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init tegra_smp_init_cpus (void ) {unsigned int i, ncores =scu_get_core_count (scu_base);
@@ -181,8 +184,14 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init tegra_smp_prepare_cpus (unsigned int max_cpus) {tegra_cpu_reset_handler_init ();scu_enable (scu_base); } + +struct smp_ops tegra_smp_ops__initdata = { + smp_init_ops(tegra) + smp_secondary_ops(tegra) +smp_hotplug_ops (tegra) +};
Signature · 1 line
1.7.10.3
PATCH v8 5/13 ARM: convert Exynos to smp_ops
In reply to Marc ZyngierConvert Exynos to use the smp_ops to provide its SMP and CPU hotplug operations.
--- arch/arm/mach-exynos/common.h | 8 ++++++++ arch/arm/mach-exynos/hotplug.c | 8 +++++--- arch/arm/mach-exynos/mach-armlex4210.c | 1 + arch/arm/mach-exynos/mach-exynos4-dt.c | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 1 + arch/arm/mach-exynos/mach-nuri.c | 1 + arch/arm/mach-exynos/mach-origen.c | 1 + arch/arm/mach-exynos/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos/mach-universal_c210.c | 1 + arch/arm/mach-exynos/platsmp.c | 16 ++++++++++++---- 11 files changed, 35 insertions(+), 7 deletions(-)
arch/arm/mach-exynos/common.h +8 -0
@@ -12,6 +12,8 @@#ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H#define __ARCH_ARM_MACH_EXYNOS_COMMON_H +#include <asm/smp_ops.h> +extern struct sys_timer exynos4_timer;void exynos_init_io (struct map_desc *mach_desc,int size);
@@ -59,4 +61,10 @@ void exynos4212_register_clocks(void);#define exynos4212_register_clocks ()#endif +extern struct smp_ops exynos_smp_ops; + +extern int exynos_cpu_kill (unsigned int cpu); +extern void exynos_cpu_die (unsigned int cpu); +extern int exynos_cpu_disable (unsigned int cpu); +#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
arch/arm/mach-exynos/hotplug.c +5 -3
@@ -21,6 +21,8 @@#include <mach/regs-pmu.h> +#include "common.h" +extern volatile int pen_release;static inline void cpu_enter_lowpower (void )
@@ -95,7 +97,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) } } -int platform_cpu_kill (unsigned int cpu) +int exynos_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -105,7 +107,7 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void platform_cpu_die (unsigned int cpu) +void __cpuinit exynos_cpu_die (unsigned int cpu) {int spurious =0 ;
@@ -125,7 +127,7 @@ void platform_cpu_die(unsigned int cpu)pr_warn ("CPU%u: %u spurious wakeup calls\n" , cpu, spurious); } -int platform_cpu_disable (unsigned int cpu) +int exynos_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-exynos/mach-armlex4210.c +1 -0
@@ -198,6 +198,7 @@ static void __init armlex4210_machine_init(void)MACHINE_START (ARMLEX4210 ,"ARMLEX4210" ) /* Maintainer: Alim Akhtar <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = armlex4210_map_io,
arch/arm/mach-exynos/mach-exynos4-dt.c +1 -0
@@ -79,6 +79,7 @@ static char const *exynos4210_dt_compat[] __initdata = {DT_MACHINE_START (EXYNOS4210_DT ,"Samsung Exynos4 (Flattened Device Tree)" ) /* Maintainer: Thomas Abraham <[email protected]> */ +smp_ops (exynos_smp_ops) .init_irq = exynos4_init_irq, .map_io = exynos4210_dt_map_io, .handle_irq = gic_handle_irq,
arch/arm/mach-exynos/mach-exynos5-dt.c +1 -0
@@ -72,6 +72,7 @@ static char const *exynos5250_dt_compat[] __initdata = {DT_MACHINE_START (EXYNOS5_DT ,"SAMSUNG EXYNOS5 (Flattened Device Tree)" ) /* Maintainer: Kukjin Kim <[email protected]> */ +smp_ops (exynos_smp_ops) .init_irq = exynos5_init_irq, .map_io = exynos5250_dt_map_io, .handle_irq = gic_handle_irq,
arch/arm/mach-exynos/mach-nuri.c +1 -0
@@ -1388,6 +1388,7 @@ static void __init nuri_machine_init(void)MACHINE_START (NURI ,"NURI" ) /* Maintainer: Kyungmin Park <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = nuri_map_io,
arch/arm/mach-exynos/mach-origen.c +1 -0
@@ -765,6 +765,7 @@ static void __init origen_machine_init(void)MACHINE_START (ORIGEN ,"ORIGEN" ) /* Maintainer: JeongHyeon Kim <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = origen_map_io,
arch/arm/mach-exynos/mach-smdk4x12.c +2 -0
@@ -298,6 +298,7 @@ static void __init smdk4x12_machine_init(void)MACHINE_START (SMDK4212 ,"SMDK4212" ) /* Maintainer: Kukjin Kim <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = smdk4x12_map_io,
@@ -311,6 +312,7 @@ MACHINE_ENDMACHINE_START (SMDK4412 ,"SMDK4412" )/* Maintainer: Kukjin Kim <[email protected]> */ /* Maintainer: Changhwan Youn <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = smdk4x12_map_io,
arch/arm/mach-exynos/mach-smdkv310.c +2 -0
@@ -398,6 +398,7 @@ static void __init smdkv310_machine_init(void)MACHINE_START (SMDKV310 ,"SMDKV310" )/* Maintainer: Kukjin Kim <[email protected]> */ /* Maintainer: Changhwan Youn <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = smdkv310_map_io,
@@ -410,6 +411,7 @@ MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" ) /* Maintainer: Kukjin Kim <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = smdkv310_map_io,
arch/arm/mach-exynos/mach-universal_c210.c +1 -0
@@ -1156,6 +1156,7 @@ static void __init universal_machine_init(void)MACHINE_START (UNIVERSAL_C210 ,"UNIVERSAL_C210" ) /* Maintainer: Kyungmin Park <[email protected]> */ +smp_ops (exynos_smp_ops) .atag_offset = 0x100, .init_irq = exynos4_init_irq, .map_io = universal_map_io,
arch/arm/mach-exynos/platsmp.c +12 -4
@@ -32,6 +32,8 @@#include <plat/cpu.h> +#include "common.h" +extern void exynos4_secondary_startup (void );#define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
@@ -64,7 +66,7 @@ static void __iomem *scu_base_addr(void)static DEFINE_SPINLOCK (boot_lock); -void __cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit exynos_secondary_init (unsigned int cpu) {/* * if any interrupts are already enabled for the primary
@@ -86,7 +88,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)spin_unlock (&boot_lock); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +static int __cpuinit exynos_boot_secondary (unsigned int cpu,struct task_struct *idle) {unsigned long timeout;
@@ -161,7 +163,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)* which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init exynos_smp_init_cpus (void ) {void __iomem *scu_base =scu_base_addr ();unsigned int i, ncores;
@@ -184,7 +186,7 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init exynos_smp_prepare_cpus (unsigned int max_cpus) {if (!soc_is_exynos5250 ())scu_enable (scu_base_addr ());
@@ -198,3 +200,9 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)__raw_writel (virt_to_phys (exynos4_secondary_startup),CPU1_BOOT_REG ); } + +struct smp_ops exynos_smp_ops__initdata = { + smp_init_ops(exynos) + smp_secondary_ops(exynos) +smp_hotplug_ops (exynos) +};
Signature · 1 line
1.7.10.3
PATCH v8 6/13 ARM: convert MSM SMP to smp_ops
In reply to Marc ZyngierConvert MSM SMP platforms to use the smp_ops to provide their SMP and CPU hotplug operations.
--- arch/arm/mach-msm/board-msm8960.c | 3 +++ arch/arm/mach-msm/board-msm8x60.c | 7 +++++++ arch/arm/mach-msm/core.h | 7 +++++++ arch/arm/mach-msm/hotplug.c | 8 +++++--- arch/arm/mach-msm/platsmp.c | 15 +++++++++++---- 5 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 arch/arm/mach-msm/core.h
arch/arm/mach-msm/board-msm8960.c +3 -0
@@ -30,6 +30,7 @@#include <mach/board.h> #include <mach/msm_iomap.h> +#include "core.h" #include "devices.h" static void __init msm8960_fixup(struct tag *tag, char **cmdline,
@@ -99,6 +100,7 @@ static void __init msm8960_init_late(void) } MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") +smp_ops (msm_smp_ops) .fixup = msm8960_fixup, .reserve = msm8960_reserve, .map_io = msm8960_map_io,
@@ -110,6 +112,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") MACHINE_END MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") + smp_ops(msm_smp_ops) .fixup = msm8960_fixup, .reserve = msm8960_reserve, .map_io = msm8960_map_io,
arch/arm/mach-msm/board-msm8x60.c +7 -0
@@ -29,6 +29,8 @@#include <mach/board.h> #include <mach/msm_iomap.h> +#include "core.h" +static void __init msm8x60_fixup (struct tag *tag,char **cmdline,struct meminfo *mi) {
@@ -110,6 +112,7 @@ static const char *msm8x60_fluid_match[] __initdata = {#endif /* CONFIG_OF */ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") +smp_ops (msm_smp_ops) .fixup = msm8x60_fixup, .reserve = msm8x60_reserve, .map_io = msm8x60_map_io,
@@ -121,6 +124,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") MACHINE_END MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") + smp_ops(msm_smp_ops) .fixup = msm8x60_fixup, .reserve = msm8x60_reserve, .map_io = msm8x60_map_io,
@@ -132,6 +136,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") MACHINE_END MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") + smp_ops(msm_smp_ops) .fixup = msm8x60_fixup, .reserve = msm8x60_reserve, .map_io = msm8x60_map_io,
@@ -143,6 +148,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") MACHINE_END MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") + smp_ops(msm_smp_ops) .fixup = msm8x60_fixup, .reserve = msm8x60_reserve, .map_io = msm8x60_map_io,
@@ -156,6 +162,7 @@ MACHINE_END#ifdef CONFIG_OF /* TODO: General device tree support for all MSM. */ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") +smp_ops (msm_smp_ops) .map_io = msm8x60_map_io, .init_irq = msm8x60_init_irq, .init_machine = msm8x60_dt_init,
arch/arm/mach-msm/core.h new file +7 -0
@@ -0,0 +1,7 @@ +#include <asm/smp_ops.h> + +extern struct smp_ops msm_smp_ops; + +extern int msm_cpu_kill (unsigned int cpu); +extern void msm_cpu_die (unsigned int cpu); +extern int msm_cpu_disable (unsigned int cpu);
arch/arm/mach-msm/hotplug.c +5 -3
@@ -13,6 +13,8 @@#include <asm/cacheflush.h> #include <asm/smp_plat.h> +#include "core.h" +extern volatile int pen_release;static inline void cpu_enter_lowpower (void )
@@ -57,7 +59,7 @@ static inline void platform_do_lowpower(unsigned int cpu) } } -int platform_cpu_kill (unsigned int cpu) +int msm_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -67,7 +69,7 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void platform_cpu_die (unsigned int cpu) +void msm_cpu_die (unsigned int cpu) {/* * we're ready for shutdown now, so do it
@@ -82,7 +84,7 @@ void platform_cpu_die(unsigned int cpu)cpu_leave_lowpower (); } -int platform_cpu_disable (unsigned int cpu) +int msm_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-msm/platsmp.c +11 -4
@@ -25,6 +25,7 @@#include <mach/msm_iomap.h> #include "scm-boot.h" +#include "core.h" #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0#define SCSS_CPU1CORE_RESET 0xD80
@@ -48,7 +49,7 @@ static inline int get_core_count(void)return ((read_cpuid_id () >>4 ) &3 ) +1 ; } -void __cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit msm_secondary_init (unsigned int cpu) {/* Configure edge-triggered PPIs */ writel (GIC_PPI_EDGE_MASK ,MSM_QGIC_DIST_BASE +GIC_DIST_CONFIG +4 );
@@ -93,7 +94,7 @@ static __cpuinit void prepare_cold_cpu(unsigned int cpu) "address\n"); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +static int __cpuinit msm_boot_secondary (unsigned int cpu,struct task_struct *idle) {unsigned long timeout;static int cold_boot_done;
@@ -153,7 +154,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)* does not support the ARM SCU, so just set the possible cpu mask to * NR_CPUS. */ -void __init smp_init_cpus (void ) +static void __init msm_smp_init_cpus (void ) {unsigned int i, ncores =get_core_count ();
@@ -169,6 +170,12 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init msm_smp_prepare_cpus (unsigned int max_cpus) { } + +struct smp_ops msm_smp_ops__initdata = { + smp_init_ops(msm) + smp_secondary_ops(msm) +smp_hotplug_ops (msm) +};
Signature · 1 line
1.7.10.3
PATCH v8 7/13 ARM: convert ux500 to smp_ops
In reply to Marc ZyngierConvert ux500 platforms to use the smp_ops to provide their SMP and CPU hotplug operations.
--- arch/arm/mach-ux500/board-mop500.c | 4 ++++ arch/arm/mach-ux500/hotplug.c | 8 +++++--- arch/arm/mach-ux500/include/mach/setup.h | 7 +++++++ arch/arm/mach-ux500/platsmp.c | 14 ++++++++++---- 4 files changed, 26 insertions(+), 7 deletions(-)
arch/arm/mach-ux500/board-mop500.c +4 -0
@@ -788,6 +788,7 @@ static void __init hrefv60_init_machine(void)MACHINE_START (U8500 ,"ST-Ericsson MOP500 platform" ) /* Maintainer: Srinidhi Kasagar <[email protected]> */ +smp_ops (ux500_smp_ops) .atag_offset = 0x100, .map_io = u8500_map_io, .init_irq = ux500_init_irq,
@@ -799,6 +800,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") MACHINE_END MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") +smp_ops (ux500_smp_ops) .atag_offset = 0x100, .map_io = u8500_map_io, .init_irq = ux500_init_irq,
@@ -809,6 +811,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") MACHINE_END MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") +smp_ops (ux500_smp_ops) .atag_offset = 0x100, .map_io = u8500_map_io, .init_irq = ux500_init_irq,
@@ -939,6 +942,7 @@ static const char * u8500_dt_board_compat[] = { DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") +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/hotplug.c +5 -3
@@ -15,6 +15,8 @@#include <asm/cacheflush.h> #include <asm/smp_plat.h> +#include <mach/setup.h> +extern volatile int pen_release;static inline void platform_do_lowpower (unsigned int cpu)
@@ -34,7 +36,7 @@ static inline void platform_do_lowpower(unsigned int cpu) } } -int platform_cpu_kill (unsigned int cpu) +int ux500_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -44,13 +46,13 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void platform_cpu_die (unsigned int cpu) +void ux500_cpu_die (unsigned int cpu) {/* directly enter low power state, skipping secure registers */ platform_do_lowpower (cpu); } -int platform_cpu_disable (unsigned int cpu) +int ux500_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-ux500/include/mach/setup.h +7 -0
@@ -11,6 +11,7 @@#ifndef __ASM_ARCH_SETUP_H#define __ASM_ARCH_SETUP_H +#include <asm/smp_ops.h> #include <asm/mach/time.h> #include <linux/init.h>
@@ -44,4 +45,10 @@ extern struct sys_timer ux500_timer; .type = MT_MEMORY, \ } +extern struct smp_ops ux500_smp_ops; + +extern int ux500_cpu_kill (unsigned int cpu); +extern void ux500_cpu_die (unsigned int cpu); +extern int ux500_cpu_disable (unsigned int cpu); +#endif /* __ASM_ARCH_SETUP_H */
arch/arm/mach-ux500/platsmp.c +10 -4
@@ -58,7 +58,7 @@ static void __iomem *scu_base_addr(void)static DEFINE_SPINLOCK (boot_lock); -void __cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit ux500_secondary_init (unsigned int cpu) {/* * if any interrupts are already enabled for the primary
@@ -80,7 +80,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)spin_unlock (&boot_lock); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +static int __cpuinit ux500_boot_secondary (unsigned int cpu,struct task_struct *idle) {unsigned long timeout;
@@ -145,7 +145,7 @@ static void __init wakeup_secondary(void)* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init ux500_smp_init_cpus (void ) {void __iomem *scu_base =scu_base_addr ();unsigned int i, ncores;
@@ -165,9 +165,15 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init ux500_smp_prepare_cpus (unsigned int max_cpus) {scu_enable (scu_base_addr ());wakeup_secondary (); } + +struct smp_ops ux500_smp_ops__initdata = { + smp_init_ops(ux500) + smp_secondary_ops(ux500) +smp_hotplug_ops (ux500) +};
Signature · 1 line
1.7.10.3
PATCH v8 8/13 ARM: convert shmobile SMP to smp_ops
In reply to Marc ZyngierConvert shmobile SMP platforms to use the smp_ops to provide their SMP and CPU hotplug operations.
--- arch/arm/mach-shmobile/board-ag5evm.c | 1 + arch/arm/mach-shmobile/board-kota2.c | 1 + arch/arm/mach-shmobile/board-kzm9d.c | 1 + arch/arm/mach-shmobile/board-kzm9g.c | 1 + arch/arm/mach-shmobile/board-marzen.c | 1 + arch/arm/mach-shmobile/hotplug.c | 26 ++++++-- arch/arm/mach-shmobile/include/mach/common.h | 19 ++---- arch/arm/mach-shmobile/include/mach/emev2.h | 8 +-- arch/arm/mach-shmobile/include/mach/r8a7779.h | 6 ++ arch/arm/mach-shmobile/include/mach/sh73a0.h | 4 ++ arch/arm/mach-shmobile/platsmp.c | 86 +------------------------ arch/arm/mach-shmobile/setup-emev2.c | 1 + arch/arm/mach-shmobile/smp-emev2.c | 21 ++++-- arch/arm/mach-shmobile/smp-r8a7779.c | 21 ++++-- arch/arm/mach-shmobile/smp-sh73a0.c | 22 +++++-- 15 files changed, 101 insertions(+), 118 deletions(-)
arch/arm/mach-shmobile/board-ag5evm.c +1 -0
@@ -574,6 +574,7 @@ static void __init ag5evm_init(void) } MACHINE_START(AG5EVM, "ag5evm") +smp_ops (sh73a0_smp_ops) .map_io = sh73a0_map_io, .init_early = sh73a0_add_early_devices, .nr_irqs = NR_IRQS_LEGACY,
arch/arm/mach-shmobile/board-kota2.c +1 -0
@@ -515,6 +515,7 @@ static void __init kota2_init(void) } MACHINE_START(KOTA2, "kota2") +smp_ops (sh73a0_smp_ops) .map_io = sh73a0_map_io, .init_early = sh73a0_add_early_devices, .nr_irqs = NR_IRQS_LEGACY,
arch/arm/mach-shmobile/board-kzm9d.c +1 -0
@@ -74,6 +74,7 @@ static const char *kzm9d_boards_compat_dt[] __initdata = { }; DT_MACHINE_START(KZM9D_DT, "kzm9d") +smp_ops (emev2_smp_ops) .map_io = emev2_map_io, .init_early = emev2_add_early_devices, .nr_irqs = NR_IRQS_LEGACY,
arch/arm/mach-shmobile/board-kzm9g.c +1 -0
@@ -449,6 +449,7 @@ static const char *kzm9g_boards_compat_dt[] __initdata = { }; DT_MACHINE_START(KZM9G_DT, "kzm9g") +smp_ops (sh73a0_smp_ops) .map_io = sh73a0_map_io, .init_early = sh73a0_add_early_devices, .nr_irqs = NR_IRQS_LEGACY,
arch/arm/mach-shmobile/board-marzen.c +1 -0
@@ -92,6 +92,7 @@ static void __init marzen_init(void) } MACHINE_START(MARZEN, "marzen") +smp_ops (r8a7779_smp_ops) .map_io = r8a7779_map_io, .init_early = r8a7779_add_early_devices, .nr_irqs = NR_IRQS_LEGACY,
arch/arm/mach-shmobile/hotplug.c +21 -5
@@ -14,12 +14,21 @@#include <linux/smp.h> #include <linux/cpumask.h> #include <linux/delay.h> +#include <linux/of.h> #include <mach/common.h> +#include <mach/r8a7779.h> +#include <mach/emev2.h> #include <asm/cacheflush.h> +#include <asm/mach-types.h> static cpumask_t dead_cpus; -int platform_cpu_kill (unsigned int cpu) +#include <mach/common.h> + +#define is_r8a7779 () machine_is_marzen() +#define is_emev2 () of_machine_is_compatible("renesas,emev2") + +int shmobile_cpu_kill (unsigned int cpu) {int k;
@@ -28,8 +37,15 @@ int platform_cpu_kill(unsigned int cpu)* finish before asking SoC-specific code to power off the CPU core. */ for (k =0 ; k <1000 ; k++) { -if (cpumask_test_cpu (cpu, &dead_cpus)) -return shmobile_platform_cpu_kill (cpu); +if (cpumask_test_cpu (cpu, &dead_cpus)) { +if (is_r8a7779 ()) +return r8a7779_platform_cpu_kill (cpu); + +if (is_emev2 ()) +return emev2_platform_cpu_kill (cpu); + +return 1 ; + }mdelay (1 ); }
@@ -37,7 +53,7 @@ int platform_cpu_kill(unsigned int cpu)return 0 ; } -void platform_cpu_die (unsigned int cpu) +void shmobile_cpu_die (unsigned int cpu) {/* hardware shutdown code running on the CPU that is being offlined */ flush_cache_all ();
@@ -60,7 +76,7 @@ void platform_cpu_die(unsigned int cpu) } } -int platform_cpu_disable (unsigned int cpu) +int shmobile_cpu_disable (unsigned int cpu) {cpumask_clear_cpu (cpu, &dead_cpus);/*
arch/arm/mach-shmobile/include/mach/common.h +7 -12
@@ -4,11 +4,10 @@extern void shmobile_earlytimer_init (void );extern struct sys_timer shmobile_timer;extern void shmobile_setup_delay (unsigned int max_cpu_core_mhz, -unsigned int mult,unsigned int div); +unsigned int mult,unsigned int div);struct twd_local_timer ;extern void shmobile_setup_console (void );extern void shmobile_secondary_vector (void ); -extern int shmobile_platform_cpu_kill (unsigned int cpu);struct clk ;extern int shmobile_clk_init (void );extern void shmobile_handle_irq_intc (struct pt_regs *);
@@ -58,11 +57,6 @@ extern struct clk sh73a0_extal2_clk;extern struct clk sh73a0_extcki_clk;extern struct clk sh73a0_extalr_clk; -extern unsigned int sh73a0_get_core_count (void ); -extern void sh73a0_secondary_init (unsigned int cpu); -extern int sh73a0_boot_secondary (unsigned int cpu); -extern void sh73a0_smp_prepare_cpus (void ); -extern void r8a7740_init_irq (void );extern void r8a7740_map_io (void );extern void r8a7740_add_early_devices (void );
@@ -78,11 +72,6 @@ extern void r8a7779_clock_init(void);extern void r8a7779_pinmux_init (void );extern void r8a7779_pm_init (void ); -extern unsigned int r8a7779_get_core_count (void ); -extern int r8a7779_platform_cpu_kill (unsigned int cpu); -extern void r8a7779_secondary_init (unsigned int cpu); -extern int r8a7779_boot_secondary (unsigned int cpu); -extern void r8a7779_smp_prepare_cpus (void );extern void r8a7779_register_twd (void );extern void shmobile_init_late (void );
@@ -99,4 +88,10 @@ int shmobile_cpuidle_init(void);static inline int shmobile_cpuidle_init (void ) {return 0 ; }#endif +extern int shmobile_cpu_kill (unsigned int cpu); +extern void shmobile_cpu_die (unsigned int cpu); +extern int shmobile_cpu_disable (unsigned int cpu); + +extern void shmobile_smp_init_cpus (unsigned int ncores); +#endif /* __ARCH_MACH_COMMON_H */
arch/arm/mach-shmobile/include/mach/emev2.h +4 -4
@@ -7,13 +7,13 @@ extern void emev2_add_early_devices(void);extern void emev2_add_standard_devices (void );extern void emev2_clock_init (void );extern void emev2_set_boot_vector (unsigned long value); -extern unsigned int emev2_get_core_count (void );extern int emev2_platform_cpu_kill (unsigned int cpu); -extern void emev2_secondary_init (unsigned int cpu); -extern int emev2_boot_secondary (unsigned int cpu); -extern void emev2_smp_prepare_cpus (void );#define EMEV2_GPIO_BASE 200#define EMEV2_GPIO_IRQ (n) (EMEV2_GPIO_BASE + (n)) +#include <asm/smp_ops.h> + +extern struct smp_ops emev2_smp_ops; +#endif /* __ASM_EMEV2_H__ */
arch/arm/mach-shmobile/include/mach/r8a7779.h +6 -0
@@ -360,4 +360,10 @@ extern void r8a7779_add_device_to_domain(struct r8a7779_pm_domain *r8a7779_pd,#define r8a7779_add_device_to_domain (pd, pdev) do { } while (0)#endif /* CONFIG_PM */ +extern int r8a7779_platform_cpu_kill (unsigned int cpu); + +#include <asm/smp_ops.h> + +extern struct smp_ops r8a7779_smp_ops; +#endif /* __ASM_R8A7779_H__ */
arch/arm/mach-shmobile/include/mach/sh73a0.h +4 -0
@@ -550,4 +550,8 @@ enum {#define SH73A0_PINT0_IRQ (irq) ((irq) + 700)#define SH73A0_PINT1_IRQ (irq) ((irq) + 732) +#include <asm/smp_ops.h> + +extern struct smp_ops sh73a0_smp_ops; +#endif /* __ASM_SH73A0_H__ */
arch/arm/mach-shmobile/platsmp.c +1 -85
99 lines not on this page · raw message
arch/arm/mach-shmobile/setup-emev2.c +1 -0
@@ -440,6 +440,7 @@ void __init emev2_init_irq_dt(void) } DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") +smp_ops (emev2_smp_ops) .init_early = emev2_init_delay, .nr_irqs = NR_IRQS_LEGACY, .init_irq = emev2_init_irq_dt,
arch/arm/mach-shmobile/smp-emev2.c +17 -4
@@ -50,7 +50,7 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) } -unsigned int __init emev2_get_core_count (void ) +static unsigned int __init emev2_get_core_count (void ) {if (!scu_base) { scu_base =ioremap (EMEV2_SCU_BASE ,PAGE_SIZE );
@@ -67,12 +67,12 @@ int emev2_platform_cpu_kill(unsigned int cpu)return 0 ;/* not supported yet */ } -void __cpuinit emev2_secondary_init (unsigned int cpu) +static void __cpuinit emev2_secondary_init (unsigned int cpu) {gic_secondary_init (0 ); } -int __cpuinit emev2_boot_secondary (unsigned int cpu) +static int __cpuinit emev2_boot_secondary (unsigned int cpu,struct task_struct *idle) { cpu =cpu_logical_map (cpu);
@@ -86,7 +86,7 @@ int __cpuinit emev2_boot_secondary(unsigned int cpu)return 0 ; } -void __init emev2_smp_prepare_cpus (void ) +static void __init emev2_smp_prepare_cpus (unsigned int max_cpus) {int cpu =cpu_logical_map (0 );
@@ -95,3 +95,16 @@ void __init emev2_smp_prepare_cpus(void)/* enable cache coherency on CPU0 */ modify_scu_cpu_psr (0 ,3 << (cpu *8 )); } + +static void __init emev2_smp_init_cpus (void ) +{ +unsigned int ncores =emev2_get_core_count (); + +shmobile_smp_init_cpus (ncores); +} + +struct smp_ops emev2_smp_ops__initdata = { + smp_init_ops(emev2) + smp_secondary_ops(emev2) +smp_hotplug_ops (shmobile) +};
arch/arm/mach-shmobile/smp-r8a7779.c +17 -4
@@ -87,7 +87,7 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)__raw_writel (tmp, scu_base +8 ); } -unsigned int __init r8a7779_get_core_count (void ) +static unsigned int __init r8a7779_get_core_count (void ) {void __iomem *scu_base =scu_base_addr ();
@@ -113,12 +113,12 @@ int r8a7779_platform_cpu_kill(unsigned int cpu)return ret ? ret :1 ; } -void __cpuinit r8a7779_secondary_init (unsigned int cpu) +static void __cpuinit r8a7779_secondary_init (unsigned int cpu) {gic_secondary_init (0 ); } -int __cpuinit r8a7779_boot_secondary (unsigned int cpu) +static int __cpuinit r8a7779_boot_secondary (unsigned int cpu,struct task_struct *idle) {struct r8a7779_pm_ch *ch =NULL ;int ret = -EIO ;
@@ -137,7 +137,7 @@ int __cpuinit r8a7779_boot_secondary(unsigned int cpu)return ret; } -void __init r8a7779_smp_prepare_cpus (void ) +static void __init r8a7779_smp_prepare_cpus (unsigned int max_cpus) {int cpu =cpu_logical_map (0 );
@@ -156,3 +156,16 @@ void __init r8a7779_smp_prepare_cpus(void)r8a7779_platform_cpu_kill (2 );r8a7779_platform_cpu_kill (3 ); } + +static void __init r8a7779_smp_init_cpus (void ) +{ +unsigned int ncores =r8a7779_get_core_count (); + +shmobile_smp_init_cpus (ncores); +} + +struct smp_ops r8a7779_smp_ops__initdata = { + smp_init_ops(r8a7779) + smp_secondary_ops(r8a7779) +smp_hotplug_ops (shmobile) +};
arch/arm/mach-shmobile/smp-sh73a0.c +18 -4
@@ -24,6 +24,7 @@#include <linux/io.h> #include <mach/common.h> #include <asm/smp_plat.h> +#include <mach/sh73a0.h> #include <asm/smp_scu.h> #include <asm/smp_twd.h> #include <asm/hardware/gic.h>
@@ -64,19 +65,19 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)__raw_writel (tmp, scu_base +8 ); } -unsigned int __init sh73a0_get_core_count (void ) +static unsigned int __init sh73a0_get_core_count (void ) {void __iomem *scu_base =scu_base_addr ();return scu_get_core_count (scu_base); } -void __cpuinit sh73a0_secondary_init (unsigned int cpu) +static void __cpuinit sh73a0_secondary_init (unsigned int cpu) {gic_secondary_init (0 ); } -int __cpuinit sh73a0_boot_secondary (unsigned int cpu) +static int __cpuinit sh73a0_boot_secondary (unsigned int cpu,struct task_struct *idle) { cpu =cpu_logical_map (cpu);
@@ -91,7 +92,7 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu)return 0 ; } -void __init sh73a0_smp_prepare_cpus (void ) +static void __init sh73a0_smp_prepare_cpus (unsigned int max_cpus) {int cpu =cpu_logical_map (0 );
@@ -104,3 +105,16 @@ void __init sh73a0_smp_prepare_cpus(void)/* enable cache coherency on CPU0 */ modify_scu_cpu_psr (0 ,3 << (cpu *8 )); } + +static void __init sh73a0_smp_init_cpus (void ) +{ +unsigned int ncores =sh73a0_get_core_count (); + +shmobile_smp_init_cpus (ncores); +} + +struct smp_ops sh73a0_smp_ops__initdata = { + smp_init_ops(sh73a0) + smp_secondary_ops(sh73a0) +smp_hotplug_ops (shmobile) +};
Signature · 1 line
1.7.10.3
PATCH v8 9/13 ARM: convert highbank to smp_ops
In reply to Marc ZyngierConvert the highbank platform to use the smp_ops to provide its SMP and CPU hotplug operations.
--- arch/arm/mach-highbank/core.h | 7 +++++++ arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/hotplug.c | 6 +++--- arch/arm/mach-highbank/platsmp.c | 14 ++++++++++---- 4 files changed, 21 insertions(+), 7 deletions(-)
arch/arm/mach-highbank/core.h +7 -0
@@ -1,3 +1,5 @@ +#include <asm/smp_ops.h> +extern void highbank_set_cpu_jump (int cpu,void *jump_addr);extern void highbank_clocks_init (void );extern void highbank_restart (char ,const char *);
@@ -8,3 +10,8 @@ extern void highbank_lluart_map_io(void);static inline void highbank_lluart_map_io (void ) {}#endif +extern int highbank_cpu_kill (unsigned int cpu); +extern void highbank_cpu_die (unsigned int cpu); +extern int highbank_cpu_disable (unsigned int cpu); + +extern struct smp_ops highbank_smp_ops;
arch/arm/mach-highbank/highbank.c +1 -0
@@ -141,6 +141,7 @@ static const char *highbank_match[] __initconst = { }; DT_MACHINE_START(HIGHBANK, "Highbank") +smp_ops (highbank_smp_ops) .map_io = highbank_map_io, .init_irq = highbank_init_irq, .timer = &highbank_timer,
arch/arm/mach-highbank/hotplug.c +3 -3
@@ -24,7 +24,7 @@extern void secondary_startup (void ); -int platform_cpu_kill (unsigned int cpu) +int highbank_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -33,7 +33,7 @@ int platform_cpu_kill(unsigned int cpu)* platform-specific code to shutdown a CPU * */ -void platform_cpu_die (unsigned int cpu) +void highbank_cpu_die (unsigned int cpu) {flush_cache_all ();
@@ -46,7 +46,7 @@ void platform_cpu_die(unsigned int cpu)panic ("highbank: cpu %d unexpectedly exit from shutdown\n" , cpu); } -int platform_cpu_disable (unsigned int cpu) +int highbank_cpu_disable (unsigned int cpu) {/* * CPU0 should not be shut down via hotplug. cpu_idle can WFI
arch/arm/mach-highbank/platsmp.c +10 -4
@@ -25,12 +25,12 @@extern void secondary_startup (void ); -void __cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit highbank_secondary_init (unsigned int cpu) {gic_secondary_init (0 ); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +static int __cpuinit highbank_boot_secondary (unsigned int cpu,struct task_struct *idle) {gic_raise_softirq (cpumask_of (cpu),0 );return 0 ;
@@ -40,7 +40,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init highbank_smp_init_cpus (void ) {unsigned int i, ncores;
@@ -61,7 +61,7 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init highbank_smp_prepare_cpus (unsigned int max_cpus) {int i;
@@ -76,3 +76,9 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)for (i =1 ; i < max_cpus; i++)highbank_set_cpu_jump (i, secondary_startup); } + +struct smp_ops highbank_smp_ops__initdata = { + smp_init_ops(highbank) + smp_secondary_ops(highbank) +smp_hotplug_ops (highbank) +};
Signature · 1 line
1.7.10.3
PATCH v8 10/13 ARM: convert imx6q to smp_ops
In reply to Marc ZyngierConvert the imx6q platform to use the smp_ops to provide its SMP and CPU hotplug operations.
--- arch/arm/mach-imx/hotplug.c | 6 +++--- arch/arm/mach-imx/mach-imx6q.c | 2 ++ arch/arm/mach-imx/platsmp.c | 15 +++++++++++---- arch/arm/plat-mxc/include/mach/common.h | 8 ++++++++ 4 files changed, 24 insertions(+), 7 deletions(-)
arch/arm/mach-imx/hotplug.c +3 -3
@@ -14,7 +14,7 @@#include <asm/cacheflush.h> #include <mach/common.h> -int platform_cpu_kill (unsigned int cpu) +int imx_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -24,7 +24,7 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void platform_cpu_die (unsigned int cpu) +void imx_cpu_die (unsigned int cpu) {flush_cache_all ();imx_enable_cpu (cpu, false);
@@ -34,7 +34,7 @@ void platform_cpu_die(unsigned int cpu)panic ("cpu %d unexpectedly exit from shutdown\n" , cpu); } -int platform_cpu_disable (unsigned int cpu) +int imx_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-imx/mach-imx6q.c +2 -0
@@ -25,6 +25,7 @@#include <linux/phy.h> #include <linux/micrel_phy.h> #include <asm/smp_twd.h> +#include <asm/smp_ops.h> #include <asm/hardware/cache-l2x0.h> #include <asm/hardware/gic.h> #include <asm/mach/arch.h>
@@ -181,6 +182,7 @@ static const char *imx6q_dt_compat[] __initdata = { }; DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)") +smp_ops (imx_smp_ops) .map_io = imx6q_map_io, .init_irq = imx6q_init_irq, .handle_irq = imx6q_handle_irq,
arch/arm/mach-imx/platsmp.c +11 -4
@@ -14,6 +14,7 @@#include <linux/smp.h> #include <asm/page.h> #include <asm/smp_scu.h> +#include <asm/smp_ops.h> #include <asm/hardware/gic.h> #include <asm/mach/map.h> #include <mach/common.h>
@@ -41,7 +42,7 @@ void __init imx_scu_map_io(void) scu_base =IMX_IO_ADDRESS (base); } -void __cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit imx_secondary_init (unsigned int cpu) {/* * if any interrupts are already enabled for the primary
@@ -51,7 +52,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)gic_secondary_init (0 ); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +static int __cpuinit imx_boot_secondary (unsigned int cpu,struct task_struct *idle) {imx_set_cpu_jump (cpu, v7_secondary_startup);imx_enable_cpu (cpu, true);
@@ -62,7 +63,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +static void __init imx_smp_init_cpus (void ) {int i, ncores;
@@ -79,7 +80,13 @@ void imx_smp_prepare(void)scu_enable (scu_base); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init imx_smp_prepare_cpus (unsigned int max_cpus) {imx_smp_prepare (); } + +struct smp_ops imx_smp_ops__initdata = { + smp_init_ops(imx) + smp_secondary_ops(imx) +smp_hotplug_ops (imx) +};
arch/arm/plat-mxc/include/mach/common.h +8 -0
@@ -144,6 +144,10 @@ extern void imx53_smd_common_init(void);extern int imx6q_set_lpm (enum mxc_cpu_pwr_mode mode);extern void imx6q_clock_map_io (void ); +extern int imx_cpu_kill (unsigned int cpu); +extern void imx_cpu_die (unsigned int cpu); +extern int imx_cpu_disable (unsigned int cpu); +#ifdef CONFIG_PM extern void imx6q_pm_init (void );#else
@@ -156,4 +160,8 @@ extern int mx51_neon_fixup(void);static inline int mx51_neon_fixup (void ) {return 0 ; }#endif +struct smp_ops ; + +extern struct smp_ops imx_smp_ops; +#endif
Signature · 1 line
1.7.10.3
PATCH v8 11/13 ARM: convert spear13xx to smp_ops
In reply to Marc ZyngierConvert the spear13xx platforms to use the smp_ops to provide their SMP and CPU hotplug operations.
--- arch/arm/mach-spear13xx/hotplug.c | 6 +++--- arch/arm/mach-spear13xx/include/mach/generic.h | 7 +++++++ arch/arm/mach-spear13xx/platsmp.c | 16 ++++++++++++---- arch/arm/mach-spear13xx/spear1310.c | 1 + arch/arm/mach-spear13xx/spear1340.c | 1 + 5 files changed, 24 insertions(+), 7 deletions(-)
arch/arm/mach-spear13xx/hotplug.c +3 -3
@@ -79,7 +79,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) } } -int platform_cpu_kill (unsigned int cpu) +int spear13xx_cpu_kill (unsigned int cpu) {return 1 ; }
@@ -89,7 +89,7 @@ int platform_cpu_kill(unsigned int cpu)* * Called with IRQs disabled */ -void __cpuinit platform_cpu_die (unsigned int cpu) +void __cpuinit spear13xx_cpu_die (unsigned int cpu) {int spurious =0 ;
@@ -109,7 +109,7 @@ void __cpuinit platform_cpu_die(unsigned int cpu)pr_warn ("CPU%u: %u spurious wakeup calls\n" , cpu, spurious); } -int platform_cpu_disable (unsigned int cpu) +int spear13xx_cpu_disable (unsigned int cpu) {/* * we don't allow CPU 0 to be shutdown (it is still too special
arch/arm/mach-spear13xx/include/mach/generic.h +7 -0
@@ -16,6 +16,7 @@#include <linux/dmaengine.h> #include <asm/mach/time.h> +#include <asm/smp_ops.h> /* Add spear13xx structure declarations here */ extern struct sys_timer spear13xx_timer;
@@ -46,4 +47,10 @@ void __init spear1340_clk_init(void);static inline void spear1340_clk_init (void ) {}#endif +extern int spear13xx_cpu_disable (unsigned int cpu); +extern void spear13xx_cpu_die (unsigned int cpu); +extern int spear13xx_cpu_kill (unsigned int cpu); + +extern struct smp_ops spear13xx_smp_ops; +#endif /* __MACH_GENERIC_H */
arch/arm/mach-spear13xx/platsmp.c +12 -4
@@ -18,7 +18,9 @@#include <asm/cacheflush.h> #include <asm/hardware/gic.h> #include <asm/smp_scu.h> +#include <asm/smp_ops.h> #include <mach/spear.h> +#include <mach/generic.h> /* * control for which core is the next to come out of the secondary
@@ -30,7 +32,7 @@ static DEFINE_SPINLOCK(boot_lock);static void __iomem *scu_base =IOMEM (VA_SCU_BASE );extern void spear13xx_secondary_startup (void ); -void __cpuinit platform_secondary_init (unsigned int cpu) +void __cpuinit spear13xx_secondary_init (unsigned int cpu) {/* * if any interrupts are already enabled for the primary
@@ -53,7 +55,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)spin_unlock (&boot_lock); } -int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +int __cpuinit spear13xx_boot_secondary (unsigned int cpu,struct task_struct *idle) {unsigned long timeout;
@@ -97,7 +99,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)* Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. */ -void __init smp_init_cpus (void ) +void __init spear13xx_smp_init_cpus (void ) {unsigned int i, ncores =scu_get_core_count (scu_base);
@@ -113,7 +115,7 @@ void __init smp_init_cpus(void)set_smp_cross_call (gic_raise_softirq); } -void __init platform_smp_prepare_cpus (unsigned int max_cpus) +void __init spear13xx_smp_prepare_cpus (unsigned int max_cpus) {scu_enable (scu_base);
@@ -125,3 +127,9 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)*/ __raw_writel (virt_to_phys (spear13xx_secondary_startup),SYS_LOCATION ); } + +struct smp_ops spear13xx_smp_ops__initdata = { + smp_init_ops(spear13xx) + smp_secondary_ops(spear13xx) +smp_hotplug_ops (spear13xx) +};
arch/arm/mach-spear13xx/spear1310.c +1 -0
@@ -78,6 +78,7 @@ static void __init spear1310_map_io(void) } DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree") +smp_ops (spear13xx_smp_ops) .map_io = spear1310_map_io, .init_irq = spear13xx_dt_init_irq, .handle_irq = gic_handle_irq,
arch/arm/mach-spear13xx/spear1340.c +1 -0
@@ -182,6 +182,7 @@ static const char * const spear1340_dt_board_compat[] = { }; DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree") +smp_ops (spear13xx_smp_ops) .map_io = spear13xx_map_io, .init_irq = spear13xx_dt_init_irq, .handle_irq = gic_handle_irq,
Signature · 1 line
1.7.10.3
PATCH v8 11/13 ARM: convert spear13xx to smp_ops
Quoted 5 lines · Marc Zyngier
Convert the spear13xx platforms to use the
smp_opsto provide their SMP and CPU hotplug operations.Cc Viresh Kumar <[email protected]>Signed-off-by Marc Zyngier <[email protected]>
Quoted 7 lines
---
?arch/arm/mach-spear13xx/hotplug.c ? ? ? ? ? ? ?| ? ?6 +++--- ?arch/arm/mach-spear13xx/include/mach/generic.h | ? ?7 +++++++ ?arch/arm/mach-spear13xx/platsmp.c ? ? ? ? ? ? ?| ? 16 ++++++++++++---- ?arch/arm/mach-spear13xx/spear1310.c ? ? ? ? ? ?| ? ?1 + ?arch/arm/mach-spear13xx/spear1340.c ? ? ? ? ? ?| ? ?1 +?5 files changed, 24 insertions(+), 7 deletions(-)
PATCH v8 12/13 ARM: smp: Make smp_ops mandatory for SMP platforms
In reply to Marc ZyngierNow that all SMP platforms have been converted to smp_ops, remove the "weak" attribute from the hooks in smp.c, and make the functions static wherever possible.
--- arch/arm/include/asm/smp.h | 14 -------------- arch/arm/kernel/smp.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 23 deletions(-)
arch/arm/include/asm/smp.h +0 -14
@@ -60,15 +60,6 @@ extern int boot_secondary(unsigned int cpu, struct task_struct *);*/ asmlinkage void secondary_start_kernel(void); -/* -* Perform platform specific initialisation of the specified CPU. -*/ -extern void platform_secondary_init (unsigned int cpu); - -/* -* Initialize cpu_possible map, and enable coherency -*/ -extern void platform_smp_prepare_cpus (unsigned int );/* * Initial data for bringing up a secondary CPU.
@@ -81,15 +72,10 @@ struct secondary_data {extern struct secondary_data secondary_data;extern int __cpu_disable (void ); -extern int platform_cpu_disable (unsigned int cpu);extern void __cpu_die (unsigned int cpu);extern void cpu_die (void ); -extern void platform_cpu_die (unsigned int cpu); -extern int platform_cpu_kill (unsigned int cpu); -extern void platform_cpu_enable (unsigned int cpu); -extern void arch_send_call_function_single_ipi (int cpu);extern void arch_send_call_function_ipi_mask (const struct cpumask *mask);
arch/arm/kernel/smp.c +9 -9
@@ -131,25 +131,25 @@ void __init smp_ops_register(struct smp_ops *smp_ops)#endif } -void __attribute__((weak))__init smp_init_cpus (void ) +void __init smp_init_cpus (void ) {if (smp_init_ops && smp_init_ops->smp_init_cpus) smp_init_ops->smp_init_cpus (); } -void __attribute__((weak))__init platform_smp_prepare_cpus (unsigned int max_cpus) +static void __init platform_smp_prepare_cpus (unsigned int max_cpus) {if (smp_init_ops && smp_init_ops->smp_prepare_cpus) smp_init_ops->smp_prepare_cpus (max_cpus); } -void __attribute__((weak))__cpuinit platform_secondary_init (unsigned int cpu) +static void __cpuinit platform_secondary_init (unsigned int cpu) {if (smp_secondary_ops && smp_secondary_ops->smp_secondary_init) smp_secondary_ops->smp_secondary_init (cpu); } -int __attribute__((weak))__cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) +int __cpuinit boot_secondary (unsigned int cpu,struct task_struct *idle) {if (smp_secondary_ops && smp_secondary_ops->smp_boot_secondary)return smp_secondary_ops->smp_boot_secondary (cpu, idle);
@@ -159,20 +159,20 @@ int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task#ifdef CONFIG_HOTPLUG_CPU static void percpu_timer_stop (void ); -int __attribute__((weak))platform_cpu_kill (unsigned int cpu) +static int platform_cpu_kill (unsigned int cpu) {if (smp_hotplug_ops && smp_hotplug_ops->cpu_kill)return smp_hotplug_ops->cpu_kill (cpu);return 0 ; } -void __attribute__((weak))platform_cpu_die (unsigned int cpu) +static void platform_cpu_die (unsigned int cpu) {if (smp_hotplug_ops && smp_hotplug_ops->cpu_die) smp_hotplug_ops->cpu_die (cpu); } -int __attribute__((weak))platform_cpu_disable (unsigned int cpu) +static int platform_cpu_disable (unsigned int cpu) {if (smp_hotplug_ops && smp_hotplug_ops->cpu_disable)return smp_hotplug_ops->cpu_disable (cpu);
@@ -182,7 +182,7 @@ int __attribute__((weak)) platform_cpu_disable(unsigned int cpu)/* * __cpu_disable runs on the processor to be shutdown. */ -int __cpu_disable (void ) +int __cpuinit __cpu_disable (void ) {unsigned int cpu =smp_processor_id ();int ret;
@@ -225,7 +225,7 @@ static DECLARE_COMPLETION(cpu_died);* called on the thread which is asking for a CPU to be shutdown - * waits until shutdown has completed, or it is timed out. */ -void __cpu_die (unsigned int cpu) +void __cpuinit __cpu_die (unsigned int cpu) {if (!wait_for_completion_timeout (&cpu_died,msecs_to_jiffies (5000 ))) {pr_err ("CPU%u: cpu didn't die\n" , cpu);
Signature · 1 line
1.7.10.3
PATCH v8 13/13 ARM: consolidate pen_release instead of having per platform definitions
In reply to Marc ZyngierAlmost each SMP platform defines pen_release to manage booting secondary CPUs. This of course clashes with the single zImage effort.
Add the pen_release definition to the ARM SMP code, and remove all others. This should only be used by platforms which lack any kind of CPU power management...
--- arch/arm/include/asm/smp.h | 1 + arch/arm/kernel/smp.c | 6 ++++++ arch/arm/mach-exynos/hotplug.c | 2 -- arch/arm/mach-exynos/platsmp.c | 7 ------- arch/arm/mach-msm/hotplug.c | 2 -- arch/arm/mach-msm/platsmp.c | 5 ----- arch/arm/mach-realview/hotplug.c | 2 -- arch/arm/mach-spear13xx/hotplug.c | 2 -- arch/arm/mach-spear13xx/platsmp.c | 5 ----- arch/arm/mach-ux500/hotplug.c | 2 -- arch/arm/mach-ux500/platsmp.c | 6 ------ arch/arm/mach-vexpress/hotplug.c | 2 -- arch/arm/plat-versatile/platsmp.c | 6 ------ 13 files changed, 7 insertions(+), 41 deletions(-)
arch/arm/include/asm/smp.h +1 -0
@@ -70,6 +70,7 @@ struct secondary_data {void *stack; };extern struct secondary_data secondary_data; +extern volatile int pen_release;extern int __cpu_disable (void );
arch/arm/kernel/smp.c +6 -0
@@ -51,6 +51,12 @@*/ struct secondary_data secondary_data; +/* +* control for which core is the next to come out of the secondary +* boot "holding pen" +*/ +volatile int __cpuinitdata pen_release =-1 ; +enum ipi_msg_type {IPI_TIMER =2 ,IPI_RESCHEDULE ,
arch/arm/mach-exynos/hotplug.c +0 -2
@@ -23,8 +23,6 @@#include "common.h" -extern volatile int pen_release; -static inline void cpu_enter_lowpower (void ) {unsigned int v;
arch/arm/mach-exynos/platsmp.c +0 -7
@@ -40,13 +40,6 @@ extern void exynos4_secondary_startup(void); S5P_INFORM5 : S5P_VA_SYSRAM)/* -* control for which core is the next to come out of the secondary -* boot "holding pen" -*/ - -volatile int __cpuinitdata pen_release = -1; - -/* * Write pen_release in a way that is guaranteed to be visible to all * observers, irrespective of whether they're taking part in coherency * or not. This is necessary for the hotplug code to work reliably.
arch/arm/mach-msm/hotplug.c +0 -2
@@ -15,8 +15,6 @@#include "core.h" -extern volatile int pen_release; -static inline void cpu_enter_lowpower (void ) {/* Just flush the cache. Changing the coherency is not yet
arch/arm/mach-msm/platsmp.c +0 -5
@@ -35,11 +35,6 @@#define GIC_PPI_EDGE_MASK 0xFFFFD7FFextern void msm_secondary_startup (void ); -/* -* control for which core is the next to come out of the secondary -* boot "holding pen". -*/ -volatile int pen_release =-1 ;static DEFINE_SPINLOCK (boot_lock);
arch/arm/mach-realview/hotplug.c +0 -2
@@ -16,8 +16,6 @@#include <asm/cp15.h> #include <asm/smp_plat.h> -extern volatile int pen_release; -static inline void cpu_enter_lowpower (void ) {unsigned int v;
arch/arm/mach-spear13xx/hotplug.c +0 -2
@@ -17,8 +17,6 @@#include <asm/cp15.h> #include <asm/smp_plat.h> -extern volatile int pen_release; -static inline void cpu_enter_lowpower (void ) {unsigned int v;
arch/arm/mach-spear13xx/platsmp.c +0 -5
@@ -22,11 +22,6 @@#include <mach/spear.h> #include <mach/generic.h> -/* -* control for which core is the next to come out of the secondary -* boot "holding pen" -*/ -volatile int __cpuinitdata pen_release =-1 ;static DEFINE_SPINLOCK (boot_lock);static void __iomem *scu_base =IOMEM (VA_SCU_BASE );
arch/arm/mach-ux500/hotplug.c +0 -2
@@ -17,8 +17,6 @@#include <mach/setup.h> -extern volatile int pen_release; -static inline void platform_do_lowpower (unsigned int cpu) {flush_cache_all ();
arch/arm/mach-ux500/platsmp.c +0 -6
@@ -28,12 +28,6 @@extern void u8500_secondary_startup (void );/* -* control for which core is the next to come out of the secondary -* boot "holding pen" -*/ -volatile int pen_release =-1 ; - -/* * Write pen_release in a way that is guaranteed to be visible to all * observers, irrespective of whether they're taking part in coherency * or not. This is necessary for the hotplug code to work reliably.
arch/arm/mach-vexpress/hotplug.c +0 -2
@@ -16,8 +16,6 @@#include <asm/smp_plat.h> #include <asm/cp15.h> -extern volatile int pen_release; -static inline void cpu_enter_lowpower (void ) {unsigned int v;
arch/arm/plat-versatile/platsmp.c +0 -6
@@ -20,12 +20,6 @@#include <asm/hardware/gic.h> /* -* control for which core is the next to come out of the secondary -* boot "holding pen" -*/ -volatile int __cpuinitdata pen_release =-1 ; - -/* * Write pen_release in a way that is guaranteed to be visible to all * observers, irrespective of whether they're taking part in coherency * or not. This is necessary for the hotplug code to work reliably.
Signature · 1 line
1.7.10.3