aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-03-24 17:11:54 -0400
committerRob Herring <robh@kernel.org>2014-05-20 15:24:41 -0400
commit9a721c41113a50ccbe184d67a5e551feb99e36a9 (patch)
treefb1aa591be0b69130514f1f0289f0f7f57372a9a
parent735e0da7fc55a0456476f6b40f85024f68f87092 (diff)
ARM: align cpu_method_of_table naming
The cpu_method_of_table is the oddball of the various OF linker sections. In preparation to have common linker section definitions, align the cpu_method_of_table with the other definitions for the naming and ending with a blank struct. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rob Herring <robh@kernel.org> Cc: Russell King <linux@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/devtree.c11
-rw-r--r--include/asm-generic/vmlinux.lds.h4
2 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 3e5a2056a466..ea9ce92a4b52 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -33,18 +33,21 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
33} 33}
34 34
35#ifdef CONFIG_SMP 35#ifdef CONFIG_SMP
36extern struct of_cpu_method __cpu_method_of_table_begin[]; 36extern struct of_cpu_method __cpu_method_of_table[];
37extern struct of_cpu_method __cpu_method_of_table_end[]; 37
38static const struct of_cpu_method __cpu_method_of_table_sentinel
39 __used __section(__cpu_method_of_table_end);
40
38 41
39static int __init set_smp_ops_by_method(struct device_node *node) 42static int __init set_smp_ops_by_method(struct device_node *node)
40{ 43{
41 const char *method; 44 const char *method;
42 struct of_cpu_method *m = __cpu_method_of_table_begin; 45 struct of_cpu_method *m = __cpu_method_of_table;
43 46
44 if (of_property_read_string(node, "enable-method", &method)) 47 if (of_property_read_string(node, "enable-method", &method))
45 return 0; 48 return 0;
46 49
47 for (; m < __cpu_method_of_table_end; m++) 50 for (; m->method; m++)
48 if (!strcmp(m->method, method)) { 51 if (!strcmp(m->method, method)) {
49 smp_set_ops(m->ops); 52 smp_set_ops(m->ops);
50 return 1; 53 return 1;
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index b1c6f9d0c4ff..fe57c5f1bd1a 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -179,9 +179,9 @@
179 179
180#ifdef CONFIG_SMP 180#ifdef CONFIG_SMP
181#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \ 181#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \
182 VMLINUX_SYMBOL(__cpu_method_of_table_begin) = .; \ 182 VMLINUX_SYMBOL(__cpu_method_of_table) = .; \
183 *(__cpu_method_of_table) \ 183 *(__cpu_method_of_table) \
184 VMLINUX_SYMBOL(__cpu_method_of_table_end) = .; 184 *(__cpu_method_of_table_end)
185#else 185#else
186#define CPU_METHOD_OF_TABLES() 186#define CPU_METHOD_OF_TABLES()
187#endif 187#endif