summary refs log tree commit diff
path: root/arch/mips/include/asm/processor.h
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-06-10 06:30:04 +0000
committerRalf Baechle <ralf@linux-mips.org>2013-06-13 17:46:41 +0200
commit5649d37c2b23ad6545709c976b9abbfa8d5f4e11 (patch)
treea9fda320023769a6f7991487fb6ff1604a8560c2 /arch/mips/include/asm/processor.h
parent64f6ebe63914835ad5cd5bc4c490f3deaeac2511 (diff)
downloadlinux-5649d37c2b23ad6545709c976b9abbfa8d5f4e11.tar.gz
MIPS: Netlogic: COP2 save/restore code
Add COP2 register state structure and functions for Netlogic XLP. The
RX and TX buffers and status registers are to be saved. Since the
registers are 64-bit, do the implementation in inline assembly which
works on both 32-bit and 64-bit kernels.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Cc: ddaney.cavm@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/5413/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/processor.h')
-rw-r--r--arch/mips/include/asm/processor.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h
index 7c637a461ced..016dc4bffc80 100644
--- a/arch/mips/include/asm/processor.h
+++ b/arch/mips/include/asm/processor.h
@@ -190,6 +190,16 @@ struct octeon_cvmseg_state {
 			    [cpu_dcache_line_size() / sizeof(unsigned long)];
 };
 
+#elif defined(CONFIG_CPU_XLP)
+struct nlm_cop2_state {
+	u64	rx[4];
+	u64	tx[4];
+	u32	tx_msg_status;
+	u32	rx_msg_status;
+};
+
+#define COP2_INIT						\
+	.cp2			= {{0}, {0}, 0, 0},
 #else
 #define COP2_INIT
 #endif
@@ -237,6 +247,9 @@ struct thread_struct {
     struct octeon_cop2_state cp2 __attribute__ ((__aligned__(128)));
     struct octeon_cvmseg_state cvmseg __attribute__ ((__aligned__(128)));
 #endif
+#ifdef CONFIG_CPU_XLP
+	struct nlm_cop2_state cp2;
+#endif
 	struct mips_abi *abi;
 };