summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2013-09-23 04:04:47 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 07:48:35 +0200
commitc324496456208e4a6a377d8a36b8fad76d004c7f (patch)
treee0cf73e75a4b1164fb6adc2b8ef0e047992f95e3 /arch
parentpowerpc: Remove open coded byte swap macro in alignment handler (diff)
downloadlinux-c324496456208e4a6a377d8a36b8fad76d004c7f.tar.xz
linux-c324496456208e4a6a377d8a36b8fad76d004c7f.zip
powerpc: Remove hard coded FP offsets in alignment handler
The alignment handler assumes big endian ordering when selecting the low word of a 64bit floating point value. Use the existing union which works in both little and big endian. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/align.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index af830dfe98b5..25d8d8b4eaf9 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -895,7 +895,7 @@ int fix_alignment(struct pt_regs *regs)
#ifdef CONFIG_PPC_FPU
preempt_disable();
enable_kernel_fp();
- cvt_df(&data.dd, (float *)&data.v[4]);
+ cvt_df(&data.dd, (float *)&data.x32.low32);
preempt_enable();
#else
return 0;
@@ -935,7 +935,7 @@ int fix_alignment(struct pt_regs *regs)
#ifdef CONFIG_PPC_FPU
preempt_disable();
enable_kernel_fp();
- cvt_fd((float *)&data.v[4], &data.dd);
+ cvt_fd((float *)&data.x32.low32, &data.dd);
preempt_enable();
#else
return 0;