diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2013-10-30 21:21:09 -0400 |
---|---|---|
committer | Kumar Gala <galak@codeaurora.org> | 2014-02-11 16:00:37 -0500 |
commit | 6c3ff8b11a16ec69199ab85b74a5fae6d9c59db7 (patch) | |
tree | 79bf0dffed2a312578dd2a75048f6d65d21a6e8d /arch/arm/include | |
parent | cf1e8f0cd665e2a9966d2bee4e11ecc0938ff166 (diff) |
ARM: Introduce CPU_METHOD_OF_DECLARE() for cpu hotplug/smp
The goal of multi-platform kernels is to remove the need for mach
directories and machine descriptors. To further that goal,
introduce CPU_METHOD_OF_DECLARE() to allow cpu hotplug/smp
support to be separated from the machine descriptors.
Implementers should specify an enable-method property in their
cpus node and then implement a matching set of smp_ops in their
hotplug/smp code, wiring it up with the CPU_METHOD_OF_DECLARE()
macro. When the kernel is compiled we'll collect all the
enable-method smp_ops into one section for use at boot.
At boot time we'll look for an enable-method in each cpu node and
try to match that against all known CPU enable methods in the
kernel. If there are no enable-methods in the cpu nodes we
fallback to the cpus node and try to use any enable-method found
there. If that doesn't work we fall back to the old way of using
the machine descriptor.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/smp.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 22a3b9b5d4a1..772435b08207 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -114,6 +114,15 @@ struct smp_operations { | |||
114 | #endif | 114 | #endif |
115 | }; | 115 | }; |
116 | 116 | ||
117 | struct of_cpu_method { | ||
118 | const char *method; | ||
119 | struct smp_operations *ops; | ||
120 | }; | ||
121 | |||
122 | #define CPU_METHOD_OF_DECLARE(name, _method, _ops) \ | ||
123 | static const struct of_cpu_method __cpu_method_of_table_##name \ | ||
124 | __used __section(__cpu_method_of_table) \ | ||
125 | = { .method = _method, .ops = _ops } | ||
117 | /* | 126 | /* |
118 | * set platform specific SMP operations | 127 | * set platform specific SMP operations |
119 | */ | 128 | */ |