aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/processor.h
diff options
context:
space:
mode:
authorLiu Yu <yu.liu@freescale.com>2008-10-27 23:50:21 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-12-03 09:19:16 -0500
commit6a800f36acd5bf06b5fe2cb27c4d0524d60c3df5 (patch)
treefe5611ddb3a92d5609736618aed5eb8d9e65ce7a /arch/powerpc/include/asm/processor.h
parent033b8a333c66e0a7dc63132c1bd65175dc98bc25 (diff)
powerpc: Add SPE/EFP math emulation for E500v1/v2 processors.
This patch add the handlers of SPE/EFP exceptions. The code is used to emulate float point arithmetic, when MSR(SPE) is enabled and receive EFP data interrupt or EFP round interrupt. This patch has no conflict with or dependence on FP math-emu. The code has been tested by TestFloat. Now the code doesn't support SPE/EFP instructions emulation (it won't be called when receive program interrupt), but it could be easily added. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/processor.h')
-rw-r--r--arch/powerpc/include/asm/processor.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 101ed87f7d84..cd7a47860e5a 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -207,6 +207,11 @@ struct thread_struct {
207#define INIT_SP_LIMIT \ 207#define INIT_SP_LIMIT \
208 (_ALIGN_UP(sizeof(init_thread_info), 16) + (unsigned long) &init_stack) 208 (_ALIGN_UP(sizeof(init_thread_info), 16) + (unsigned long) &init_stack)
209 209
210#ifdef CONFIG_SPE
211#define SPEFSCR_INIT .spefscr = SPEFSCR_FINVE | SPEFSCR_FDBZE | SPEFSCR_FUNFE | SPEFSCR_FOVFE,
212#else
213#define SPEFSCR_INIT
214#endif
210 215
211#ifdef CONFIG_PPC32 216#ifdef CONFIG_PPC32
212#define INIT_THREAD { \ 217#define INIT_THREAD { \
@@ -215,6 +220,7 @@ struct thread_struct {
215 .fs = KERNEL_DS, \ 220 .fs = KERNEL_DS, \
216 .pgdir = swapper_pg_dir, \ 221 .pgdir = swapper_pg_dir, \
217 .fpexc_mode = MSR_FE0 | MSR_FE1, \ 222 .fpexc_mode = MSR_FE0 | MSR_FE1, \
223 SPEFSCR_INIT \
218} 224}
219#else 225#else
220#define INIT_THREAD { \ 226#define INIT_THREAD { \