Skip to content

Commit

Permalink
MIPS: OCTEON: Use correct instruction to read 64-bit COP0 register
Browse files Browse the repository at this point in the history
Use dmfc0/dmtc0 instructions for reading CvmMemCtl COP0 register,
its a 64-bit wide.

Signed-off-by: Chandrakala Chavva <cchavva@caviumnetworks.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@auriga.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/8936/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Chandrakala Chavva authored and Ralf Baechle committed Feb 20, 2015
1 parent 6b3a287 commit 2d98cae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/mips/kernel/octeon_switch.S
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
1:
#if CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0
/* Check if we need to store CVMSEG state */
mfc0 t0, $11,7 /* CvmMemCtl */
dmfc0 t0, $11,7 /* CvmMemCtl */
bbit0 t0, 6, 3f /* Is user access enabled? */

/* Store the CVMSEG state */
Expand All @@ -104,9 +104,9 @@
.set reorder

/* Disable access to CVMSEG */
mfc0 t0, $11,7 /* CvmMemCtl */
dmfc0 t0, $11,7 /* CvmMemCtl */
xori t0, t0, 0x40 /* Bit 6 is CVMSEG user enable */
mtc0 t0, $11,7 /* CvmMemCtl */
dmtc0 t0, $11,7 /* CvmMemCtl */
#endif
3:

Expand Down

0 comments on commit 2d98cae

Please sign in to comment.