WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Clean up SMP macros and always have IRQs

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Clean up SMP macros and always have IRQs disabled when executing an
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Oct 2007 14:30:19 -0700
Delivery-date: Thu, 11 Oct 2007 14:31:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192105961 -3600
# Node ID 034df2dca6081e3b88be549e66c67184b6bbce55
# Parent  cab326925ea6896d1b623629926d0011c29d1798
Clean up SMP macros and always have IRQs disabled when executing an
'smp_call_function' callback function.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/include/xen/smp.h |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

diff -r cab326925ea6 -r 034df2dca608 xen/include/xen/smp.h
--- a/xen/include/xen/smp.h     Thu Oct 11 13:27:38 2007 +0100
+++ b/xen/include/xen/smp.h     Thu Oct 11 13:32:41 2007 +0100
@@ -61,20 +61,6 @@ extern int on_selected_cpus(
     int wait);
 
 /*
- * Call a function on all processors
- */
-static inline int on_each_cpu(
-    void (*func) (void *info),
-    void *info,
-    int retry,
-    int wait)
-{
-    int ret = smp_call_function(func, info, retry, wait);
-    func(info);
-    return ret;
-}
-
-/*
  * Mark the boot cpu "online" so that it can call console drivers in
  * printk() and can access its per-cpu storage.
  */
@@ -91,7 +77,6 @@ void smp_prepare_boot_cpu(void);
 #define raw_smp_processor_id()                 0
 #define hard_smp_processor_id()                        0
 #define smp_call_function(func,info,retry,wait)        ({ do {} while (0); 0; 
})
-#define on_each_cpu(func,info,retry,wait)      ({ func(info); 0; })
 #define num_booting_cpus()                     1
 #define smp_prepare_boot_cpu()                 do {} while (0)
 
@@ -103,12 +88,28 @@ static inline int on_selected_cpus(
     int wait)
 {
     if ( cpu_isset(0, selected) )
+    {
+        local_irq_disable();
         func(info);
+        local_irq_enable();
+    }
     return 0;
 }
 
 #endif
 
+/*
+ * Call a function on all processors
+ */
+static inline int on_each_cpu(
+    void (*func) (void *info),
+    void *info,
+    int retry,
+    int wait)
+{
+    return on_selected_cpus(cpu_online_map, func, info, retry, wait);
+}
+
 #define smp_processor_id() raw_smp_processor_id()
 
 #endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Clean up SMP macros and always have IRQs disabled when executing an, Xen patchbot-unstable <=