Skip to content

Commit 630c8a5

Browse files
tommustaozbenh
authored andcommitted
powerpc: Enable Little Endian Alignment Handler for Float Pair Instructions
This patch enables alignment handling for the load/store floating point pair instructions (lfdp, lfdpx, stfdp, stfdpx). The handler routine is properly coded and only needs to be enabled. Signed-off-by: Tom Musta <tmusta@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent 075f631 commit 630c8a5

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎arch/powerpc/kernel/align.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr,
378378
* Only POWER6 has these instructions, and it does true little-endian,
379379
* so we don't need the address swizzling.
380380
*/
381-
#ifdef __BIG_ENDIAN__
382381
static int emulate_fp_pair(unsigned char __user *addr, unsigned int reg,
383382
unsigned int flags)
384383
{
@@ -406,7 +405,6 @@ static int emulate_fp_pair(unsigned char __user *addr, unsigned int reg,
406405
return -EFAULT;
407406
return 1; /* exception handled and fixed up */
408407
}
409-
#endif
410408

411409
#ifdef CONFIG_SPE
412410

@@ -918,12 +916,8 @@ int fix_alignment(struct pt_regs *regs)
918916

919917
/* Special case for 16-byte FP loads and stores */
920918
if (nb == 16) {
921-
#ifdef __BIG_ENDIAN__
922919
PPC_WARN_ALIGNMENT(fp_pair, regs);
923920
return emulate_fp_pair(addr, reg, flags);
924-
#else
925-
return -EFAULT;
926-
#endif
927921
}
928922

929923
PPC_WARN_ALIGNMENT(unaligned, regs);

0 commit comments

Comments
 (0)