aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2013-10-30 21:21:09 -0400
committerKumar Gala <galak@codeaurora.org>2014-02-11 16:00:37 -0500
commit6c3ff8b11a16ec69199ab85b74a5fae6d9c59db7 (patch)
tree79bf0dffed2a312578dd2a75048f6d65d21a6e8d /include
parentcf1e8f0cd665e2a9966d2bee4e11ecc0938ff166 (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 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index bc2121fa9132..bd02ca7a1d55 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -167,6 +167,15 @@
167#define CLK_OF_TABLES() 167#define CLK_OF_TABLES()
168#endif 168#endif
169 169
170#ifdef CONFIG_SMP
171#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \
172 VMLINUX_SYMBOL(__cpu_method_of_table_begin) = .; \
173 *(__cpu_method_of_table) \
174 VMLINUX_SYMBOL(__cpu_method_of_table_end) = .;
175#else
176#define CPU_METHOD_OF_TABLES()
177#endif
178
170#define KERNEL_DTB() \ 179#define KERNEL_DTB() \
171 STRUCT_ALIGN(); \ 180 STRUCT_ALIGN(); \
172 VMLINUX_SYMBOL(__dtb_start) = .; \ 181 VMLINUX_SYMBOL(__dtb_start) = .; \
@@ -491,6 +500,7 @@
491 MEM_DISCARD(init.rodata) \ 500 MEM_DISCARD(init.rodata) \
492 CLK_OF_TABLES() \ 501 CLK_OF_TABLES() \
493 CLKSRC_OF_TABLES() \ 502 CLKSRC_OF_TABLES() \
503 CPU_METHOD_OF_TABLES() \
494 KERNEL_DTB() \ 504 KERNEL_DTB() \
495 IRQCHIP_OF_MATCH_TABLE() 505 IRQCHIP_OF_MATCH_TABLE()
496 506