Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Hong H. Pham | 280ff97 | 2009-06-04 02:10:11 -0700 | [diff] [blame] | 2 | #ifndef _CPUMAP_H |
| 3 | #define _CPUMAP_H |
| 4 | |
| 5 | #ifdef CONFIG_SMP |
Sam Ravnborg | 2e74a74 | 2014-05-16 23:25:51 +0200 | [diff] [blame] | 6 | void cpu_map_rebuild(void); |
| 7 | int map_to_cpu(unsigned int index); |
Hong H. Pham | 280ff97 | 2009-06-04 02:10:11 -0700 | [diff] [blame] | 8 | #define cpu_map_init() cpu_map_rebuild() |
| 9 | #else |
| 10 | #define cpu_map_init() do {} while (0) |
| 11 | static inline int map_to_cpu(unsigned int index) |
| 12 | { |
| 13 | return raw_smp_processor_id(); |
| 14 | } |
| 15 | #endif |
| 16 | |
| 17 | #endif |