blob: 7d5b774862e7561c43c7a2d3cb4ce2215d5d57ba [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Hong H. Pham280ff972009-06-04 02:10:11 -07002#ifndef _CPUMAP_H
3#define _CPUMAP_H
4
5#ifdef CONFIG_SMP
Sam Ravnborg2e74a742014-05-16 23:25:51 +02006void cpu_map_rebuild(void);
7int map_to_cpu(unsigned int index);
Hong H. Pham280ff972009-06-04 02:10:11 -07008#define cpu_map_init() cpu_map_rebuild()
9#else
10#define cpu_map_init() do {} while (0)
11static inline int map_to_cpu(unsigned int index)
12{
13 return raw_smp_processor_id();
14}
15#endif
16
17#endif