From 26eca5a2c1e7f161c594a79df9fa1b74ba575137 Mon Sep 17 00:00:00 2001 From: "travis@sgi.com" Date: Wed, 30 Jan 2008 13:33:11 +0100 Subject: [PATCH] --- yaml --- r: 80280 b: refs/heads/master c: 30964d54e94229f567a7312a0e6666f9deb6a488 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/topology.c | 8 ++++---- trunk/include/asm-x86/cpu.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 1557f7bf6df4..00a21c7491eb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 24b0d22b7b63bfc71853faf64e76cd45701ecf2a +refs/heads/master: 30964d54e94229f567a7312a0e6666f9deb6a488 diff --git a/trunk/arch/x86/kernel/topology.c b/trunk/arch/x86/kernel/topology.c index 7e16d675eb85..a0d1719bda79 100644 --- a/trunk/arch/x86/kernel/topology.c +++ b/trunk/arch/x86/kernel/topology.c @@ -31,7 +31,7 @@ #include #include -static struct i386_cpu cpu_devices[NR_CPUS]; +static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); int __cpuinit arch_register_cpu(int num) { @@ -46,16 +46,16 @@ int __cpuinit arch_register_cpu(int num) */ #ifdef CONFIG_HOTPLUG_CPU if (num) - cpu_devices[num].cpu.hotpluggable = 1; + per_cpu(cpu_devices, num).cpu.hotpluggable = 1; #endif - return register_cpu(&cpu_devices[num].cpu, num); + return register_cpu(&per_cpu(cpu_devices, num).cpu, num); } #ifdef CONFIG_HOTPLUG_CPU void arch_unregister_cpu(int num) { - return unregister_cpu(&cpu_devices[num].cpu); + return unregister_cpu(&per_cpu(cpu_devices, num).cpu); } EXPORT_SYMBOL(arch_register_cpu); EXPORT_SYMBOL(arch_unregister_cpu); diff --git a/trunk/include/asm-x86/cpu.h b/trunk/include/asm-x86/cpu.h index b1bc7b1b64b0..85ece5f10e9e 100644 --- a/trunk/include/asm-x86/cpu.h +++ b/trunk/include/asm-x86/cpu.h @@ -7,7 +7,7 @@ #include #include -struct i386_cpu { +struct x86_cpu { struct cpu cpu; }; extern int arch_register_cpu(int num);