summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-03-24 14:56:20 +0200
committerAvi Kivity <avi@qumranet.com>2008-03-24 14:56:20 +0200
commitbcb30c8bafc7cac75c38981a57bc1f94521e83f4 (patch)
tree0ff0054ce20af2751472710c1ca9838494c03837 /kernel
parent14795bc960af5ef7286dd7207023abf28fbc118f (diff)
kvm: external module: avoid #include <linux/compiler.h> in <linux/kvm.h>
not present on all hosts. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Makefile1
-rw-r--r--kernel/hack-module.awk3
2 files changed, 4 insertions, 0 deletions
diff --git a/kernel/Makefile b/kernel/Makefile
index 69d0efab..fb053ebf 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -47,6 +47,7 @@ sync:
$(call unifdef, include/linux/kvm_para.h)
$(call unifdef, include/asm-x86/kvm.h)
$(call unifdef, include/asm-x86/kvm_para.h)
+ $(call hack, include/linux/kvm.h)
$(call hack, kvm_main.c)
$(call hack, mmu.c)
$(call hack, vmx.c)
diff --git a/kernel/hack-module.awk b/kernel/hack-module.awk
index a9ef66e4..dd9a2f40 100644
--- a/kernel/hack-module.awk
+++ b/kernel/hack-module.awk
@@ -54,9 +54,12 @@
{ sub(/\<desc_struct\>/, "kvm_desc_struct") }
{ sub(/\<ldttss_desc64\>/, "kvm_ldttss_desc64") }
{ sub(/\<desc_ptr\>/, "kvm_desc_ptr") }
+{ sub(/\<__user\>/, " ") }
/^\t\.name = "kvm"/ { $0 = "\tset_kset_name(\"kvm\")," }
+/#include <linux\/compiler.h>/ { $0 = "" }
+
{ print }
/kvm_x86_ops->run/ {