powerpc: Alignment handler shouldn't access VSX registers with TS_FPR

The TS_FPR macro selects the FPR component of a VSX register (the
high doubleword). emulate_vsx is using this macro to get the
address of the associated VSX register. This happens to work on big
endian, but fails on little endian.

Replace it with an explicit array access.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Anton Blanchard 2013-09-23 12:04:48 +10:00 committed by Benjamin Herrenschmidt
parent c324496456
commit a5841a4602
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
flush_vsx_to_thread(current);
if (reg < 32)
ptr = (char *) &current->thread.TS_FPR(reg);
ptr = (char *) &current->thread.fpr[reg][0];
else
ptr = (char *) &current->thread.vr[reg - 32];