aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2015-01-15 08:11:10 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-02-20 09:30:42 -0500
commit664d699af24ee73cbc147c4c0f76c8c8ff9ef66f (patch)
tree364a6315b49e725a956ef18e08611c87c776b767
parent69f7cd472493f97976598a8b5b515d9ad4814aa6 (diff)
MIPS: OCTEON: Implement the core-16057 workaround
Disable ICache prefetch for certian Octeon II processors. Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Aleksey Makarov <aleksey.makarov@auriga.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8938/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h
index 1668ee57acb9..21732c306635 100644
--- a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h
+++ b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h
@@ -63,6 +63,28 @@ skip:
63 li v1, ~(7 << 7) 63 li v1, ~(7 << 7)
64 and v0, v0, v1 64 and v0, v0, v1
65 ori v0, v0, (6 << 7) 65 ori v0, v0, (6 << 7)
66
67 mfc0 v1, CP0_PRID_REG
68 and t1, v1, 0xfff8
69 xor t1, t1, 0x9000 # 63-P1
70 beqz t1, 4f
71 and t1, v1, 0xfff8
72 xor t1, t1, 0x9008 # 63-P2
73 beqz t1, 4f
74 and t1, v1, 0xfff8
75 xor t1, t1, 0x9100 # 68-P1
76 beqz t1, 4f
77 and t1, v1, 0xff00
78 xor t1, t1, 0x9200 # 66-PX
79 bnez t1, 5f # Skip WAR for others.
80 and t1, v1, 0x00ff
81 slti t1, t1, 2 # 66-P1.2 and later good.
82 beqz t1, 5f
83
844: # core-16057 work around
85 or v0, v0, 0x2000 # Set IPREF bit.
86
875: # No core-16057 work around
66 # Write the cavium control register 88 # Write the cavium control register
67 dmtc0 v0, CP0_CVMCTL_REG 89 dmtc0 v0, CP0_CVMCTL_REG
68 sync 90 sync