diff options
Diffstat (limited to 'include/asm-powerpc/processor.h')
-rw-r--r-- | include/asm-powerpc/processor.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index a23da6356e06..e93e72df4bca 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -12,7 +12,11 @@ | |||
12 | 12 | ||
13 | #include <asm/reg.h> | 13 | #include <asm/reg.h> |
14 | 14 | ||
15 | #ifdef CONFIG_VSX | ||
16 | #define TS_FPRWIDTH 2 | ||
17 | #else | ||
15 | #define TS_FPRWIDTH 1 | 18 | #define TS_FPRWIDTH 1 |
19 | #endif | ||
16 | 20 | ||
17 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
18 | #include <linux/compiler.h> | 22 | #include <linux/compiler.h> |
@@ -80,6 +84,7 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | |||
80 | /* Lazy FPU handling on uni-processor */ | 84 | /* Lazy FPU handling on uni-processor */ |
81 | extern struct task_struct *last_task_used_math; | 85 | extern struct task_struct *last_task_used_math; |
82 | extern struct task_struct *last_task_used_altivec; | 86 | extern struct task_struct *last_task_used_altivec; |
87 | extern struct task_struct *last_task_used_vsx; | ||
83 | extern struct task_struct *last_task_used_spe; | 88 | extern struct task_struct *last_task_used_spe; |
84 | 89 | ||
85 | #ifdef CONFIG_PPC32 | 90 | #ifdef CONFIG_PPC32 |
@@ -142,7 +147,9 @@ typedef struct { | |||
142 | unsigned long seg; | 147 | unsigned long seg; |
143 | } mm_segment_t; | 148 | } mm_segment_t; |
144 | 149 | ||
145 | #define TS_FPR(i) fpr[i] | 150 | #define TS_FPROFFSET 0 |
151 | #define TS_VSRLOWOFFSET 1 | ||
152 | #define TS_FPR(i) fpr[i][TS_FPROFFSET] | ||
146 | 153 | ||
147 | struct thread_struct { | 154 | struct thread_struct { |
148 | unsigned long ksp; /* Kernel stack pointer */ | 155 | unsigned long ksp; /* Kernel stack pointer */ |
@@ -160,8 +167,9 @@ struct thread_struct { | |||
160 | unsigned long dbcr0; /* debug control register values */ | 167 | unsigned long dbcr0; /* debug control register values */ |
161 | unsigned long dbcr1; | 168 | unsigned long dbcr1; |
162 | #endif | 169 | #endif |
163 | double fpr[32]; /* Complete floating point set */ | 170 | /* FP and VSX 0-31 register set */ |
164 | struct { /* fpr ... fpscr must be contiguous */ | 171 | double fpr[32][TS_FPRWIDTH]; |
172 | struct { | ||
165 | 173 | ||
166 | unsigned int pad; | 174 | unsigned int pad; |
167 | unsigned int val; /* Floating point status */ | 175 | unsigned int val; /* Floating point status */ |
@@ -181,6 +189,10 @@ struct thread_struct { | |||
181 | unsigned long vrsave; | 189 | unsigned long vrsave; |
182 | int used_vr; /* set if process has used altivec */ | 190 | int used_vr; /* set if process has used altivec */ |
183 | #endif /* CONFIG_ALTIVEC */ | 191 | #endif /* CONFIG_ALTIVEC */ |
192 | #ifdef CONFIG_VSX | ||
193 | /* VSR status */ | ||
194 | int used_vsr; /* set if process has used altivec */ | ||
195 | #endif /* CONFIG_VSX */ | ||
184 | #ifdef CONFIG_SPE | 196 | #ifdef CONFIG_SPE |
185 | unsigned long evr[32]; /* upper 32-bits of SPE regs */ | 197 | unsigned long evr[32]; /* upper 32-bits of SPE regs */ |
186 | u64 acc; /* Accumulator */ | 198 | u64 acc; /* Accumulator */ |