Skip to content

Commit

Permalink
ARM: align cpu_method_of_table naming
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rob Herring committed May 20, 2014
1 parent 735e0da commit 9a721c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions arch/arm/kernel/devtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,21 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
}

#ifdef CONFIG_SMP
extern struct of_cpu_method __cpu_method_of_table_begin[];
extern struct of_cpu_method __cpu_method_of_table_end[];
extern struct of_cpu_method __cpu_method_of_table[];

static const struct of_cpu_method __cpu_method_of_table_sentinel
__used __section(__cpu_method_of_table_end);


static int __init set_smp_ops_by_method(struct device_node *node)
{
const char *method;
struct of_cpu_method *m = __cpu_method_of_table_begin;
struct of_cpu_method *m = __cpu_method_of_table;

if (of_property_read_string(node, "enable-method", &method))
return 0;

for (; m < __cpu_method_of_table_end; m++)
for (; m->method; m++)
if (!strcmp(m->method, method)) {
smp_set_ops(m->ops);
return 1;
Expand Down
4 changes: 2 additions & 2 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@

#ifdef CONFIG_SMP
#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \
VMLINUX_SYMBOL(__cpu_method_of_table_begin) = .; \
VMLINUX_SYMBOL(__cpu_method_of_table) = .; \
*(__cpu_method_of_table) \
VMLINUX_SYMBOL(__cpu_method_of_table_end) = .;
*(__cpu_method_of_table_end)
#else
#define CPU_METHOD_OF_TABLES()
#endif
Expand Down

0 comments on commit 9a721c4

Please sign in to comment.