Merge branch 'generic-ipi' into generic-ipi-for-linus
Conflicts: arch/powerpc/Kconfig arch/s390/kernel/time.c arch/x86/kernel/apic_32.c arch/x86/kernel/cpu/perfctr-watchdog.c arch/x86/kernel/i8259_64.c arch/x86/kernel/ldt.c arch/x86/kernel/nmi_64.c arch/x86/kernel/smpboot.c arch/x86/xen/smp.c include/asm-x86/hw_irq_32.h include/asm-x86/hw_irq_64.h include/asm-x86/mach-default/irq_vectors.h include/asm-x86/mach-voyager/irq_vectors.h include/asm-x86/smp.h kernel/Makefile Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -7,9 +7,18 @@
|
||||
*/
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
extern void cpu_idle(void);
|
||||
|
||||
struct call_single_data {
|
||||
struct list_head list;
|
||||
void (*func) (void *info);
|
||||
void *info;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
#include <linux/preempt.h>
|
||||
@@ -52,15 +61,34 @@ extern void smp_cpus_done(unsigned int max_cpus);
|
||||
/*
|
||||
* Call a function on all other processors
|
||||
*/
|
||||
int smp_call_function(void(*func)(void *info), void *info, int retry, int wait);
|
||||
|
||||
int smp_call_function(void(*func)(void *info), void *info, int wait);
|
||||
int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
|
||||
int wait);
|
||||
int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
|
||||
int retry, int wait);
|
||||
int wait);
|
||||
void __smp_call_function_single(int cpuid, struct call_single_data *data);
|
||||
|
||||
/*
|
||||
* Generic and arch helpers
|
||||
*/
|
||||
#ifdef CONFIG_USE_GENERIC_SMP_HELPERS
|
||||
void generic_smp_call_function_single_interrupt(void);
|
||||
void generic_smp_call_function_interrupt(void);
|
||||
void init_call_single_data(void);
|
||||
void ipi_call_lock(void);
|
||||
void ipi_call_unlock(void);
|
||||
void ipi_call_lock_irq(void);
|
||||
void ipi_call_unlock_irq(void);
|
||||
#else
|
||||
static inline void init_call_single_data(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Call a function on all processors
|
||||
*/
|
||||
int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait);
|
||||
int on_each_cpu(void (*func) (void *info), void *info, int wait);
|
||||
|
||||
#define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */
|
||||
#define MSG_ALL 0x8001
|
||||
@@ -90,9 +118,9 @@ static inline int up_smp_call_function(void (*func)(void *), void *info)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#define smp_call_function(func, info, retry, wait) \
|
||||
#define smp_call_function(func, info, wait) \
|
||||
(up_smp_call_function(func, info))
|
||||
#define on_each_cpu(func,info,retry,wait) \
|
||||
#define on_each_cpu(func,info,wait) \
|
||||
({ \
|
||||
local_irq_disable(); \
|
||||
func(info); \
|
||||
@@ -102,7 +130,7 @@ 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, retry, wait) \
|
||||
#define smp_call_function_single(cpuid, func, info, wait) \
|
||||
({ \
|
||||
WARN_ON(cpuid != 0); \
|
||||
local_irq_disable(); \
|
||||
@@ -112,7 +140,9 @@ static inline void smp_send_reschedule(int cpu) { }
|
||||
})
|
||||
#define smp_call_function_mask(mask, func, info, wait) \
|
||||
(up_smp_call_function(func, info))
|
||||
|
||||
static inline void init_call_single_data(void)
|
||||
{
|
||||
}
|
||||
#endif /* !SMP */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user