1 #ifndef __ASM_MACH_IPI_H
2 #define __ASM_MACH_IPI_H
4 /* Avoid include hell */
5 #define NMI_VECTOR 0x02
7 void send_IPI_mask_bitmask(cpumask_t mask
, int vector
);
8 void __send_IPI_shortcut(unsigned int shortcut
, int vector
);
10 extern int no_broadcast
;
12 static inline void send_IPI_mask(cpumask_t mask
, int vector
)
14 send_IPI_mask_bitmask(mask
, vector
);
17 static inline void __local_send_IPI_allbutself(int vector
)
19 if (no_broadcast
|| vector
== NMI_VECTOR
) {
20 cpumask_t mask
= cpu_online_map
;
22 cpu_clear(smp_processor_id(), mask
);
23 send_IPI_mask(mask
, vector
);
25 __send_IPI_shortcut(APIC_DEST_ALLBUT
, vector
);
28 static inline void __local_send_IPI_all(int vector
)
30 if (no_broadcast
|| vector
== NMI_VECTOR
)
31 send_IPI_mask(cpu_online_map
, vector
);
33 __send_IPI_shortcut(APIC_DEST_ALLINC
, vector
);
36 static inline void send_IPI_allbutself(int vector
)
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.
42 if (!(num_online_cpus() > 1))
45 __local_send_IPI_allbutself(vector
);
49 static inline void send_IPI_all(int vector
)
51 __local_send_IPI_all(vector
);
54 #endif /* __ASM_MACH_IPI_H */