]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Add ifdef in irqchip struct for x86 only structures
authorJerone Young <jyoung5@us.ibm.com>
Mon, 26 Nov 2007 14:33:53 +0000 (08:33 -0600)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:53:15 +0000 (17:53 +0200)
This patch fixes a small issue where sturctures:
kvm_pic_state
kvm_ioapic_state

are defined inside x86 specific code and may or may not
be defined in anyway for other architectures. The problem
caused is one cannot compile userspace apps (ex. libkvm)
for other archs since a size cannot be determined for these
structures.

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
include/linux/Kbuild
include/linux/kvm.h

index 27b9350052b46dd7ed8a848174f3d4a26e490eca..c263a69b5680a87efac302cea7826a7055629639 100644 (file)
@@ -100,7 +100,6 @@ header-y += iso_fs.h
 header-y += ixjuser.h
 header-y += jffs2.h
 header-y += keyctl.h
-header-y += kvm.h
 header-y += limits.h
 header-y += lock_dlm_plock.h
 header-y += magic.h
@@ -256,6 +255,7 @@ unifdef-y += kd.h
 unifdef-y += kernelcapi.h
 unifdef-y += kernel.h
 unifdef-y += keyboard.h
+unifdef-y += kvm.h
 unifdef-y += llc.h
 unifdef-y += loop.h
 unifdef-y += lp.h
index b751552f2e302206f3e32b88acf65c8ddab960c6..f0bebd61ff777aa028e755f4fb0e7ecd4e90bf8d 100644 (file)
@@ -51,8 +51,10 @@ struct kvm_irqchip {
        __u32 pad;
         union {
                char dummy[512];  /* reserving space */
+#ifdef CONFIG_X86
                struct kvm_pic_state pic;
                struct kvm_ioapic_state ioapic;
+#endif
        } chip;
 };