aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2015-08-05 18:42:35 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-08-28 05:48:22 -0400
commit90996511187d6282db6d02d3f97006b4dbb5c457 (patch)
tree58ac2c5b6f3b8e9105ecc02168023f442be9b2e0
parentc13dcf9f2d6f5f06ef1bf79ec456df614c5e058b (diff)
MIPS: CPS: use 32b accesses to GCRs
Commit b677bc03d757 ("MIPS: cps-vec: Use macros for various arithmetics and memory operations") replaced various load & store instructions through cps-vec.S with the PTR_L & PTR_S macros. However it was somewhat overzealous in doing so for CM GCR accesses, since the bit width of the CM doesn't necessarily match that of the CPU. The registers accessed (GCR_CL_COHERENCE & GCR_CL_ID) should be safe to simply always access using 32b instructions, so do so in order to avoid issues when using a 32b CM with a 64b CPU. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: <stable@vger.kernel.org> # 3.16+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: James Hogan <james.hogan@imgtec.com> Patchwork: https://patchwork.linux-mips.org/patch/10864/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/kernel/cps-vec.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S
index 1b6ca634e646..9f71c06aebf6 100644
--- a/arch/mips/kernel/cps-vec.S
+++ b/arch/mips/kernel/cps-vec.S
@@ -152,7 +152,7 @@ dcache_done:
152 152
153 /* Enter the coherent domain */ 153 /* Enter the coherent domain */
154 li t0, 0xff 154 li t0, 0xff
155 PTR_S t0, GCR_CL_COHERENCE_OFS(v1) 155 sw t0, GCR_CL_COHERENCE_OFS(v1)
156 ehb 156 ehb
157 157
158 /* Jump to kseg0 */ 158 /* Jump to kseg0 */
@@ -302,7 +302,7 @@ LEAF(mips_cps_boot_vpes)
302 PTR_L t0, 0(t0) 302 PTR_L t0, 0(t0)
303 303
304 /* Calculate a pointer to this cores struct core_boot_config */ 304 /* Calculate a pointer to this cores struct core_boot_config */
305 PTR_L t0, GCR_CL_ID_OFS(t0) 305 lw t0, GCR_CL_ID_OFS(t0)
306 li t1, COREBOOTCFG_SIZE 306 li t1, COREBOOTCFG_SIZE
307 mul t0, t0, t1 307 mul t0, t0, t1
308 PTR_LA t1, mips_cps_core_bootcfg 308 PTR_LA t1, mips_cps_core_bootcfg