Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef _ASM_S390_TOPOLOGY_H |
2 | #define _ASM_S390_TOPOLOGY_H | |
3 | ||
dbd70fb4 HC |
4 | #include <linux/cpumask.h> |
5 | ||
78609132 | 6 | struct sysinfo_15_1_x; |
83a24e32 HC |
7 | struct cpu; |
8 | ||
9 | #ifdef CONFIG_SCHED_BOOK | |
10 | ||
658e5ce7 HC |
11 | extern unsigned char cpu_socket_id[NR_CPUS]; |
12 | #define topology_physical_package_id(cpu) (cpu_socket_id[cpu]) | |
13 | ||
10d38589 | 14 | extern unsigned char cpu_core_id[NR_CPUS]; |
d00aa4e7 HC |
15 | extern cpumask_t cpu_core_map[NR_CPUS]; |
16 | ||
ac5fa22f | 17 | static inline const struct cpumask *cpu_coregroup_mask(int cpu) |
4cb14bc8 HC |
18 | { |
19 | return &cpu_core_map[cpu]; | |
20 | } | |
21 | ||
10d38589 | 22 | #define topology_core_id(cpu) (cpu_core_id[cpu]) |
2bb23a63 | 23 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) |
4cb14bc8 HC |
24 | #define mc_capable() (1) |
25 | ||
4cb14bc8 HC |
26 | extern unsigned char cpu_book_id[NR_CPUS]; |
27 | extern cpumask_t cpu_book_map[NR_CPUS]; | |
28 | ||
ac5fa22f | 29 | static inline const struct cpumask *cpu_book_mask(int cpu) |
4cb14bc8 HC |
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 | ||
83a24e32 | 37 | int topology_cpu_init(struct cpu *); |
c10fde0d HC |
38 | int topology_set_cpu_management(int fc); |
39 | void topology_schedule_update(void); | |
96f4a70d | 40 | void store_topology(struct sysinfo_15_1_x *info); |
d68bddb7 | 41 | void topology_expect_change(void); |
c10fde0d | 42 | |
83a24e32 HC |
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; } | |
d68bddb7 | 47 | static inline void topology_expect_change(void) { } |
83a24e32 HC |
48 | |
49 | #endif /* CONFIG_SCHED_BOOK */ | |
50 | ||
51 | #define POLARIZATION_UNKNOWN (-1) | |
c10fde0d HC |
52 | #define POLARIZATION_HRZ (0) |
53 | #define POLARIZATION_VL (1) | |
54 | #define POLARIZATION_VM (2) | |
55 | #define POLARIZATION_VH (3) | |
56 | ||
83a24e32 | 57 | #ifdef CONFIG_SCHED_BOOK |
dbd70fb4 HC |
58 | void s390_init_cpu_topology(void); |
59 | #else | |
60 | static inline void s390_init_cpu_topology(void) | |
61 | { | |
62 | }; | |
63 | #endif | |
64 | ||
4cb14bc8 HC |
65 | #define SD_BOOK_INIT SD_CPU_INIT |
66 | ||
1da177e4 LT |
67 | #include <asm-generic/topology.h> |
68 | ||
69 | #endif /* _ASM_S390_TOPOLOGY_H */ |