Merge branch 'for-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[linux/fpc-iii.git] / arch / s390 / include / asm / topology.h
blob56af53093d24d3660ed1267e229eccb6925b56ef
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 core_id;
13 unsigned short socket_id;
14 unsigned short book_id;
15 cpumask_t core_mask;
16 cpumask_t book_mask;
19 extern struct cpu_topology_s390 cpu_topology[NR_CPUS];
21 #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id)
22 #define topology_core_id(cpu) (cpu_topology[cpu].core_id)
23 #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_mask)
24 #define topology_book_id(cpu) (cpu_topology[cpu].book_id)
25 #define topology_book_cpumask(cpu) (&cpu_topology[cpu].book_mask)
27 #define mc_capable() 1
29 int topology_cpu_init(struct cpu *);
30 int topology_set_cpu_management(int fc);
31 void topology_schedule_update(void);
32 void store_topology(struct sysinfo_15_1_x *info);
33 void topology_expect_change(void);
34 const struct cpumask *cpu_coregroup_mask(int cpu);
36 #else /* CONFIG_SCHED_BOOK */
38 static inline void topology_schedule_update(void) { }
39 static inline int topology_cpu_init(struct cpu *cpu) { return 0; }
40 static inline void topology_expect_change(void) { }
42 #endif /* CONFIG_SCHED_BOOK */
44 #define POLARIZATION_UNKNOWN (-1)
45 #define POLARIZATION_HRZ (0)
46 #define POLARIZATION_VL (1)
47 #define POLARIZATION_VM (2)
48 #define POLARIZATION_VH (3)
50 #ifdef CONFIG_SCHED_BOOK
51 void s390_init_cpu_topology(void);
52 #else
53 static inline void s390_init_cpu_topology(void)
56 #endif
58 #include <asm-generic/topology.h>
60 #endif /* _ASM_S390_TOPOLOGY_H */