]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
KVM: PPC: Book3S HV: Fix thinko in try_lock_hpte()
authorPaul Mackerras <paulus@samba.org>
Mon, 15 Oct 2012 01:20:50 +0000 (01:20 +0000)
committerAlexander Graf <agraf@suse.de>
Tue, 30 Oct 2012 09:54:59 +0000 (10:54 +0100)
This fixes an error in the inline asm in try_lock_hpte() where we
were erroneously using a register number as an immediate operand.
The bug only affects an error path, and in fact the code will still
work as long as the compiler chooses some register other than r0
for the "bits" variable.  Nevertheless it should still be fixed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/kvm_book3s_64.h

index 0dd1d86d3e3168303e1e714977dc8439db86cb29..1472a5b4e4e3fc785563d58a15adb3684e552a1d 100644 (file)
@@ -60,7 +60,7 @@ static inline long try_lock_hpte(unsigned long *hpte, unsigned long bits)
                     "  ori     %0,%0,%4\n"
                     "  stdcx.  %0,0,%2\n"
                     "  beq+    2f\n"
-                    "  li      %1,%3\n"
+                    "  mr      %1,%3\n"
                     "2:        isync"
                     : "=&r" (tmp), "=&r" (old)
                     : "r" (hpte), "r" (bits), "i" (HPTE_V_HVLOCK)