netfilter: ctnetlink: add zone support
[safe/jmp/linux-2.6] / include / linux / smp.h
index b824669..7a0570e 100644 (file)
@@ -24,6 +24,9 @@ struct call_single_data {
 /* total number of cpus in this system (may exceed NR_CPUS) */
 extern unsigned int total_cpus;
 
+int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
+                               int wait);
+
 #ifdef CONFIG_SMP
 
 #include <linux/preempt.h>
@@ -35,7 +38,7 @@ extern unsigned int total_cpus;
 /*
  * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.
  * (defined in asm header):
- */ 
+ */
 
 /*
  * stops all CPUs but the current one:
@@ -70,18 +73,11 @@ int smp_call_function(void(*func)(void *info), void *info, int wait);
 void smp_call_function_many(const struct cpumask *mask,
                            void (*func)(void *info), void *info, bool wait);
 
-/* Deprecated: Use smp_call_function_many which takes a pointer to the mask. */
-static inline int
-smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
-                      int wait)
-{
-       smp_call_function_many(&mask, func, info, wait);
-       return 0;
-}
-
-int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
+void __smp_call_function_single(int cpuid, struct call_single_data *data,
                                int wait);
-void __smp_call_function_single(int cpuid, struct call_single_data *data);
+
+int smp_call_function_any(const struct cpumask *mask,
+                         void (*func)(void *info), void *info, int wait);
 
 /*
  * Generic and arch helpers
@@ -120,6 +116,8 @@ extern unsigned int setup_max_cpus;
 
 #else /* !SMP */
 
+static inline void smp_send_stop(void) { }
+
 /*
  *     These macros fold the SMP functionality into a single CPU system
  */
@@ -140,21 +138,17 @@ static inline int up_smp_call_function(void (*func)(void *), void *info)
 static inline void smp_send_reschedule(int cpu) { }
 #define num_booting_cpus()                     1
 #define smp_prepare_boot_cpu()                 do {} while (0)
-#define smp_call_function_single(cpuid, func, info, wait) \
-({ \
-       WARN_ON(cpuid != 0);    \
-       local_irq_disable();    \
-       (func)(info);           \
-       local_irq_enable();     \
-       0;                      \
-})
-#define smp_call_function_mask(mask, func, info, wait) \
-                       (up_smp_call_function(func, info))
 #define smp_call_function_many(mask, func, info, wait) \
                        (up_smp_call_function(func, info))
-static inline void init_call_single_data(void)
+static inline void init_call_single_data(void) { }
+
+static inline int
+smp_call_function_any(const struct cpumask *mask, void (*func)(void *info),
+                     void *info, int wait)
 {
+       return smp_call_function_single(0, func, info, wait);
 }
+
 #endif /* !SMP */
 
 /*
@@ -181,7 +175,12 @@ static inline void init_call_single_data(void)
 
 #define get_cpu()              ({ preempt_disable(); smp_processor_id(); })
 #define put_cpu()              preempt_enable()
-#define put_cpu_no_resched()   preempt_enable_no_resched()
+
+/*
+ * Callback to arch code if there's nosmp or maxcpus=0 on the
+ * boot command line:
+ */
+extern void arch_disable_smp_support(void);
 
 void smp_setup_processor_id(void);