diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:20:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:20:03 -0400 |
commit | 96a388de5dc53a8b234b3fd41f3ae2cedc9ffd42 (patch) | |
tree | d947a467aa2da3140279617bc4b9b101640d7bf4 /include/asm-x86/mach-default/mach_ipi.h | |
parent | 27bd0c955648646abf2a353a8371d28c37bcd982 (diff) |
i386/x86_64: move headers to include/asm-x86
Move the headers to include/asm-x86 and fixup the
header install make rules
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/mach-default/mach_ipi.h')
-rw-r--r-- | include/asm-x86/mach-default/mach_ipi.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/include/asm-x86/mach-default/mach_ipi.h b/include/asm-x86/mach-default/mach_ipi.h new file mode 100644 index 000000000000..0dba244c86db --- /dev/null +++ b/include/asm-x86/mach-default/mach_ipi.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | ||
2 | #define __ASM_MACH_IPI_H | ||
3 | |||
4 | /* Avoid include hell */ | ||
5 | #define NMI_VECTOR 0x02 | ||
6 | |||
7 | void send_IPI_mask_bitmask(cpumask_t mask, int vector); | ||
8 | void __send_IPI_shortcut(unsigned int shortcut, int vector); | ||
9 | |||
10 | extern int no_broadcast; | ||
11 | |||
12 | static inline void send_IPI_mask(cpumask_t mask, int vector) | ||
13 | { | ||
14 | send_IPI_mask_bitmask(mask, vector); | ||
15 | } | ||
16 | |||
17 | static inline void __local_send_IPI_allbutself(int vector) | ||
18 | { | ||
19 | if (no_broadcast || vector == NMI_VECTOR) { | ||
20 | cpumask_t mask = cpu_online_map; | ||
21 | |||
22 | cpu_clear(smp_processor_id(), mask); | ||
23 | send_IPI_mask(mask, vector); | ||
24 | } else | ||
25 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); | ||
26 | } | ||
27 | |||
28 | static inline void __local_send_IPI_all(int vector) | ||
29 | { | ||
30 | if (no_broadcast || vector == NMI_VECTOR) | ||
31 | send_IPI_mask(cpu_online_map, vector); | ||
32 | else | ||
33 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector); | ||
34 | } | ||
35 | |||
36 | static inline void send_IPI_allbutself(int vector) | ||
37 | { | ||
38 | /* | ||
39 | * if there are no other CPUs in the system then we get an APIC send | ||
40 | * error if we try to broadcast, thus avoid sending IPIs in this case. | ||
41 | */ | ||
42 | if (!(num_online_cpus() > 1)) | ||
43 | return; | ||
44 | |||
45 | __local_send_IPI_allbutself(vector); | ||
46 | return; | ||
47 | } | ||
48 | |||
49 | static inline void send_IPI_all(int vector) | ||
50 | { | ||
51 | __local_send_IPI_all(vector); | ||
52 | } | ||
53 | |||
54 | #endif /* __ASM_MACH_IPI_H */ | ||