@@ -131,40 +131,48 @@ static inline void cpu_feature_keys_init(void) { }
131
131
132
132
/* CPU kernel features */
133
133
134
- /* Retain the 32b definitions all use bottom half of word */
134
+ /* Definitions for features that we have on both 32-bit and 64-bit chips */
135
135
#define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x00000001)
136
- #define CPU_FTR_L2CR ASM_CONST(0x00000002)
137
- #define CPU_FTR_SPEC7450 ASM_CONST(0x00000004)
138
- #define CPU_FTR_ALTIVEC ASM_CONST(0x00000008)
139
- #define CPU_FTR_TAU ASM_CONST(0x00000010)
140
- #define CPU_FTR_CAN_DOZE ASM_CONST(0x00000020)
141
- #define CPU_FTR_USE_RTC ASM_CONST(0x00000040)
142
- #define CPU_FTR_601 ASM_CONST(0x00000100)
143
- #define CPU_FTR_DBELL ASM_CONST(0x00000200)
144
- #define CPU_FTR_CAN_NAP ASM_CONST(0x00000400)
145
- #define CPU_FTR_L3CR ASM_CONST(0x00000800)
146
- #define CPU_FTR_L3_DISABLE_NAP ASM_CONST(0x00001000)
147
- #define CPU_FTR_NAP_DISABLE_L2_PR ASM_CONST(0x00002000)
148
- #define CPU_FTR_DUAL_PLL_750FX ASM_CONST(0x00004000)
149
- #define CPU_FTR_NO_DPM ASM_CONST(0x00008000)
150
- #define CPU_FTR_476_DD2 ASM_CONST(0x00010000)
151
- #define CPU_FTR_NEED_COHERENT ASM_CONST(0x00020000)
152
- #define CPU_FTR_NO_BTIC ASM_CONST(0x00040000)
153
- #define CPU_FTR_DEBUG_LVL_EXC ASM_CONST(0x00080000)
154
- #define CPU_FTR_NODSISRALIGN ASM_CONST(0x00100000)
155
- #define CPU_FTR_PPC_LE ASM_CONST(0x00200000)
156
- #define CPU_FTR_REAL_LE ASM_CONST(0x00400000)
157
- #define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x00800000)
158
- #define CPU_FTR_UNIFIED_ID_CACHE ASM_CONST(0x01000000)
159
- #define CPU_FTR_SPE ASM_CONST(0x02000000)
160
- #define CPU_FTR_NEED_PAIRED_STWCX ASM_CONST(0x04000000)
161
- #define CPU_FTR_LWSYNC ASM_CONST(0x08000000)
162
- #define CPU_FTR_NOEXECUTE ASM_CONST(0x10000000)
163
- #define CPU_FTR_INDEXED_DCR ASM_CONST(0x20000000)
164
- #define CPU_FTR_EMB_HV ASM_CONST(0x40000000)
136
+ #define CPU_FTR_ALTIVEC ASM_CONST(0x00000002)
137
+ #define CPU_FTR_DBELL ASM_CONST(0x00000004)
138
+ #define CPU_FTR_CAN_NAP ASM_CONST(0x00000008)
139
+ #define CPU_FTR_DEBUG_LVL_EXC ASM_CONST(0x00000010)
140
+ #define CPU_FTR_NODSISRALIGN ASM_CONST(0x00000020)
141
+ #define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x00000040)
142
+ #define CPU_FTR_LWSYNC ASM_CONST(0x00000080)
143
+ #define CPU_FTR_NOEXECUTE ASM_CONST(0x00000100)
144
+ #define CPU_FTR_EMB_HV ASM_CONST(0x00000200)
145
+
146
+ /* Definitions for features that only exist on 32-bit chips */
147
+ #ifdef CONFIG_PPC32
148
+ #define CPU_FTR_601 ASM_CONST(0x00001000)
149
+ #define CPU_FTR_L2CR ASM_CONST(0x00002000)
150
+ #define CPU_FTR_SPEC7450 ASM_CONST(0x00004000)
151
+ #define CPU_FTR_TAU ASM_CONST(0x00008000)
152
+ #define CPU_FTR_CAN_DOZE ASM_CONST(0x00010000)
153
+ #define CPU_FTR_USE_RTC ASM_CONST(0x00020000)
154
+ #define CPU_FTR_L3CR ASM_CONST(0x00040000)
155
+ #define CPU_FTR_L3_DISABLE_NAP ASM_CONST(0x00080000)
156
+ #define CPU_FTR_NAP_DISABLE_L2_PR ASM_CONST(0x00100000)
157
+ #define CPU_FTR_DUAL_PLL_750FX ASM_CONST(0x00200000)
158
+ #define CPU_FTR_NO_DPM ASM_CONST(0x00400000)
159
+ #define CPU_FTR_476_DD2 ASM_CONST(0x00800000)
160
+ #define CPU_FTR_NEED_COHERENT ASM_CONST(0x01000000)
161
+ #define CPU_FTR_NO_BTIC ASM_CONST(0x02000000)
162
+ #define CPU_FTR_PPC_LE ASM_CONST(0x04000000)
163
+ #define CPU_FTR_UNIFIED_ID_CACHE ASM_CONST(0x08000000)
164
+ #define CPU_FTR_SPE ASM_CONST(0x10000000)
165
+ #define CPU_FTR_NEED_PAIRED_STWCX ASM_CONST(0x20000000)
166
+ #define CPU_FTR_INDEXED_DCR ASM_CONST(0x40000000)
167
+
168
+ #else /* CONFIG_PPC32 */
169
+ /* Define these to 0 for the sake of tests in common code */
170
+ #define CPU_FTR_601 (0)
171
+ #define CPU_FTR_PPC_LE (0)
172
+ #endif
165
173
166
174
/*
167
- * Add the 64-bit processor unique features in the top half of the word ;
175
+ * Definitions for the 64-bit processor unique features;
168
176
* on 32-bit, make the names available but defined to be 0.
169
177
*/
170
178
#ifdef __powerpc64__
@@ -173,37 +181,38 @@ static inline void cpu_feature_keys_init(void) { }
173
181
#define LONG_ASM_CONST (x ) 0
174
182
#endif
175
183
176
- #define CPU_FTR_HVMODE LONG_ASM_CONST(0x0000000100000000)
177
- #define CPU_FTR_ARCH_201 LONG_ASM_CONST(0x0000000200000000)
178
- #define CPU_FTR_ARCH_206 LONG_ASM_CONST(0x0000000400000000)
179
- #define CPU_FTR_ARCH_207S LONG_ASM_CONST(0x0000000800000000)
180
- #define CPU_FTR_ARCH_300 LONG_ASM_CONST(0x0000001000000000)
181
- #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000002000000000)
182
- #define CPU_FTR_CTRL LONG_ASM_CONST(0x0000004000000000)
183
- #define CPU_FTR_SMT LONG_ASM_CONST(0x0000008000000000)
184
- #define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000010000000000)
185
- #define CPU_FTR_PURR LONG_ASM_CONST(0x0000020000000000)
186
- #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000040000000000)
187
- #define CPU_FTR_SPURR LONG_ASM_CONST(0x0000080000000000)
188
- #define CPU_FTR_DSCR LONG_ASM_CONST(0x0000100000000000)
189
- #define CPU_FTR_VSX LONG_ASM_CONST(0x0000200000000000)
190
- #define CPU_FTR_SAO LONG_ASM_CONST(0x0000400000000000)
191
- #define CPU_FTR_CP_USE_DCBTZ LONG_ASM_CONST(0x0000800000000000)
192
- #define CPU_FTR_UNALIGNED_LD_STD LONG_ASM_CONST(0x0001000000000000)
193
- #define CPU_FTR_ASYM_SMT LONG_ASM_CONST(0x0002000000000000)
194
- #define CPU_FTR_STCX_CHECKS_ADDRESS LONG_ASM_CONST(0x0004000000000000)
195
- #define CPU_FTR_POPCNTB LONG_ASM_CONST(0x0008000000000000)
196
- #define CPU_FTR_POPCNTD LONG_ASM_CONST(0x0010000000000000)
197
- #define CPU_FTR_PKEY LONG_ASM_CONST(0x0020000000000000)
198
- #define CPU_FTR_VMX_COPY LONG_ASM_CONST(0x0040000000000000)
199
- #define CPU_FTR_TM LONG_ASM_CONST(0x0080000000000000)
200
- #define CPU_FTR_CFAR LONG_ASM_CONST(0x0100000000000000)
201
- #define CPU_FTR_HAS_PPR LONG_ASM_CONST(0x0200000000000000)
202
- #define CPU_FTR_DAWR LONG_ASM_CONST(0x0400000000000000)
203
- #define CPU_FTR_DABRX LONG_ASM_CONST(0x0800000000000000)
204
- #define CPU_FTR_PMAO_BUG LONG_ASM_CONST(0x1000000000000000)
205
- #define CPU_FTR_POWER9_DD1 LONG_ASM_CONST(0x4000000000000000)
206
- #define CPU_FTR_POWER9_DD2_1 LONG_ASM_CONST(0x8000000000000000)
184
+ #define CPU_FTR_REAL_LE LONG_ASM_CONST(0x0000000000001000)
185
+ #define CPU_FTR_HVMODE LONG_ASM_CONST(0x0000000000002000)
186
+ #define CPU_FTR_ARCH_201 LONG_ASM_CONST(0x0000000000004000)
187
+ #define CPU_FTR_ARCH_206 LONG_ASM_CONST(0x0000000000008000)
188
+ #define CPU_FTR_ARCH_207S LONG_ASM_CONST(0x0000000000010000)
189
+ #define CPU_FTR_ARCH_300 LONG_ASM_CONST(0x0000000000020000)
190
+ #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000000000040000)
191
+ #define CPU_FTR_CTRL LONG_ASM_CONST(0x0000000000080000)
192
+ #define CPU_FTR_SMT LONG_ASM_CONST(0x0000000000100000)
193
+ #define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000000000200000)
194
+ #define CPU_FTR_PURR LONG_ASM_CONST(0x0000000000400000)
195
+ #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000000000800000)
196
+ #define CPU_FTR_SPURR LONG_ASM_CONST(0x0000000001000000)
197
+ #define CPU_FTR_DSCR LONG_ASM_CONST(0x0000000002000000)
198
+ #define CPU_FTR_VSX LONG_ASM_CONST(0x0000000004000000)
199
+ #define CPU_FTR_SAO LONG_ASM_CONST(0x0000000008000000)
200
+ #define CPU_FTR_CP_USE_DCBTZ LONG_ASM_CONST(0x0000000010000000)
201
+ #define CPU_FTR_UNALIGNED_LD_STD LONG_ASM_CONST(0x0000000020000000)
202
+ #define CPU_FTR_ASYM_SMT LONG_ASM_CONST(0x0000000040000000)
203
+ #define CPU_FTR_STCX_CHECKS_ADDRESS LONG_ASM_CONST(0x0000000080000000)
204
+ #define CPU_FTR_POPCNTB LONG_ASM_CONST(0x0000000100000000)
205
+ #define CPU_FTR_POPCNTD LONG_ASM_CONST(0x0000000200000000)
206
+ #define CPU_FTR_PKEY LONG_ASM_CONST(0x0000000400000000)
207
+ #define CPU_FTR_VMX_COPY LONG_ASM_CONST(0x0000000800000000)
208
+ #define CPU_FTR_TM LONG_ASM_CONST(0x0000001000000000)
209
+ #define CPU_FTR_CFAR LONG_ASM_CONST(0x0000002000000000)
210
+ #define CPU_FTR_HAS_PPR LONG_ASM_CONST(0x0000004000000000)
211
+ #define CPU_FTR_DAWR LONG_ASM_CONST(0x0000008000000000)
212
+ #define CPU_FTR_DABRX LONG_ASM_CONST(0x0000010000000000)
213
+ #define CPU_FTR_PMAO_BUG LONG_ASM_CONST(0x0000020000000000)
214
+ #define CPU_FTR_POWER9_DD1 LONG_ASM_CONST(0x0000040000000000)
215
+ #define CPU_FTR_POWER9_DD2_1 LONG_ASM_CONST(0x0000080000000000)
207
216
208
217
#ifndef __ASSEMBLY__
209
218
0 commit comments