lkml.org 
[lkml]   [2005]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 4/4] CPU hot-plug support for x86_64
This patch removes the usage of shortcut to send smp_call_function using ALL_BUT_SELF 
shortcut. This is a problem for an upcomming CPU, and is still not ready to take
this interrupt. Since cpu_online_map is updated with the call_lock held, this
mechanism should avoid sending IPI to cpu's not yet prepared to participate in this
party.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
----------------------------------------
smp.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: linux-2.6.12-rc4-mm2/arch/x86_64/kernel/smp.c
===================================================================
--- linux-2.6.12-rc4-mm2.orig/arch/x86_64/kernel/smp.c 2005-05-20 13:14:27.000000000 -0700
+++ linux-2.6.12-rc4-mm2/arch/x86_64/kernel/smp.c 2005-05-20 13:14:38.000000000 -0700
@@ -315,8 +315,10 @@
int nonatomic, int wait)
{
struct call_data_struct data;
- int cpus = num_online_cpus()-1;
+ cpumask_t cpu_mask;
+ int cpus;

+ cpus = num_online_cpus() - 1;
if (!cpus)
return;

@@ -327,10 +329,14 @@
if (wait)
atomic_set(&data.finished, 0);

+ cpu_mask = cpu_online_map;
+ cpu_clear(smp_processor_id(), cpu_mask);
+
call_data = &data;
wmb();
+
/* Send a message to all other CPUs and wait for them to respond */
- send_IPI_allbutself(CALL_FUNCTION_VECTOR);
+ send_IPI_mask(cpu_mask, CALL_FUNCTION_VECTOR);

/* Wait for response */
while (atomic_read(&data.started) != cpus)
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-21 00:45    [from the cache]
©2003-2011 Jasper Spaans