Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8dfd588c3180b7403c402b4545164ee4543f8f86
Commit:     8dfd588c3180b7403c402b4545164ee4543f8f86
Parent:     44052e0d91757ecac4a2f659ea3e1a658dd6057e
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 22:29:46 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 14:39:19 2007 -0700

    smp_call_function_single() should be a macro on UP
    
    ... or we end up with header include order problems from hell.
    
    E.g. on m68k this is 100% fatal - local_irq_enable() there
    wants preempt_count(), which wants task_struct fields, which
    we won't have when we are in smp.h pulled from sched.h.
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/smp.h |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/include/linux/smp.h b/include/linux/smp.h
index 8039dac..259a13c 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -7,7 +7,6 @@
  */
 
 #include <linux/errno.h>
-#include <asm/system.h>
 
 extern void cpu_idle(void);
 
@@ -100,15 +99,14 @@ static inline int up_smp_call_function(void)
 static inline void smp_send_reschedule(int cpu) { }
 #define num_booting_cpus()                     1
 #define smp_prepare_boot_cpu()                 do {} while (0)
-static inline int smp_call_function_single(int cpuid, void (*func) (void 
*info),
-                                          void *info, int retry, int wait)
-{
-       WARN_ON(cpuid != 0);
-       local_irq_disable();
-       func(info);
-       local_irq_enable();
-       return 0;
-}
+#define smp_call_function_single(cpuid, func, info, retry, wait) \
+({ \
+       WARN_ON(cpuid != 0);    \
+       local_irq_disable();    \
+       (func)(info);           \
+       local_irq_enable();     \
+       0;                      \
+})
 
 #endif /* !SMP */
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to