diff options
author | Anton Blanchard <anton@samba.org> | 2013-09-22 22:04:39 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 01:48:28 -0400 |
commit | 926f160f460170b0361f600f365369685ad74009 (patch) | |
tree | 04537aba608b597cbf3af3d8a774b4c09bd52924 /arch/powerpc/include/asm/ppc-opcode.h | |
parent | 87fec0514f613f8ac43c01b0bc0bc7072c5d10ae (diff) |
powerpc: Little endian builds double word swap VSX state during context save/restore
The elements within VSX loads and stores are big endian ordered
regardless of endianness. Our VSX context save/restore code uses
lxvd2x and stxvd2x which is a 2x doubleword operation. This means
the two doublewords will be swapped and we have to perform another
swap to undo it.
We need to do this on save and restore.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/ppc-opcode.h')
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index d7fe9f5b46d4..ad5fcf51b252 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -181,6 +181,7 @@ | |||
181 | #define PPC_INST_TLBIVAX 0x7c000624 | 181 | #define PPC_INST_TLBIVAX 0x7c000624 |
182 | #define PPC_INST_TLBSRX_DOT 0x7c0006a5 | 182 | #define PPC_INST_TLBSRX_DOT 0x7c0006a5 |
183 | #define PPC_INST_XXLOR 0xf0000510 | 183 | #define PPC_INST_XXLOR 0xf0000510 |
184 | #define PPC_INST_XXSWAPD 0xf0000250 | ||
184 | #define PPC_INST_XVCPSGNDP 0xf0000780 | 185 | #define PPC_INST_XVCPSGNDP 0xf0000780 |
185 | #define PPC_INST_TRECHKPT 0x7c0007dd | 186 | #define PPC_INST_TRECHKPT 0x7c0007dd |
186 | #define PPC_INST_TRECLAIM 0x7c00075d | 187 | #define PPC_INST_TRECLAIM 0x7c00075d |
@@ -344,6 +345,8 @@ | |||
344 | VSX_XX1((s), a, b)) | 345 | VSX_XX1((s), a, b)) |
345 | #define XXLOR(t, a, b) stringify_in_c(.long PPC_INST_XXLOR | \ | 346 | #define XXLOR(t, a, b) stringify_in_c(.long PPC_INST_XXLOR | \ |
346 | VSX_XX3((t), a, b)) | 347 | VSX_XX3((t), a, b)) |
348 | #define XXSWAPD(t, a) stringify_in_c(.long PPC_INST_XXSWAPD | \ | ||
349 | VSX_XX3((t), a, a)) | ||
347 | #define XVCPSGNDP(t, a, b) stringify_in_c(.long (PPC_INST_XVCPSGNDP | \ | 350 | #define XVCPSGNDP(t, a, b) stringify_in_c(.long (PPC_INST_XVCPSGNDP | \ |
348 | VSX_XX3((t), (a), (b)))) | 351 | VSX_XX3((t), (a), (b)))) |
349 | 352 | ||