Merge tag 'pm+acpi-4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux/fpc-iii.git] / arch / s390 / include / asm / topology.h
blob4990f6c66288582b21ad01295b032cb13da9ee31
1 #ifndef _ASM_S390_TOPOLOGY_H
2 #define _ASM_S390_TOPOLOGY_H
4 #include <linux/cpumask.h>
6 struct sysinfo_15_1_x;
7 struct cpu;
9 #ifdef CONFIG_SCHED_BOOK
11 struct cpu_topology_s390 {
12 unsigned short thread_id;
13 unsigned short core_id;
14 unsigned short socket_id;
15 unsigned short book_id;
16 cpumask_t thread_mask;
17 cpumask_t core_mask;
18 cpumask_t book_mask;
21 DECLARE_PER_CPU(struct cpu_topology_s390, cpu_topology);
23 #define topology_physical_package_id(cpu) (per_cpu(cpu_topology, cpu).socket_id)
24 #define topology_thread_id(cpu) (per_cpu(cpu_topology, cpu).thread_id)
25 #define topology_sibling_cpumask(cpu) \
26 (&per_cpu(cpu_topology, cpu).thread_mask)
27 #define topology_core_id(cpu) (per_cpu(cpu_topology, cpu).core_id)
28 #define topology_core_cpumask(cpu) (&per_cpu(cpu_topology, cpu).core_mask)
29 #define topology_book_id(cpu) (per_cpu(cpu_topology, cpu).book_id)
30 #define topology_book_cpumask(cpu) (&per_cpu(cpu_topology, cpu).book_mask)
32 #define mc_capable() 1
34 int topology_cpu_init(struct cpu *);
35 int topology_set_cpu_management(int fc);
36 void topology_schedule_update(void);
37 void store_topology(struct sysinfo_15_1_x *info);
38 void topology_expect_change(void);
39 const struct cpumask *cpu_coregroup_mask(int cpu);
41 #else /* CONFIG_SCHED_BOOK */
43 static inline void topology_schedule_update(void) { }
44 static inline int topology_cpu_init(struct cpu *cpu) { return 0; }
45 static inline void topology_expect_change(void) { }
47 #endif /* CONFIG_SCHED_BOOK */
49 #define POLARIZATION_UNKNOWN (-1)
50 #define POLARIZATION_HRZ (0)
51 #define POLARIZATION_VL (1)
52 #define POLARIZATION_VM (2)
53 #define POLARIZATION_VH (3)
55 #include <asm-generic/topology.h>
57 #endif /* _ASM_S390_TOPOLOGY_H */