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>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
075f6311af
commit
630c8a5fc9
@@ -378,7 +378,6 @@ static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr,
|
|||||||
* Only POWER6 has these instructions, and it does true little-endian,
|
* Only POWER6 has these instructions, and it does true little-endian,
|
||||||
* so we don't need the address swizzling.
|
* so we don't need the address swizzling.
|
||||||
*/
|
*/
|
||||||
#ifdef __BIG_ENDIAN__
|
|
||||||
static int emulate_fp_pair(unsigned char __user *addr, unsigned int reg,
|
static int emulate_fp_pair(unsigned char __user *addr, unsigned int reg,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@@ -406,7 +405,6 @@ static int emulate_fp_pair(unsigned char __user *addr, unsigned int reg,
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return 1; /* exception handled and fixed up */
|
return 1; /* exception handled and fixed up */
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SPE
|
#ifdef CONFIG_SPE
|
||||||
|
|
||||||
@@ -918,12 +916,8 @@ int fix_alignment(struct pt_regs *regs)
|
|||||||
|
|
||||||
/* Special case for 16-byte FP loads and stores */
|
/* Special case for 16-byte FP loads and stores */
|
||||||
if (nb == 16) {
|
if (nb == 16) {
|
||||||
#ifdef __BIG_ENDIAN__
|
|
||||||
PPC_WARN_ALIGNMENT(fp_pair, regs);
|
PPC_WARN_ALIGNMENT(fp_pair, regs);
|
||||||
return emulate_fp_pair(addr, reg, flags);
|
return emulate_fp_pair(addr, reg, flags);
|
||||||
#else
|
|
||||||
return -EFAULT;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PPC_WARN_ALIGNMENT(unaligned, regs);
|
PPC_WARN_ALIGNMENT(unaligned, regs);
|
||||||
|
Reference in New Issue
Block a user