Cpu_data macro is used to get cpu-related information in acpi-cpufreq driver. But there is no cpu_data macro in arm. For using cpu_data macro in both x86 and arm, I added cpu_data macro in arm and exported "DEFINE_PER_CPU(struct cpu, cpu_info)".
Signed-off-by: Jonghwan Choi jhbird.choi@samsung.com --- arch/arm64/include/asm/cpu.h | 3 ++- arch/arm64/kernel/setup.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h index 8625eb1..69db3e7 100644 --- a/arch/arm64/include/asm/cpu.h +++ b/arch/arm64/include/asm/cpu.h @@ -20,6 +20,7 @@ struct cpuinfo_arm { #endif };
-DECLARE_PER_CPU(struct cpuinfo_arm, cpu_data); +DECLARE_PER_CPU(struct cpuinfo_arm, cpu_info); +#define cpu_data(cpu) per_cpu(cpu_info, cpu)
#endif diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 51fdb2c..149c3da 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -410,14 +410,15 @@ static int __init arm64_device_init(void) } arch_initcall(arm64_device_init);
-static DEFINE_PER_CPU(struct cpu, cpu_data); +DEFINE_PER_CPU(struct cpu, cpu_info); +EXPORT_PER_CPU_SYMBOL(cpu_info);
static int __init topology_init(void) { int i;
for_each_possible_cpu(i) { - struct cpu *cpu = &per_cpu(cpu_data, i); + struct cpu *cpu = &per_cpu(cpu_info, i); cpu->hotpluggable = 1; register_cpu(cpu, i); }