瀏覽代碼

KVM: Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier

This allows kvm_host.h to be #included even when struct preempt_notifier is
undefined. This is needed to build ppc asm-offsets.h.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Hollis Blanchard 18 年之前
父節點
當前提交
31bb117eb4
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      include/linux/kvm_host.h

+ 2 - 0
include/linux/kvm_host.h

@@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_io_bus *bus,
 
 
 struct kvm_vcpu {
 struct kvm_vcpu {
 	struct kvm *kvm;
 	struct kvm *kvm;
+#ifdef CONFIG_PREEMPT_NOTIFIERS
 	struct preempt_notifier preempt_notifier;
 	struct preempt_notifier preempt_notifier;
+#endif
 	int vcpu_id;
 	int vcpu_id;
 	struct mutex mutex;
 	struct mutex mutex;
 	int   cpu;
 	int   cpu;