Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3244964 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt
Browse files

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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent f626190d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;