]>
git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - arch/x86/include/asm/mach-default/mach_ipi.h
1 #ifndef _ASM_X86_MACH_DEFAULT_MACH_IPI_H
2 #define _ASM_X86_MACH_DEFAULT_MACH_IPI_H
4 /* Avoid include hell */
5 #define NMI_VECTOR 0x02
7 void send_IPI_mask_bitmask(const struct cpumask
*mask
, int vector
);
8 void send_IPI_mask_allbutself(const struct cpumask
*mask
, int vector
);
9 void __send_IPI_shortcut(unsigned int shortcut
, int vector
);
11 extern int no_broadcast
;
14 #include <asm/genapic.h>
15 #define send_IPI_mask (genapic->send_IPI_mask)
16 #define send_IPI_mask_allbutself (genapic->send_IPI_mask_allbutself)
18 static inline void send_IPI_mask(const struct cpumask
*mask
, int vector
)
20 send_IPI_mask_bitmask(mask
, vector
);
22 void send_IPI_mask_allbutself(const struct cpumask
*mask
, int vector
);
25 static inline void __local_send_IPI_allbutself(int vector
)
27 if (no_broadcast
|| vector
== NMI_VECTOR
)
28 send_IPI_mask_allbutself(cpu_online_mask
, vector
);
30 __send_IPI_shortcut(APIC_DEST_ALLBUT
, vector
);
33 static inline void __local_send_IPI_all(int vector
)
35 if (no_broadcast
|| vector
== NMI_VECTOR
)
36 send_IPI_mask(cpu_online_mask
, vector
);
38 __send_IPI_shortcut(APIC_DEST_ALLINC
, vector
);
42 #define send_IPI_allbutself (genapic->send_IPI_allbutself)
43 #define send_IPI_all (genapic->send_IPI_all)
45 static inline void send_IPI_allbutself(int vector
)
48 * if there are no other CPUs in the system then we get an APIC send
49 * error if we try to broadcast, thus avoid sending IPIs in this case.
51 if (!(num_online_cpus() > 1))
54 __local_send_IPI_allbutself(vector
);
58 static inline void send_IPI_all(int vector
)
60 __local_send_IPI_all(vector
);
64 #endif /* _ASM_X86_MACH_DEFAULT_MACH_IPI_H */