diff options
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv_rmhandlers.S')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rmhandlers.S | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 60dce5bfab3f..294b7af28cdd 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -29,6 +29,10 @@ | |||
29 | #include <asm/kvm_book3s_asm.h> | 29 | #include <asm/kvm_book3s_asm.h> |
30 | #include <asm/mmu-hash64.h> | 30 | #include <asm/mmu-hash64.h> |
31 | 31 | ||
32 | #ifdef __LITTLE_ENDIAN__ | ||
33 | #error Need to fix lppaca and SLB shadow accesses in little endian mode | ||
34 | #endif | ||
35 | |||
32 | /***************************************************************************** | 36 | /***************************************************************************** |
33 | * * | 37 | * * |
34 | * Real Mode handlers that need to be in the linear mapping * | 38 | * Real Mode handlers that need to be in the linear mapping * |
@@ -389,7 +393,11 @@ toc_tlbie_lock: | |||
389 | .tc native_tlbie_lock[TC],native_tlbie_lock | 393 | .tc native_tlbie_lock[TC],native_tlbie_lock |
390 | .previous | 394 | .previous |
391 | ld r3,toc_tlbie_lock@toc(2) | 395 | ld r3,toc_tlbie_lock@toc(2) |
396 | #ifdef __BIG_ENDIAN__ | ||
392 | lwz r8,PACA_LOCK_TOKEN(r13) | 397 | lwz r8,PACA_LOCK_TOKEN(r13) |
398 | #else | ||
399 | lwz r8,PACAPACAINDEX(r13) | ||
400 | #endif | ||
393 | 24: lwarx r0,0,r3 | 401 | 24: lwarx r0,0,r3 |
394 | cmpwi r0,0 | 402 | cmpwi r0,0 |
395 | bne 24b | 403 | bne 24b |
@@ -964,7 +972,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_201) | |||
964 | 32: ld r4,VCPU_KVM(r9) /* pointer to struct kvm */ | 972 | 32: ld r4,VCPU_KVM(r9) /* pointer to struct kvm */ |
965 | 973 | ||
966 | /* Take the guest's tlbie_lock */ | 974 | /* Take the guest's tlbie_lock */ |
975 | #ifdef __BIG_ENDIAN__ | ||
967 | lwz r8,PACA_LOCK_TOKEN(r13) | 976 | lwz r8,PACA_LOCK_TOKEN(r13) |
977 | #else | ||
978 | lwz r8,PACAPACAINDEX(r13) | ||
979 | #endif | ||
968 | addi r3,r4,KVM_TLBIE_LOCK | 980 | addi r3,r4,KVM_TLBIE_LOCK |
969 | 24: lwarx r0,0,r3 | 981 | 24: lwarx r0,0,r3 |
970 | cmpwi r0,0 | 982 | cmpwi r0,0 |