From c9b53983ddd0d5e529e1333051ecf5c06a10871c Mon Sep 17 00:00:00 2001 From: "travis@sgi.com" Date: Wed, 30 Jan 2008 13:33:11 +0100 Subject: [PATCH] --- yaml --- r: 80279 b: refs/heads/master c: 24b0d22b7b63bfc71853faf64e76cd45701ecf2a h: refs/heads/master i: 80277: c9a4181eafbafc08f9eb5e62bcd6eb327b780f01 80275: 4a3277ce0b9ba54d11927774755093e613ddcaee 80271: 6254a9316bf01705fe1787318d8cb7504ea87260 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/smpboot_64.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 756667ad06a9..1557f7bf6df4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2c6b8c030cfca334c3d700ee504036c585c4c6a3 +refs/heads/master: 24b0d22b7b63bfc71853faf64e76cd45701ecf2a diff --git a/trunk/arch/x86/kernel/smpboot_64.c b/trunk/arch/x86/kernel/smpboot_64.c index 1fea185c9dca..50e207a8261f 100644 --- a/trunk/arch/x86/kernel/smpboot_64.c +++ b/trunk/arch/x86/kernel/smpboot_64.c @@ -111,10 +111,20 @@ DEFINE_PER_CPU(int, cpu_state) = { 0 }; * a new thread. Also avoids complicated thread destroy functionality * for idle threads. */ +#ifdef CONFIG_HOTPLUG_CPU +/* + * Needed only for CONFIG_HOTPLUG_CPU because __cpuinitdata is + * removed after init for !CONFIG_HOTPLUG_CPU. + */ +static DEFINE_PER_CPU(struct task_struct *, idle_thread_array); +#define get_idle_for_cpu(x) (per_cpu(idle_thread_array, x)) +#define set_idle_for_cpu(x,p) (per_cpu(idle_thread_array, x) = (p)) +#else struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ; - #define get_idle_for_cpu(x) (idle_thread_array[(x)]) #define set_idle_for_cpu(x,p) (idle_thread_array[(x)] = (p)) +#endif + /* * Currently trivial. Write the real->protected mode