aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/smp_spin_table.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2013-10-24 20:30:15 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2013-10-25 11:33:20 +0100
commitcd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab (patch)
tree47876c066537a8c251ad483637c0f4d70dab5cf4 /arch/arm64/kernel/smp_spin_table.c
parentarm64: unify smp_psci.c and psci.c (diff)
downloadlinux-dev-cd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab.tar.xz
linux-dev-cd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab.zip
arm64: reorganise smp_enable_ops
For hotplug support, we're going to want a place to store operations that do more than bring CPUs online, and it makes sense to group these with our current smp_enable_ops. For cpuidle support, we'll want to group additional functions, and we may want them even for UP kernels. This patch renames smp_enable_ops to the more general cpu_operations, and pulls the definitions out of smp code such that they can be used in UP kernels. While we're at it, fix up instances of the cpu parameter to be an unsigned int, drop the init markings and rename the *_cpu functions to cpu_* to reduce future churn when cpu_operations is extended. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to '')
-rw-r--r--arch/arm64/kernel/smp_spin_table.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c
index 7c35fa682f76..a8b76e4eccff 100644
--- a/arch/arm64/kernel/smp_spin_table.c
+++ b/arch/arm64/kernel/smp_spin_table.c
@@ -21,10 +21,11 @@
#include <linux/smp.h>
#include <asm/cacheflush.h>
+#include <asm/cpu_ops.h>
static phys_addr_t cpu_release_addr[NR_CPUS];
-static int __init smp_spin_table_init_cpu(struct device_node *dn, int cpu)
+static int smp_spin_table_cpu_init(struct device_node *dn, unsigned int cpu)
{
/*
* Determine the address from which the CPU is polling.
@@ -40,7 +41,7 @@ static int __init smp_spin_table_init_cpu(struct device_node *dn, int cpu)
return 0;
}
-static int __init smp_spin_table_prepare_cpu(int cpu)
+static int smp_spin_table_cpu_prepare(unsigned int cpu)
{
void **release_addr;
@@ -59,8 +60,8 @@ static int __init smp_spin_table_prepare_cpu(int cpu)
return 0;
}
-const struct smp_enable_ops smp_spin_table_ops __initconst = {
+const struct cpu_operations smp_spin_table_ops = {
.name = "spin-table",
- .init_cpu = smp_spin_table_init_cpu,
- .prepare_cpu = smp_spin_table_prepare_cpu,
+ .cpu_init = smp_spin_table_cpu_init,
+ .cpu_prepare = smp_spin_table_cpu_prepare,
};