1 #ifndef _ASM_S390_TOPOLOGY_H 2 #define _ASM_S390_TOPOLOGY_H 3 4 #include <linux/cpumask.h> 5 6 struct sysinfo_15_1_x; 7 struct cpu; 8 9 #ifdef CONFIG_SCHED_BOOK 10 11 extern unsigned char cpu_socket_id[NR_CPUS]; 12 #define topology_physical_package_id(cpu) (cpu_socket_id[cpu]) 13 14 extern unsigned char cpu_core_id[NR_CPUS]; 15 extern cpumask_t cpu_core_map[NR_CPUS]; 16 17 static inline const struct cpumask *cpu_coregroup_mask(int cpu) 18 { 19 return &cpu_core_map[cpu]; 20 } 21 22 #define topology_core_id(cpu) (cpu_core_id[cpu]) 23 #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) 24 #define mc_capable() (1) 25 26 extern unsigned char cpu_book_id[NR_CPUS]; 27 extern cpumask_t cpu_book_map[NR_CPUS]; 28 29 static inline const struct cpumask *cpu_book_mask(int cpu) 30 { 31 return &cpu_book_map[cpu]; 32 } 33 34 #define topology_book_id(cpu) (cpu_book_id[cpu]) 35 #define topology_book_cpumask(cpu) (&cpu_book_map[cpu]) 36 37 int topology_cpu_init(struct cpu *); 38 int topology_set_cpu_management(int fc); 39 void topology_schedule_update(void); 40 void store_topology(struct sysinfo_15_1_x *info); 41 void topology_expect_change(void); 42 43 #else /* CONFIG_SCHED_BOOK */ 44 45 static inline void topology_schedule_update(void) { } 46 static inline int topology_cpu_init(struct cpu *cpu) { return 0; } 47 static inline void topology_expect_change(void) { } 48 49 #endif /* CONFIG_SCHED_BOOK */ 50 51 #define POLARIZATION_UNKNOWN (-1) 52 #define POLARIZATION_HRZ (0) 53 #define POLARIZATION_VL (1) 54 #define POLARIZATION_VM (2) 55 #define POLARIZATION_VH (3) 56 57 #ifdef CONFIG_SCHED_BOOK 58 void s390_init_cpu_topology(void); 59 #else 60 static inline void s390_init_cpu_topology(void) 61 { 62 }; 63 #endif 64 65 #define SD_BOOK_INIT SD_CPU_INIT 66 67 #include <asm-generic/topology.h> 68 69 #endif /* _ASM_S390_TOPOLOGY_H */ 70