aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/ioapic.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-05 23:08:07 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-05 23:08:07 -0700
commitea2aca084ba82aaf7c148d04914ceed8758ce08a (patch)
treedcb3f4f849cf48deac2dd3bafd5c2cd2f0e7dc79 /virt/kvm/ioapic.c
parentf3032be921cd126615ce3bfd7084e3d319f3f892 (diff)
parentc5a78ac00c400df29645e59938700301efb371d0 (diff)
downloadkernel_samsung_smdk4412-ea2aca084ba82aaf7c148d04914ceed8758ce08a.zip
kernel_samsung_smdk4412-ea2aca084ba82aaf7c148d04914ceed8758ce08a.tar.gz
kernel_samsung_smdk4412-ea2aca084ba82aaf7c148d04914ceed8758ce08a.tar.bz2
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wan/hdlc_fr.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl3945-base.c
Diffstat (limited to 'virt/kvm/ioapic.c')
-rw-r--r--virt/kvm/ioapic.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 98778cb..1dcf9f3 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -269,28 +269,9 @@ void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
}
}
-static int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector)
+static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int gsi)
{
- int i;
-
- for (i = 0; i < IOAPIC_NUM_PINS; i++)
- if (ioapic->redirtbl[i].fields.vector == vector)
- return i;
- return -1;
-}
-
-void kvm_ioapic_update_eoi(struct kvm *kvm, int vector)
-{
- struct kvm_ioapic *ioapic = kvm->arch.vioapic;
union ioapic_redir_entry *ent;
- int gsi;
-
- gsi = get_eoi_gsi(ioapic, vector);
- if (gsi == -1) {
- printk(KERN_WARNING "Can't find redir item for %d EOI\n",
- vector);
- return;
- }
ent = &ioapic->redirtbl[gsi];
ASSERT(ent->fields.trig_mode == IOAPIC_LEVEL_TRIG);
@@ -300,6 +281,16 @@ void kvm_ioapic_update_eoi(struct kvm *kvm, int vector)
ioapic_deliver(ioapic, gsi);
}
+void kvm_ioapic_update_eoi(struct kvm *kvm, int vector)
+{
+ struct kvm_ioapic *ioapic = kvm->arch.vioapic;
+ int i;
+
+ for (i = 0; i < IOAPIC_NUM_PINS; i++)
+ if (ioapic->redirtbl[i].fields.vector == vector)
+ __kvm_ioapic_update_eoi(ioapic, i);
+}
+
static int ioapic_in_range(struct kvm_io_device *this, gpa_t addr)
{
struct kvm_ioapic *ioapic = (struct kvm_ioapic *)this->private;