diff options
author | Anton Blanchard <anton@samba.org> | 2013-09-22 22:04:47 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 01:48:35 -0400 |
commit | c324496456208e4a6a377d8a36b8fad76d004c7f (patch) | |
tree | e0cf73e75a4b1164fb6adc2b8ef0e047992f95e3 /arch/powerpc/kernel/align.c | |
parent | f626190d27a8525fbb6e3a72831e177c092f8a44 (diff) |
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/powerpc/kernel/align.c')
-rw-r--r-- | arch/powerpc/kernel/align.c | 4 |
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) | |||
895 | #ifdef CONFIG_PPC_FPU | 895 | #ifdef CONFIG_PPC_FPU |
896 | preempt_disable(); | 896 | preempt_disable(); |
897 | enable_kernel_fp(); | 897 | enable_kernel_fp(); |
898 | cvt_df(&data.dd, (float *)&data.v[4]); | 898 | cvt_df(&data.dd, (float *)&data.x32.low32); |
899 | preempt_enable(); | 899 | preempt_enable(); |
900 | #else | 900 | #else |
901 | return 0; | 901 | return 0; |
@@ -935,7 +935,7 @@ int fix_alignment(struct pt_regs *regs) | |||
935 | #ifdef CONFIG_PPC_FPU | 935 | #ifdef CONFIG_PPC_FPU |
936 | preempt_disable(); | 936 | preempt_disable(); |
937 | enable_kernel_fp(); | 937 | enable_kernel_fp(); |
938 | cvt_fd((float *)&data.v[4], &data.dd); | 938 | cvt_fd((float *)&data.x32.low32, &data.dd); |
939 | preempt_enable(); | 939 | preempt_enable(); |
940 | #else | 940 | #else |
941 | return 0; | 941 | return 0; |