aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/processor.h')
-rw-r--r--arch/mips/include/asm/processor.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h
index 1470b7b68b0e..7c637a461ced 100644
--- a/arch/mips/include/asm/processor.h
+++ b/arch/mips/include/asm/processor.h
@@ -137,7 +137,7 @@ union mips_watch_reg_state {
137 struct mips3264_watch_reg_state mips3264; 137 struct mips3264_watch_reg_state mips3264;
138}; 138};
139 139
140#ifdef CONFIG_CPU_CAVIUM_OCTEON 140#if defined(CONFIG_CPU_CAVIUM_OCTEON)
141 141
142struct octeon_cop2_state { 142struct octeon_cop2_state {
143 /* DMFC2 rt, 0x0201 */ 143 /* DMFC2 rt, 0x0201 */
@@ -182,13 +182,16 @@ struct octeon_cop2_state {
182 /* DMFC2 rt, 0x025A; DMFC2 rt, 0x025B - Pass2 */ 182 /* DMFC2 rt, 0x025A; DMFC2 rt, 0x025B - Pass2 */
183 unsigned long cop2_gfm_result[2]; 183 unsigned long cop2_gfm_result[2];
184}; 184};
185#define INIT_OCTEON_COP2 {0,} 185#define COP2_INIT \
186 .cp2 = {0,},
186 187
187struct octeon_cvmseg_state { 188struct octeon_cvmseg_state {
188 unsigned long cvmseg[CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE] 189 unsigned long cvmseg[CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE]
189 [cpu_dcache_line_size() / sizeof(unsigned long)]; 190 [cpu_dcache_line_size() / sizeof(unsigned long)];
190}; 191};
191 192
193#else
194#define COP2_INIT
192#endif 195#endif
193 196
194typedef struct { 197typedef struct {
@@ -245,13 +248,6 @@ struct thread_struct {
245#define FPAFF_INIT 248#define FPAFF_INIT
246#endif /* CONFIG_MIPS_MT_FPAFF */ 249#endif /* CONFIG_MIPS_MT_FPAFF */
247 250
248#ifdef CONFIG_CPU_CAVIUM_OCTEON
249#define OCTEON_INIT \
250 .cp2 = INIT_OCTEON_COP2,
251#else
252#define OCTEON_INIT
253#endif /* CONFIG_CPU_CAVIUM_OCTEON */
254
255#define INIT_THREAD { \ 251#define INIT_THREAD { \
256 /* \ 252 /* \
257 * Saved main processor registers \ 253 * Saved main processor registers \
@@ -300,9 +296,9 @@ struct thread_struct {
300 .cp0_baduaddr = 0, \ 296 .cp0_baduaddr = 0, \
301 .error_code = 0, \ 297 .error_code = 0, \
302 /* \ 298 /* \
303 * Cavium Octeon specifics (null if not Octeon) \ 299 * Platform specific cop2 registers(null if no COP2) \
304 */ \ 300 */ \
305 OCTEON_INIT \ 301 COP2_INIT \
306} 302}
307 303
308struct task_struct; 304struct task_struct;