diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-17 15:50:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-17 15:50:54 -0400 |
commit | bfaf245022b4b8661af2e35f467cf0e91943c24c (patch) | |
tree | b5a6ee49a047557a791eb897c8c9545a155e36b7 /arch/mips/include/asm/cpu-features.h | |
parent | 96d928ed75c4ba4253e82910a697ec7b06ace8b4 (diff) | |
parent | 3e20a26b02bd4f24945c87407df51948dd488620 (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
"This is the main pull request for MIPS for Linux 4.1. Most
noteworthy:
- Add more Octeon-optimized crypto functions
- Octeon crypto preemption and locking fixes
- Little endian support for Octeon
- Use correct CSR to soft reset Octeons
- Support LEDs on the Octeon-based DSR-1000N
- Fix PCI interrupt mapping for the Octeon-based DSR-1000N
- Mark prom_free_prom_memory() as __init for a number of systems
- Support for Imagination's Pistachio SOC. This includes arch and
CLK bits. I'd like to merge pinctrl bits later
- Improve parallelism of csum_partial for certain pipelines
- Organize DTB files in subdirs like other architectures
- Implement read_sched_clock for all MIPS platforms other than
Octeon
- Massive series of 38 fixes and cleanups for the FPU emulator /
kernel
- Further FPU remulator work to support new features. This sits on a
separate branch which also has been pulled into the 4.1 KVM branch
- Clean up and fixes for the SEAD3 eval board; remove unused file
- Various updates for Netlogic platforms
- A number of small updates for Loongson 3 platforms
- Increase the memory limit for ATH79 platforms to 256MB
- A fair number of fixes and updates for BCM47xx platforms
- Finish the implementation of XPA support
- MIPS FDC support. No, not floppy controller but Fast Debug Channel :)
- Detect the R16000 used in SGI legacy platforms
- Fix Kconfig dependencies for the SSB bus support"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (265 commits)
MIPS: Makefile: Fix MIPS ASE detection code
MIPS: asm: elf: Set O32 default FPU flags
MIPS: BCM47XX: Fix detecting Microsoft MN-700 & Asus WL500G
MIPS: Kconfig: Disable SMP/CPS for 64-bit
MIPS: Hibernate: flush TLB entries earlier
MIPS: smp-cps: cpu_set FPU mask if FPU present
MIPS: lose_fpu(): Disable FPU when MSA enabled
MIPS: ralink: add missing symbol for RALINK_ILL_ACC
MIPS: ralink: Fix bad config symbol in PCI makefile.
SSB: fix Kconfig dependencies
MIPS: Malta: Detect and fix bad memsize values
Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores."
MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard.
MIPS: Fix cpu_has_mips_r2_exec_hazard.
MIPS: kernel: entry.S: Set correct ISA level for mips_ihb
MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case
MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes
MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter
MIPS: unaligned: Fix regular load/store instruction emulation for EVA
MIPS: unaligned: Surround load/store macros in do {} while statements
...
Diffstat (limited to 'arch/mips/include/asm/cpu-features.h')
-rw-r--r-- | arch/mips/include/asm/cpu-features.h | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 0d8208de9a3f..5aeaf19c26b0 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -68,6 +68,7 @@ | |||
68 | #ifndef cpu_has_octeon_cache | 68 | #ifndef cpu_has_octeon_cache |
69 | #define cpu_has_octeon_cache 0 | 69 | #define cpu_has_octeon_cache 0 |
70 | #endif | 70 | #endif |
71 | /* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */ | ||
71 | #ifndef cpu_has_fpu | 72 | #ifndef cpu_has_fpu |
72 | #define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU) | 73 | #define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU) |
73 | #define raw_cpu_has_fpu (raw_current_cpu_data.options & MIPS_CPU_FPU) | 74 | #define raw_cpu_has_fpu (raw_current_cpu_data.options & MIPS_CPU_FPU) |
@@ -139,6 +140,9 @@ | |||
139 | # endif | 140 | # endif |
140 | #endif | 141 | #endif |
141 | 142 | ||
143 | #ifndef cpu_has_xpa | ||
144 | #define cpu_has_xpa (cpu_data[0].options & MIPS_CPU_XPA) | ||
145 | #endif | ||
142 | #ifndef cpu_has_vtag_icache | 146 | #ifndef cpu_has_vtag_icache |
143 | #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) | 147 | #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) |
144 | #endif | 148 | #endif |
@@ -220,8 +224,11 @@ | |||
220 | #define cpu_has_mips_4_5_r (cpu_has_mips_4 | cpu_has_mips_5_r) | 224 | #define cpu_has_mips_4_5_r (cpu_has_mips_4 | cpu_has_mips_5_r) |
221 | #define cpu_has_mips_5_r (cpu_has_mips_5 | cpu_has_mips_r) | 225 | #define cpu_has_mips_5_r (cpu_has_mips_5 | cpu_has_mips_r) |
222 | 226 | ||
223 | #define cpu_has_mips_4_5_r2_r6 (cpu_has_mips_4_5 | cpu_has_mips_r2 | \ | 227 | #define cpu_has_mips_3_4_5_64_r2_r6 \ |
224 | cpu_has_mips_r6) | 228 | (cpu_has_mips_3 | cpu_has_mips_4_5_64_r2_r6) |
229 | #define cpu_has_mips_4_5_64_r2_r6 \ | ||
230 | (cpu_has_mips_4_5 | cpu_has_mips64r1 | \ | ||
231 | cpu_has_mips_r2 | cpu_has_mips_r6) | ||
225 | 232 | ||
226 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2 | cpu_has_mips32r6) | 233 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2 | cpu_has_mips32r6) |
227 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2 | cpu_has_mips64r6) | 234 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2 | cpu_has_mips64r6) |
@@ -235,8 +242,39 @@ | |||
235 | /* MIPSR2 and MIPSR6 have a lot of similarities */ | 242 | /* MIPSR2 and MIPSR6 have a lot of similarities */ |
236 | #define cpu_has_mips_r2_r6 (cpu_has_mips_r2 | cpu_has_mips_r6) | 243 | #define cpu_has_mips_r2_r6 (cpu_has_mips_r2 | cpu_has_mips_r6) |
237 | 244 | ||
245 | /* | ||
246 | * cpu_has_mips_r2_exec_hazard - return if IHB is required on current processor | ||
247 | * | ||
248 | * Returns non-zero value if the current processor implementation requires | ||
249 | * an IHB instruction to deal with an instruction hazard as per MIPS R2 | ||
250 | * architecture specification, zero otherwise. | ||
251 | */ | ||
238 | #ifndef cpu_has_mips_r2_exec_hazard | 252 | #ifndef cpu_has_mips_r2_exec_hazard |
239 | #define cpu_has_mips_r2_exec_hazard (cpu_has_mips_r2 | cpu_has_mips_r6) | 253 | #define cpu_has_mips_r2_exec_hazard \ |
254 | ({ \ | ||
255 | int __res; \ | ||
256 | \ | ||
257 | switch (current_cpu_type()) { \ | ||
258 | case CPU_M14KC: \ | ||
259 | case CPU_74K: \ | ||
260 | case CPU_1074K: \ | ||
261 | case CPU_PROAPTIV: \ | ||
262 | case CPU_P5600: \ | ||
263 | case CPU_M5150: \ | ||
264 | case CPU_QEMU_GENERIC: \ | ||
265 | case CPU_CAVIUM_OCTEON: \ | ||
266 | case CPU_CAVIUM_OCTEON_PLUS: \ | ||
267 | case CPU_CAVIUM_OCTEON2: \ | ||
268 | case CPU_CAVIUM_OCTEON3: \ | ||
269 | __res = 0; \ | ||
270 | break; \ | ||
271 | \ | ||
272 | default: \ | ||
273 | __res = 1; \ | ||
274 | } \ | ||
275 | \ | ||
276 | __res; \ | ||
277 | }) | ||
240 | #endif | 278 | #endif |
241 | 279 | ||
242 | /* | 280 | /* |
@@ -366,4 +404,8 @@ | |||
366 | # define cpu_has_fre (cpu_data[0].options & MIPS_CPU_FRE) | 404 | # define cpu_has_fre (cpu_data[0].options & MIPS_CPU_FRE) |
367 | #endif | 405 | #endif |
368 | 406 | ||
407 | #ifndef cpu_has_cdmm | ||
408 | # define cpu_has_cdmm (cpu_data[0].options & MIPS_CPU_CDMM) | ||
409 | #endif | ||
410 | |||
369 | #endif /* __ASM_CPU_FEATURES_H */ | 411 | #endif /* __ASM_CPU_FEATURES_H */ |