• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/include/asm-i386/mach-default/
1#ifndef __ASM_MACH_IPI_H
2#define __ASM_MACH_IPI_H
3
4/* Avoid include hell */
5#define NMI_VECTOR 0x02
6
7void send_IPI_mask_bitmask(cpumask_t mask, int vector);
8void __send_IPI_shortcut(unsigned int shortcut, int vector);
9
10extern int no_broadcast;
11
12static inline void send_IPI_mask(cpumask_t mask, int vector)
13{
14	send_IPI_mask_bitmask(mask, vector);
15}
16
17static 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
28static 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
36static 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
49static inline void send_IPI_all(int vector)
50{
51	__local_send_IPI_all(vector);
52}
53
54#endif /* __ASM_MACH_IPI_H */
55