diff options
author | 彭浩(Richard) <richard.peng@oppo.com> | 2020-05-21 08:57:49 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-05-27 20:11:10 +0300 |
commit | 88197e6ab33a909e54f683b5e3a2e45cc307108a (patch) | |
tree | ee4bedf94c0582c5f098a6294bfd689d53c8c360 /arch/x86/kvm/ioapic.h | |
parent | 80bc97f2d84dbec6df6b36d6bbc0715c14f80c61 (diff) | |
download | linux-88197e6ab33a909e54f683b5e3a2e45cc307108a.tar.xz |
kvm/x86: Remove redundant function implementations
pic_in_kernel(), ioapic_in_kernel() and irqchip_kernel() have the
same implementation.
Signed-off-by: Peng Hao <richard.peng@oppo.com>
Message-Id: <HKAPR02MB4291D5926EA10B8BFE9EA0D3E0B70@HKAPR02MB4291.apcprd02.prod.outlook.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/ioapic.h')
-rw-r--r-- | arch/x86/kvm/ioapic.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/kvm/ioapic.h b/arch/x86/kvm/ioapic.h index 2fb2e3c80724..660401700075 100644 --- a/arch/x86/kvm/ioapic.h +++ b/arch/x86/kvm/ioapic.h @@ -3,8 +3,8 @@ #define __KVM_IO_APIC_H #include <linux/kvm_host.h> - #include <kvm/iodev.h> +#include "irq.h" struct kvm; struct kvm_vcpu; @@ -108,11 +108,7 @@ do { \ static inline int ioapic_in_kernel(struct kvm *kvm) { - int mode = kvm->arch.irqchip_mode; - - /* Matches smp_wmb() when setting irqchip_mode */ - smp_rmb(); - return mode == KVM_IRQCHIP_KERNEL; + return irqchip_kernel(kvm); } void kvm_rtc_eoi_tracking_restore_one(struct kvm_vcpu *vcpu); |