Patchwork [04/16] KVM: PPC: Restrict PPC_[L|ST]D macro to asm code

login
register
mail settings
Submitter Alexander Graf
Date May 6, 2012, 2:20 p.m.
Message ID <1336314060-32640-5-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/157074/
State New
Headers show

Comments

Alexander Graf - May 6, 2012, 2:20 p.m.
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>
---
 arch/powerpc/include/asm/kvm_asm.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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