aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_64.S
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2013-08-06 12:01:46 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-14 01:33:35 -0400
commit7ffcf8ec26f4b94b95b1297131d223b121d951e5 (patch)
tree7b4b47eaeafe56c253350b14470fecf03b40277f /arch/powerpc/kernel/entry_64.S
parentc72cd555e828b710bce8c3635254dbb483397142 (diff)
powerpc: Fix little endian lppaca, slb_shadow and dtl_entry
The lppaca, slb_shadow and dtl_entry hypervisor structures are big endian, so we have to byte swap them in little endian builds. LE KVM hosts will also need to be fixed but for now add an #error to remind us. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r--arch/powerpc/kernel/entry_64.S11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index c1055a150b88..707fbfde1324 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -102,7 +102,8 @@ BEGIN_FW_FTR_SECTION
102 /* if from user, see if there are any DTL entries to process */ 102 /* if from user, see if there are any DTL entries to process */
103 ld r10,PACALPPACAPTR(r13) /* get ptr to VPA */ 103 ld r10,PACALPPACAPTR(r13) /* get ptr to VPA */
104 ld r11,PACA_DTL_RIDX(r13) /* get log read index */ 104 ld r11,PACA_DTL_RIDX(r13) /* get log read index */
105 ld r10,LPPACA_DTLIDX(r10) /* get log write index */ 105 addi r10,r10,LPPACA_DTLIDX
106 LDX_BE r10,0,r10 /* get log write index */
106 cmpd cr1,r11,r10 107 cmpd cr1,r11,r10
107 beq+ cr1,33f 108 beq+ cr1,33f
108 bl .accumulate_stolen_time 109 bl .accumulate_stolen_time
@@ -531,9 +532,11 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
531 */ 532 */
532 ld r9,PACA_SLBSHADOWPTR(r13) 533 ld r9,PACA_SLBSHADOWPTR(r13)
533 li r12,0 534 li r12,0
534 std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */ 535 std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */
535 std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ 536 li r12,SLBSHADOW_STACKVSID
536 std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ 537 STDX_BE r7,r12,r9 /* Save VSID */
538 li r12,SLBSHADOW_STACKESID
539 STDX_BE r0,r12,r9 /* Save ESID */
537 540
538 /* No need to check for MMU_FTR_NO_SLBIE_B here, since when 541 /* No need to check for MMU_FTR_NO_SLBIE_B here, since when
539 * we have 1TB segments, the only CPUs known to have the errata 542 * we have 1TB segments, the only CPUs known to have the errata