diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:42:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:42:32 -0500 |
commit | b3d6524ff7956c5a898d51a18eaecb62a60a2b84 (patch) | |
tree | cc049e7ec9edd9f5a76f286e04d8db9a1caa516a /arch/s390/include/asm | |
parent | 07f80d41cf24b7e6e76cd97d420167932c9a7f82 (diff) | |
parent | 6a039eab53c01a58bfff95c78fc800ca7de27c77 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky:
- The remaining patches for the z13 machine support: kernel build
option for z13, the cache synonym avoidance, SMT support,
compare-and-delay for spinloops and the CES5S crypto adapater.
- The ftrace support for function tracing with the gcc hotpatch option.
This touches common code Makefiles, Steven is ok with the changes.
- The hypfs file system gets an extension to access diagnose 0x0c data
in user space for performance analysis for Linux running under z/VM.
- The iucv hvc console gets wildcard spport for the user id filtering.
- The cacheinfo code is converted to use the generic infrastructure.
- Cleanup and bug fixes.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (42 commits)
s390/process: free vx save area when releasing tasks
s390/hypfs: Eliminate hypfs interval
s390/hypfs: Add diagnose 0c support
s390/cacheinfo: don't use smp_processor_id() in preemptible context
s390/zcrypt: fixed domain scanning problem (again)
s390/smp: increase maximum value of NR_CPUS to 512
s390/jump label: use different nop instruction
s390/jump label: add sanity checks
s390/mm: correct missing space when reporting user process faults
s390/dasd: cleanup profiling
s390/dasd: add locking for global_profile access
s390/ftrace: hotpatch support for function tracing
ftrace: let notrace function attribute disable hotpatching if necessary
ftrace: allow architectures to specify ftrace compile options
s390: reintroduce diag 44 calls for cpu_relax()
s390/zcrypt: Add support for new crypto express (CEX5S) adapter.
s390/zcrypt: Number of supported ap domains is not retrievable.
s390/spinlock: add compare-and-delay to lock wait loops
s390/tape: remove redundant if statement
s390/hvc_iucv: add simple wildcard matches to the iucv allow filter
...
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r-- | arch/s390/include/asm/cpu_mf.h | 14 | ||||
-rw-r--r-- | arch/s390/include/asm/elf.h | 8 | ||||
-rw-r--r-- | arch/s390/include/asm/ftrace.h | 15 | ||||
-rw-r--r-- | arch/s390/include/asm/jump_label.h | 7 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/processor.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/reset.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/sclp.h | 7 | ||||
-rw-r--r-- | arch/s390/include/asm/setup.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/sigp.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/smp.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/sysinfo.h | 20 | ||||
-rw-r--r-- | arch/s390/include/asm/topology.h | 4 |
13 files changed, 78 insertions, 17 deletions
diff --git a/arch/s390/include/asm/cpu_mf.h b/arch/s390/include/asm/cpu_mf.h index cb700d54bd83..5243a8679a1d 100644 --- a/arch/s390/include/asm/cpu_mf.h +++ b/arch/s390/include/asm/cpu_mf.h | |||
@@ -189,6 +189,20 @@ static inline int ecctr(u64 ctr, u64 *val) | |||
189 | return cc; | 189 | return cc; |
190 | } | 190 | } |
191 | 191 | ||
192 | /* Store CPU counter multiple for the MT utilization counter set */ | ||
193 | static inline int stcctm5(u64 num, u64 *val) | ||
194 | { | ||
195 | typedef struct { u64 _[num]; } addrtype; | ||
196 | int cc; | ||
197 | |||
198 | asm volatile ( | ||
199 | " .insn rsy,0xeb0000000017,%2,5,%1\n" | ||
200 | " ipm %0\n" | ||
201 | " srl %0,28\n" | ||
202 | : "=d" (cc), "=Q" (*(addrtype *) val) : "d" (num) : "cc"); | ||
203 | return cc; | ||
204 | } | ||
205 | |||
192 | /* Query sampling information */ | 206 | /* Query sampling information */ |
193 | static inline int qsi(struct hws_qsi_info_block *info) | 207 | static inline int qsi(struct hws_qsi_info_block *info) |
194 | { | 208 | { |
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index f6e43d39e3d8..c9df40b5c0ac 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h | |||
@@ -163,8 +163,8 @@ extern unsigned int vdso_enabled; | |||
163 | the loader. We need to make sure that it is out of the way of the program | 163 | the loader. We need to make sure that it is out of the way of the program |
164 | that it will "exec", and that there is sufficient room for the brk. */ | 164 | that it will "exec", and that there is sufficient room for the brk. */ |
165 | 165 | ||
166 | extern unsigned long randomize_et_dyn(unsigned long base); | 166 | extern unsigned long randomize_et_dyn(void); |
167 | #define ELF_ET_DYN_BASE (randomize_et_dyn(STACK_TOP / 3 * 2)) | 167 | #define ELF_ET_DYN_BASE randomize_et_dyn() |
168 | 168 | ||
169 | /* This yields a mask that user programs can use to figure out what | 169 | /* This yields a mask that user programs can use to figure out what |
170 | instruction set this CPU supports. */ | 170 | instruction set this CPU supports. */ |
@@ -209,7 +209,9 @@ do { \ | |||
209 | } while (0) | 209 | } while (0) |
210 | #endif /* CONFIG_COMPAT */ | 210 | #endif /* CONFIG_COMPAT */ |
211 | 211 | ||
212 | #define STACK_RND_MASK 0x7ffUL | 212 | extern unsigned long mmap_rnd_mask; |
213 | |||
214 | #define STACK_RND_MASK (mmap_rnd_mask) | ||
213 | 215 | ||
214 | #define ARCH_DLINFO \ | 216 | #define ARCH_DLINFO \ |
215 | do { \ | 217 | do { \ |
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index abb618f1ead2..836c56290499 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h | |||
@@ -3,8 +3,12 @@ | |||
3 | 3 | ||
4 | #define ARCH_SUPPORTS_FTRACE_OPS 1 | 4 | #define ARCH_SUPPORTS_FTRACE_OPS 1 |
5 | 5 | ||
6 | #ifdef CC_USING_HOTPATCH | ||
7 | #define MCOUNT_INSN_SIZE 6 | ||
8 | #else | ||
6 | #define MCOUNT_INSN_SIZE 24 | 9 | #define MCOUNT_INSN_SIZE 24 |
7 | #define MCOUNT_RETURN_FIXUP 18 | 10 | #define MCOUNT_RETURN_FIXUP 18 |
11 | #endif | ||
8 | 12 | ||
9 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
10 | 14 | ||
@@ -37,18 +41,29 @@ struct ftrace_insn { | |||
37 | static inline void ftrace_generate_nop_insn(struct ftrace_insn *insn) | 41 | static inline void ftrace_generate_nop_insn(struct ftrace_insn *insn) |
38 | { | 42 | { |
39 | #ifdef CONFIG_FUNCTION_TRACER | 43 | #ifdef CONFIG_FUNCTION_TRACER |
44 | #ifdef CC_USING_HOTPATCH | ||
45 | /* brcl 0,0 */ | ||
46 | insn->opc = 0xc004; | ||
47 | insn->disp = 0; | ||
48 | #else | ||
40 | /* jg .+24 */ | 49 | /* jg .+24 */ |
41 | insn->opc = 0xc0f4; | 50 | insn->opc = 0xc0f4; |
42 | insn->disp = MCOUNT_INSN_SIZE / 2; | 51 | insn->disp = MCOUNT_INSN_SIZE / 2; |
43 | #endif | 52 | #endif |
53 | #endif | ||
44 | } | 54 | } |
45 | 55 | ||
46 | static inline int is_ftrace_nop(struct ftrace_insn *insn) | 56 | static inline int is_ftrace_nop(struct ftrace_insn *insn) |
47 | { | 57 | { |
48 | #ifdef CONFIG_FUNCTION_TRACER | 58 | #ifdef CONFIG_FUNCTION_TRACER |
59 | #ifdef CC_USING_HOTPATCH | ||
60 | if (insn->disp == 0) | ||
61 | return 1; | ||
62 | #else | ||
49 | if (insn->disp == MCOUNT_INSN_SIZE / 2) | 63 | if (insn->disp == MCOUNT_INSN_SIZE / 2) |
50 | return 1; | 64 | return 1; |
51 | #endif | 65 | #endif |
66 | #endif | ||
52 | return 0; | 67 | return 0; |
53 | } | 68 | } |
54 | 69 | ||
diff --git a/arch/s390/include/asm/jump_label.h b/arch/s390/include/asm/jump_label.h index 346b1c85ffb4..58642fd29c87 100644 --- a/arch/s390/include/asm/jump_label.h +++ b/arch/s390/include/asm/jump_label.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #define JUMP_LABEL_NOP_SIZE 6 | 6 | #define JUMP_LABEL_NOP_SIZE 6 |
7 | #define JUMP_LABEL_NOP_OFFSET 2 | ||
7 | 8 | ||
8 | #ifdef CONFIG_64BIT | 9 | #ifdef CONFIG_64BIT |
9 | #define ASM_PTR ".quad" | 10 | #define ASM_PTR ".quad" |
@@ -13,9 +14,13 @@ | |||
13 | #define ASM_ALIGN ".balign 4" | 14 | #define ASM_ALIGN ".balign 4" |
14 | #endif | 15 | #endif |
15 | 16 | ||
17 | /* | ||
18 | * We use a brcl 0,2 instruction for jump labels at compile time so it | ||
19 | * can be easily distinguished from a hotpatch generated instruction. | ||
20 | */ | ||
16 | static __always_inline bool arch_static_branch(struct static_key *key) | 21 | static __always_inline bool arch_static_branch(struct static_key *key) |
17 | { | 22 | { |
18 | asm_volatile_goto("0: brcl 0,0\n" | 23 | asm_volatile_goto("0: brcl 0,"__stringify(JUMP_LABEL_NOP_OFFSET)"\n" |
19 | ".pushsection __jump_table, \"aw\"\n" | 24 | ".pushsection __jump_table, \"aw\"\n" |
20 | ASM_ALIGN "\n" | 25 | ASM_ALIGN "\n" |
21 | ASM_PTR " 0b, %l[label], %0\n" | 26 | ASM_PTR " 0b, %l[label], %0\n" |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index ffb1d8ce97ae..0441ec24ae87 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -1758,6 +1758,10 @@ extern int s390_enable_sie(void); | |||
1758 | extern int s390_enable_skey(void); | 1758 | extern int s390_enable_skey(void); |
1759 | extern void s390_reset_cmma(struct mm_struct *mm); | 1759 | extern void s390_reset_cmma(struct mm_struct *mm); |
1760 | 1760 | ||
1761 | /* s390 has a private copy of get unmapped area to deal with cache synonyms */ | ||
1762 | #define HAVE_ARCH_UNMAPPED_AREA | ||
1763 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | ||
1764 | |||
1761 | /* | 1765 | /* |
1762 | * No page table caches to initialise | 1766 | * No page table caches to initialise |
1763 | */ | 1767 | */ |
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index bed05ea7ec27..e7cbbdcdee13 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h | |||
@@ -215,10 +215,7 @@ static inline unsigned short stap(void) | |||
215 | /* | 215 | /* |
216 | * Give up the time slice of the virtual PU. | 216 | * Give up the time slice of the virtual PU. |
217 | */ | 217 | */ |
218 | static inline void cpu_relax(void) | 218 | void cpu_relax(void); |
219 | { | ||
220 | barrier(); | ||
221 | } | ||
222 | 219 | ||
223 | #define cpu_relax_lowlatency() barrier() | 220 | #define cpu_relax_lowlatency() barrier() |
224 | 221 | ||
diff --git a/arch/s390/include/asm/reset.h b/arch/s390/include/asm/reset.h index 804578587a7a..72786067b300 100644 --- a/arch/s390/include/asm/reset.h +++ b/arch/s390/include/asm/reset.h | |||
@@ -15,5 +15,6 @@ struct reset_call { | |||
15 | 15 | ||
16 | extern void register_reset_call(struct reset_call *reset); | 16 | extern void register_reset_call(struct reset_call *reset); |
17 | extern void unregister_reset_call(struct reset_call *reset); | 17 | extern void unregister_reset_call(struct reset_call *reset); |
18 | extern void s390_reset_system(void (*func)(void *), void *data); | 18 | extern void s390_reset_system(void (*fn_pre)(void), |
19 | void (*fn_post)(void *), void *data); | ||
19 | #endif /* _ASM_S390_RESET_H */ | 20 | #endif /* _ASM_S390_RESET_H */ |
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index 1aba89b53cb9..edb453cfc2c6 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
@@ -27,7 +27,7 @@ struct sclp_ipl_info { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct sclp_cpu_entry { | 29 | struct sclp_cpu_entry { |
30 | u8 address; | 30 | u8 core_id; |
31 | u8 reserved0[2]; | 31 | u8 reserved0[2]; |
32 | u8 : 3; | 32 | u8 : 3; |
33 | u8 siif : 1; | 33 | u8 siif : 1; |
@@ -51,6 +51,9 @@ int sclp_cpu_deconfigure(u8 cpu); | |||
51 | unsigned long long sclp_get_rnmax(void); | 51 | unsigned long long sclp_get_rnmax(void); |
52 | unsigned long long sclp_get_rzm(void); | 52 | unsigned long long sclp_get_rzm(void); |
53 | unsigned int sclp_get_max_cpu(void); | 53 | unsigned int sclp_get_max_cpu(void); |
54 | unsigned int sclp_get_mtid(u8 cpu_type); | ||
55 | unsigned int sclp_get_mtid_max(void); | ||
56 | unsigned int sclp_get_mtid_prev(void); | ||
54 | int sclp_sdias_blk_count(void); | 57 | int sclp_sdias_blk_count(void); |
55 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); | 58 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); |
56 | int sclp_chp_configure(struct chp_id chpid); | 59 | int sclp_chp_configure(struct chp_id chpid); |
@@ -68,4 +71,6 @@ void sclp_early_detect(void); | |||
68 | int sclp_has_siif(void); | 71 | int sclp_has_siif(void); |
69 | unsigned int sclp_get_ibc(void); | 72 | unsigned int sclp_get_ibc(void); |
70 | 73 | ||
74 | long _sclp_print_early(const char *); | ||
75 | |||
71 | #endif /* _ASM_S390_SCLP_H */ | 76 | #endif /* _ASM_S390_SCLP_H */ |
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index 7736fdd72595..b8d1e54b4733 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h | |||
@@ -57,6 +57,7 @@ extern void detect_memory_memblock(void); | |||
57 | #define MACHINE_FLAG_TE (1UL << 15) | 57 | #define MACHINE_FLAG_TE (1UL << 15) |
58 | #define MACHINE_FLAG_TLB_LC (1UL << 17) | 58 | #define MACHINE_FLAG_TLB_LC (1UL << 17) |
59 | #define MACHINE_FLAG_VX (1UL << 18) | 59 | #define MACHINE_FLAG_VX (1UL << 18) |
60 | #define MACHINE_FLAG_CAD (1UL << 19) | ||
60 | 61 | ||
61 | #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) | 62 | #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) |
62 | #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) | 63 | #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) |
@@ -80,6 +81,7 @@ extern void detect_memory_memblock(void); | |||
80 | #define MACHINE_HAS_TE (0) | 81 | #define MACHINE_HAS_TE (0) |
81 | #define MACHINE_HAS_TLB_LC (0) | 82 | #define MACHINE_HAS_TLB_LC (0) |
82 | #define MACHINE_HAS_VX (0) | 83 | #define MACHINE_HAS_VX (0) |
84 | #define MACHINE_HAS_CAD (0) | ||
83 | #else /* CONFIG_64BIT */ | 85 | #else /* CONFIG_64BIT */ |
84 | #define MACHINE_HAS_IEEE (1) | 86 | #define MACHINE_HAS_IEEE (1) |
85 | #define MACHINE_HAS_CSP (1) | 87 | #define MACHINE_HAS_CSP (1) |
@@ -93,6 +95,7 @@ extern void detect_memory_memblock(void); | |||
93 | #define MACHINE_HAS_TE (S390_lowcore.machine_flags & MACHINE_FLAG_TE) | 95 | #define MACHINE_HAS_TE (S390_lowcore.machine_flags & MACHINE_FLAG_TE) |
94 | #define MACHINE_HAS_TLB_LC (S390_lowcore.machine_flags & MACHINE_FLAG_TLB_LC) | 96 | #define MACHINE_HAS_TLB_LC (S390_lowcore.machine_flags & MACHINE_FLAG_TLB_LC) |
95 | #define MACHINE_HAS_VX (S390_lowcore.machine_flags & MACHINE_FLAG_VX) | 97 | #define MACHINE_HAS_VX (S390_lowcore.machine_flags & MACHINE_FLAG_VX) |
98 | #define MACHINE_HAS_CAD (S390_lowcore.machine_flags & MACHINE_FLAG_CAD) | ||
96 | #endif /* CONFIG_64BIT */ | 99 | #endif /* CONFIG_64BIT */ |
97 | 100 | ||
98 | /* | 101 | /* |
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h index fad4ae23ece0..ec60cf7fa0a2 100644 --- a/arch/s390/include/asm/sigp.h +++ b/arch/s390/include/asm/sigp.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define SIGP_SET_ARCHITECTURE 18 | 16 | #define SIGP_SET_ARCHITECTURE 18 |
17 | #define SIGP_COND_EMERGENCY_SIGNAL 19 | 17 | #define SIGP_COND_EMERGENCY_SIGNAL 19 |
18 | #define SIGP_SENSE_RUNNING 21 | 18 | #define SIGP_SENSE_RUNNING 21 |
19 | #define SIGP_SET_MULTI_THREADING 22 | ||
19 | #define SIGP_STORE_ADDITIONAL_STATUS 23 | 20 | #define SIGP_STORE_ADDITIONAL_STATUS 23 |
20 | 21 | ||
21 | /* SIGP condition codes */ | 22 | /* SIGP condition codes */ |
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h index 762d4f88af5a..b3bd0282dd98 100644 --- a/arch/s390/include/asm/smp.h +++ b/arch/s390/include/asm/smp.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #define raw_smp_processor_id() (S390_lowcore.cpu_nr) | 16 | #define raw_smp_processor_id() (S390_lowcore.cpu_nr) |
17 | 17 | ||
18 | extern struct mutex smp_cpu_state_mutex; | 18 | extern struct mutex smp_cpu_state_mutex; |
19 | extern unsigned int smp_cpu_mt_shift; | ||
20 | extern unsigned int smp_cpu_mtid; | ||
19 | 21 | ||
20 | extern int __cpu_up(unsigned int cpu, struct task_struct *tidle); | 22 | extern int __cpu_up(unsigned int cpu, struct task_struct *tidle); |
21 | 23 | ||
@@ -35,6 +37,8 @@ extern void smp_fill_possible_mask(void); | |||
35 | 37 | ||
36 | #else /* CONFIG_SMP */ | 38 | #else /* CONFIG_SMP */ |
37 | 39 | ||
40 | #define smp_cpu_mtid 0 | ||
41 | |||
38 | static inline void smp_call_ipl_cpu(void (*func)(void *), void *data) | 42 | static inline void smp_call_ipl_cpu(void (*func)(void *), void *data) |
39 | { | 43 | { |
40 | func(data); | 44 | func(data); |
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h index f92428e459f8..73f12d21af4d 100644 --- a/arch/s390/include/asm/sysinfo.h +++ b/arch/s390/include/asm/sysinfo.h | |||
@@ -90,7 +90,11 @@ struct sysinfo_2_2_2 { | |||
90 | unsigned short cpus_reserved; | 90 | unsigned short cpus_reserved; |
91 | char name[8]; | 91 | char name[8]; |
92 | unsigned int caf; | 92 | unsigned int caf; |
93 | char reserved_2[16]; | 93 | char reserved_2[8]; |
94 | unsigned char mt_installed; | ||
95 | unsigned char mt_general; | ||
96 | unsigned char mt_psmtid; | ||
97 | char reserved_3[5]; | ||
94 | unsigned short cpus_dedicated; | 98 | unsigned short cpus_dedicated; |
95 | unsigned short cpus_shared; | 99 | unsigned short cpus_shared; |
96 | }; | 100 | }; |
@@ -120,26 +124,28 @@ struct sysinfo_3_2_2 { | |||
120 | 124 | ||
121 | extern int topology_max_mnest; | 125 | extern int topology_max_mnest; |
122 | 126 | ||
123 | #define TOPOLOGY_CPU_BITS 64 | 127 | #define TOPOLOGY_CORE_BITS 64 |
124 | #define TOPOLOGY_NR_MAG 6 | 128 | #define TOPOLOGY_NR_MAG 6 |
125 | 129 | ||
126 | struct topology_cpu { | 130 | struct topology_core { |
127 | unsigned char reserved0[4]; | 131 | unsigned char nl; |
132 | unsigned char reserved0[3]; | ||
128 | unsigned char :6; | 133 | unsigned char :6; |
129 | unsigned char pp:2; | 134 | unsigned char pp:2; |
130 | unsigned char reserved1; | 135 | unsigned char reserved1; |
131 | unsigned short origin; | 136 | unsigned short origin; |
132 | unsigned long mask[TOPOLOGY_CPU_BITS / BITS_PER_LONG]; | 137 | unsigned long mask[TOPOLOGY_CORE_BITS / BITS_PER_LONG]; |
133 | }; | 138 | }; |
134 | 139 | ||
135 | struct topology_container { | 140 | struct topology_container { |
136 | unsigned char reserved[7]; | 141 | unsigned char nl; |
142 | unsigned char reserved[6]; | ||
137 | unsigned char id; | 143 | unsigned char id; |
138 | }; | 144 | }; |
139 | 145 | ||
140 | union topology_entry { | 146 | union topology_entry { |
141 | unsigned char nl; | 147 | unsigned char nl; |
142 | struct topology_cpu cpu; | 148 | struct topology_core cpu; |
143 | struct topology_container container; | 149 | struct topology_container container; |
144 | }; | 150 | }; |
145 | 151 | ||
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index 56af53093d24..c4fbb9527c5c 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h | |||
@@ -9,9 +9,11 @@ struct cpu; | |||
9 | #ifdef CONFIG_SCHED_BOOK | 9 | #ifdef CONFIG_SCHED_BOOK |
10 | 10 | ||
11 | struct cpu_topology_s390 { | 11 | struct cpu_topology_s390 { |
12 | unsigned short thread_id; | ||
12 | unsigned short core_id; | 13 | unsigned short core_id; |
13 | unsigned short socket_id; | 14 | unsigned short socket_id; |
14 | unsigned short book_id; | 15 | unsigned short book_id; |
16 | cpumask_t thread_mask; | ||
15 | cpumask_t core_mask; | 17 | cpumask_t core_mask; |
16 | cpumask_t book_mask; | 18 | cpumask_t book_mask; |
17 | }; | 19 | }; |
@@ -19,6 +21,8 @@ struct cpu_topology_s390 { | |||
19 | extern struct cpu_topology_s390 cpu_topology[NR_CPUS]; | 21 | extern struct cpu_topology_s390 cpu_topology[NR_CPUS]; |
20 | 22 | ||
21 | #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) | 23 | #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) |
24 | #define topology_thread_id(cpu) (cpu_topology[cpu].thread_id) | ||
25 | #define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_mask) | ||
22 | #define topology_core_id(cpu) (cpu_topology[cpu].core_id) | 26 | #define topology_core_id(cpu) (cpu_topology[cpu].core_id) |
23 | #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_mask) | 27 | #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_mask) |
24 | #define topology_book_id(cpu) (cpu_topology[cpu].book_id) | 28 | #define topology_book_id(cpu) (cpu_topology[cpu].book_id) |