spi-topcliff-pch: Fix issue for transmitting over 4KByte
[zen-stable.git] / arch / s390 / include / asm / topology.h
blob0837de80c351d58ac2680554b576a46c1d445347
1 #ifndef _ASM_S390_TOPOLOGY_H
2 #define _ASM_S390_TOPOLOGY_H
4 #include <linux/cpumask.h>
5 #include <asm/sysinfo.h>
7 struct cpu;
9 #ifdef CONFIG_SCHED_BOOK
11 extern unsigned char cpu_core_id[NR_CPUS];
12 extern cpumask_t cpu_core_map[NR_CPUS];
14 static inline const struct cpumask *cpu_coregroup_mask(int cpu)
16 return &cpu_core_map[cpu];
19 #define topology_core_id(cpu) (cpu_core_id[cpu])
20 #define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
21 #define mc_capable() (1)
23 extern unsigned char cpu_book_id[NR_CPUS];
24 extern cpumask_t cpu_book_map[NR_CPUS];
26 static inline const struct cpumask *cpu_book_mask(int cpu)
28 return &cpu_book_map[cpu];
31 #define topology_book_id(cpu) (cpu_book_id[cpu])
32 #define topology_book_cpumask(cpu) (&cpu_book_map[cpu])
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);
40 #else /* CONFIG_SCHED_BOOK */
42 static inline void topology_schedule_update(void) { }
43 static inline int topology_cpu_init(struct cpu *cpu) { return 0; }
44 static inline void topology_expect_change(void) { }
46 #endif /* CONFIG_SCHED_BOOK */
48 #define POLARIZATION_UNKNOWN (-1)
49 #define POLARIZATION_HRZ (0)
50 #define POLARIZATION_VL (1)
51 #define POLARIZATION_VM (2)
52 #define POLARIZATION_VH (3)
54 extern int cpu_polarization[];
56 static inline void cpu_set_polarization(int cpu, int val)
58 #ifdef CONFIG_SCHED_BOOK
59 cpu_polarization[cpu] = val;
60 #endif
63 static inline int cpu_read_polarization(int cpu)
65 #ifdef CONFIG_SCHED_BOOK
66 return cpu_polarization[cpu];
67 #else
68 return POLARIZATION_HRZ;
69 #endif
72 #ifdef CONFIG_SCHED_BOOK
73 void s390_init_cpu_topology(void);
74 #else
75 static inline void s390_init_cpu_topology(void)
78 #endif
80 #define SD_BOOK_INIT SD_CPU_INIT
82 #include <asm-generic/topology.h>
84 #endif /* _ASM_S390_TOPOLOGY_H */