Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _CPUMAP_H
0003 #define _CPUMAP_H
0004 
0005 #ifdef CONFIG_SMP
0006 void cpu_map_rebuild(void);
0007 int map_to_cpu(unsigned int index);
0008 #define cpu_map_init() cpu_map_rebuild()
0009 #else
0010 #define cpu_map_init() do {} while (0)
0011 static inline int map_to_cpu(unsigned int index)
0012 {
0013     return raw_smp_processor_id();
0014 }
0015 #endif
0016 
0017 #endif