Yinghai Lu | e8c48ef | 2008-07-25 02:17:44 -0700 | [diff] [blame] | 1 | #ifndef __ASM_SUMMIT_IPI_H |
| 2 | #define __ASM_SUMMIT_IPI_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Mike Travis | e798673 | 2008-12-16 17:33:52 -0800 | [diff] [blame] | 4 | void send_IPI_mask_sequence(const cpumask_t *mask, int vector); |
| 5 | void send_IPI_mask_allbutself(const cpumask_t *mask, int vector); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Mike Travis | e798673 | 2008-12-16 17:33:52 -0800 | [diff] [blame] | 7 | static inline void send_IPI_mask(const cpumask_t *mask, int vector) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | { |
| 9 | send_IPI_mask_sequence(mask, vector); |
| 10 | } |
| 11 | |
| 12 | static inline void send_IPI_allbutself(int vector) |
| 13 | { |
| 14 | cpumask_t mask = cpu_online_map; |
| 15 | cpu_clear(smp_processor_id(), mask); |
| 16 | |
| 17 | if (!cpus_empty(mask)) |
Mike Travis | e798673 | 2008-12-16 17:33:52 -0800 | [diff] [blame] | 18 | send_IPI_mask(&mask, vector); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | static inline void send_IPI_all(int vector) |
| 22 | { |
Mike Travis | e798673 | 2008-12-16 17:33:52 -0800 | [diff] [blame] | 23 | send_IPI_mask(&cpu_online_map, vector); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | } |
| 25 | |
Yinghai Lu | e8c48ef | 2008-07-25 02:17:44 -0700 | [diff] [blame] | 26 | #endif /* __ASM_SUMMIT_IPI_H */ |