diff options
Diffstat (limited to 'arch/mips/include/asm/cpu-features.h')
-rw-r--r-- | arch/mips/include/asm/cpu-features.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 2897cfafcaf0..0d8208de9a3f 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -38,6 +38,9 @@ | |||
38 | #ifndef cpu_has_maar | 38 | #ifndef cpu_has_maar |
39 | #define cpu_has_maar (cpu_data[0].options & MIPS_CPU_MAAR) | 39 | #define cpu_has_maar (cpu_data[0].options & MIPS_CPU_MAAR) |
40 | #endif | 40 | #endif |
41 | #ifndef cpu_has_rw_llb | ||
42 | #define cpu_has_rw_llb (cpu_data[0].options & MIPS_CPU_RW_LLB) | ||
43 | #endif | ||
41 | 44 | ||
42 | /* | 45 | /* |
43 | * For the moment we don't consider R6000 and R8000 so we can assume that | 46 | * For the moment we don't consider R6000 and R8000 so we can assume that |
@@ -171,6 +174,9 @@ | |||
171 | #endif | 174 | #endif |
172 | #endif | 175 | #endif |
173 | 176 | ||
177 | #ifndef cpu_has_mips_1 | ||
178 | # define cpu_has_mips_1 (!cpu_has_mips_r6) | ||
179 | #endif | ||
174 | #ifndef cpu_has_mips_2 | 180 | #ifndef cpu_has_mips_2 |
175 | # define cpu_has_mips_2 (cpu_data[0].isa_level & MIPS_CPU_ISA_II) | 181 | # define cpu_has_mips_2 (cpu_data[0].isa_level & MIPS_CPU_ISA_II) |
176 | #endif | 182 | #endif |
@@ -189,12 +195,18 @@ | |||
189 | #ifndef cpu_has_mips32r2 | 195 | #ifndef cpu_has_mips32r2 |
190 | # define cpu_has_mips32r2 (cpu_data[0].isa_level & MIPS_CPU_ISA_M32R2) | 196 | # define cpu_has_mips32r2 (cpu_data[0].isa_level & MIPS_CPU_ISA_M32R2) |
191 | #endif | 197 | #endif |
198 | #ifndef cpu_has_mips32r6 | ||
199 | # define cpu_has_mips32r6 (cpu_data[0].isa_level & MIPS_CPU_ISA_M32R6) | ||
200 | #endif | ||
192 | #ifndef cpu_has_mips64r1 | 201 | #ifndef cpu_has_mips64r1 |
193 | # define cpu_has_mips64r1 (cpu_data[0].isa_level & MIPS_CPU_ISA_M64R1) | 202 | # define cpu_has_mips64r1 (cpu_data[0].isa_level & MIPS_CPU_ISA_M64R1) |
194 | #endif | 203 | #endif |
195 | #ifndef cpu_has_mips64r2 | 204 | #ifndef cpu_has_mips64r2 |
196 | # define cpu_has_mips64r2 (cpu_data[0].isa_level & MIPS_CPU_ISA_M64R2) | 205 | # define cpu_has_mips64r2 (cpu_data[0].isa_level & MIPS_CPU_ISA_M64R2) |
197 | #endif | 206 | #endif |
207 | #ifndef cpu_has_mips64r6 | ||
208 | # define cpu_has_mips64r6 (cpu_data[0].isa_level & MIPS_CPU_ISA_M64R6) | ||
209 | #endif | ||
198 | 210 | ||
199 | /* | 211 | /* |
200 | * Shortcuts ... | 212 | * Shortcuts ... |
@@ -208,17 +220,23 @@ | |||
208 | #define cpu_has_mips_4_5_r (cpu_has_mips_4 | cpu_has_mips_5_r) | 220 | #define cpu_has_mips_4_5_r (cpu_has_mips_4 | cpu_has_mips_5_r) |
209 | #define cpu_has_mips_5_r (cpu_has_mips_5 | cpu_has_mips_r) | 221 | #define cpu_has_mips_5_r (cpu_has_mips_5 | cpu_has_mips_r) |
210 | 222 | ||
211 | #define cpu_has_mips_4_5_r2 (cpu_has_mips_4_5 | cpu_has_mips_r2) | 223 | #define cpu_has_mips_4_5_r2_r6 (cpu_has_mips_4_5 | cpu_has_mips_r2 | \ |
224 | cpu_has_mips_r6) | ||
212 | 225 | ||
213 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2) | 226 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2 | cpu_has_mips32r6) |
214 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2) | 227 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2 | cpu_has_mips64r6) |
215 | #define cpu_has_mips_r1 (cpu_has_mips32r1 | cpu_has_mips64r1) | 228 | #define cpu_has_mips_r1 (cpu_has_mips32r1 | cpu_has_mips64r1) |
216 | #define cpu_has_mips_r2 (cpu_has_mips32r2 | cpu_has_mips64r2) | 229 | #define cpu_has_mips_r2 (cpu_has_mips32r2 | cpu_has_mips64r2) |
230 | #define cpu_has_mips_r6 (cpu_has_mips32r6 | cpu_has_mips64r6) | ||
217 | #define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \ | 231 | #define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \ |
218 | cpu_has_mips64r1 | cpu_has_mips64r2) | 232 | cpu_has_mips32r6 | cpu_has_mips64r1 | \ |
233 | cpu_has_mips64r2 | cpu_has_mips64r6) | ||
234 | |||
235 | /* MIPSR2 and MIPSR6 have a lot of similarities */ | ||
236 | #define cpu_has_mips_r2_r6 (cpu_has_mips_r2 | cpu_has_mips_r6) | ||
219 | 237 | ||
220 | #ifndef cpu_has_mips_r2_exec_hazard | 238 | #ifndef cpu_has_mips_r2_exec_hazard |
221 | #define cpu_has_mips_r2_exec_hazard cpu_has_mips_r2 | 239 | #define cpu_has_mips_r2_exec_hazard (cpu_has_mips_r2 | cpu_has_mips_r6) |
222 | #endif | 240 | #endif |
223 | 241 | ||
224 | /* | 242 | /* |