diff options
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/cpu_ops.c | 16 | ||||
-rw-r--r-- | arch/arm64/kernel/psci.c | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/smp.c | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/smp_spin_table.c | 6 |
4 files changed, 13 insertions, 11 deletions
diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c index b6bd7d447768..3c63506b6437 100644 --- a/arch/arm64/kernel/cpu_ops.c +++ b/arch/arm64/kernel/cpu_ops.c @@ -35,16 +35,18 @@ static const struct cpu_operations *supported_cpu_ops[] __initconst = { NULL, }; +extern struct cpu_operations __cpu_method_of_table[]; +static const struct cpu_operations *__cpu_method_of_table_sentinel + __used __section(__cpu_method_of_table_end); + static const struct cpu_operations * __init cpu_get_ops(const char *name) { - const struct cpu_operations **ops = supported_cpu_ops; - - while (*ops) { - if (!strcmp(name, (*ops)->name)) - return *ops; + const struct cpu_operations **start = (void *)__cpu_method_of_table; - ops++; - } + for (; *start; start++) { + if (!strcmp((*start)->name, name)) + return *start; + }; return NULL; } diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index aa94a88f6279..d8f6991fc9c8 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c @@ -235,3 +235,4 @@ const struct cpu_operations cpu_psci_ops = { #endif }; +CPU_METHOD_OF_DECLARE(psci, &cpu_psci_ops); diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index dbdaacddd9a5..38d3b6bf27ac 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -63,6 +63,7 @@ * where to place its SVC stack */ struct secondary_data secondary_data; +volatile unsigned long secondary_holding_pen_release = INVALID_HWID; enum ipi_msg_type { IPI_RESCHEDULE, diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c index aef3605a8c47..3d5325d99e8e 100644 --- a/arch/arm64/kernel/smp_spin_table.c +++ b/arch/arm64/kernel/smp_spin_table.c @@ -28,9 +28,6 @@ #include <asm/io.h> #include <asm/smp_plat.h> -extern void secondary_holding_pen(void); -volatile unsigned long secondary_holding_pen_release = INVALID_HWID; - static phys_addr_t cpu_release_addr[NR_CPUS]; /* @@ -125,9 +122,10 @@ static int smp_spin_table_cpu_boot(unsigned int cpu) return 0; } -const struct cpu_operations smp_spin_table_ops = { +static const struct cpu_operations smp_spin_table_ops = { .name = "spin-table", .cpu_init = smp_spin_table_cpu_init, .cpu_prepare = smp_spin_table_cpu_prepare, .cpu_boot = smp_spin_table_cpu_boot, }; +CPU_METHOD_OF_DECLARE(spin_table, &smp_spin_table_ops); |