diff options
author | Anton Blanchard <anton@samba.org> | 2013-09-23 06:04:48 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 09:48:36 +0400 |
commit | a5841a46022e1ebe97d4c926c32ef4e9acec96a7 (patch) | |
tree | 5493286829cc5510302b630b49ed0e6654594b2b /arch/powerpc/kernel/align.c | |
parent | c324496456208e4a6a377d8a36b8fad76d004c7f (diff) | |
download | linux-a5841a46022e1ebe97d4c926c32ef4e9acec96a7.tar.xz |
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>
Diffstat (limited to 'arch/powerpc/kernel/align.c')
-rw-r--r-- | arch/powerpc/kernel/align.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 25d8d8b4eaf9..3049bd00e757 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c @@ -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 *) ¤t->thread.TS_FPR(reg); + ptr = (char *) ¤t->thread.fpr[reg][0]; else ptr = (char *) ¤t->thread.vr[reg - 32]; |