diff mbox

[1/2] KVM: PPC: bookehv: Use a Macro for saving/restoring guest registers to/from their 64 bit copies.

Message ID 1535656C-A0B6-4500-A74B-0564FFF8616A@suse.de
State New, archived
Headers show

Commit Message

Alexander Graf April 25, 2012, 11:50 a.m. UTC
On 25.04.2012, at 13:26, Varun Sethi wrote:

> Introduced PPC_STD/PPC_LD macros for saving/restoring guest registers to/from their 64 bit copies.

Thanks, applied both to kvm-ppc-next, with the following patch on top:


commit 03ae8a683c7af11c17e44e963b7eac0339d97c66
Author: Alexander Graf <agraf@suse.de>
Date:   Wed Apr 25 13:48:54 2012 +0200

    KVM: PPC: Restrict PPC_[L|ST]D macro to asm code
    
    We only want asm code macros to be accessible from asm code, so #ifdef it
    depending on it.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>



Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/kvm_asm.h b/arch/powerpc/include/asm/kvm_asm.h
index 7d4018d..76fdcfe 100644
--- a/arch/powerpc/include/asm/kvm_asm.h
+++ b/arch/powerpc/include/asm/kvm_asm.h
@@ -20,6 +20,7 @@ 
 #ifndef __POWERPC_KVM_ASM_H__
 #define __POWERPC_KVM_ASM_H__
 
+#ifdef __ASSEMBLY__
 #ifdef CONFIG_64BIT
 #define PPC_STD(sreg, offset, areg)  std sreg, (offset)(areg)
 #define PPC_LD(treg, offset, areg)   ld treg, (offset)(areg)
@@ -27,6 +28,7 @@ 
 #define PPC_STD(sreg, offset, areg)  stw sreg, (offset+4)(areg)
 #define PPC_LD(treg, offset, areg)   lwz treg, (offset+4)(areg)
 #endif
+#endif
 
 /* IVPR must be 64KiB-aligned. */
 #define VCPU_SIZE_ORDER 4