diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-02-26 03:18:32 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-26 03:18:32 -0500 |
commit | 64b9fb5704a479d98a59f2a1d45d3331a8f847f8 (patch) | |
tree | 2b1052b05fa7615c817894bc9802bc5bb2af7ac1 /virt/kvm/irq_comm.c | |
parent | 83f0d53993b2967e54186468b0fc4321447f68f1 (diff) | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) |
Merge commit 'v2.6.33' into tracing/core
Conflicts:
scripts/recordmcount.pl
Merge reason: Merge up to v2.6.33.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'virt/kvm/irq_comm.c')
-rw-r--r-- | virt/kvm/irq_comm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 9b077342ab54..9fd5b3ebc517 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c | |||
@@ -302,6 +302,7 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt, | |||
302 | { | 302 | { |
303 | int r = -EINVAL; | 303 | int r = -EINVAL; |
304 | int delta; | 304 | int delta; |
305 | unsigned max_pin; | ||
305 | struct kvm_kernel_irq_routing_entry *ei; | 306 | struct kvm_kernel_irq_routing_entry *ei; |
306 | struct hlist_node *n; | 307 | struct hlist_node *n; |
307 | 308 | ||
@@ -322,12 +323,15 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt, | |||
322 | switch (ue->u.irqchip.irqchip) { | 323 | switch (ue->u.irqchip.irqchip) { |
323 | case KVM_IRQCHIP_PIC_MASTER: | 324 | case KVM_IRQCHIP_PIC_MASTER: |
324 | e->set = kvm_set_pic_irq; | 325 | e->set = kvm_set_pic_irq; |
326 | max_pin = 16; | ||
325 | break; | 327 | break; |
326 | case KVM_IRQCHIP_PIC_SLAVE: | 328 | case KVM_IRQCHIP_PIC_SLAVE: |
327 | e->set = kvm_set_pic_irq; | 329 | e->set = kvm_set_pic_irq; |
330 | max_pin = 16; | ||
328 | delta = 8; | 331 | delta = 8; |
329 | break; | 332 | break; |
330 | case KVM_IRQCHIP_IOAPIC: | 333 | case KVM_IRQCHIP_IOAPIC: |
334 | max_pin = KVM_IOAPIC_NUM_PINS; | ||
331 | e->set = kvm_set_ioapic_irq; | 335 | e->set = kvm_set_ioapic_irq; |
332 | break; | 336 | break; |
333 | default: | 337 | default: |
@@ -335,7 +339,7 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt, | |||
335 | } | 339 | } |
336 | e->irqchip.irqchip = ue->u.irqchip.irqchip; | 340 | e->irqchip.irqchip = ue->u.irqchip.irqchip; |
337 | e->irqchip.pin = ue->u.irqchip.pin + delta; | 341 | e->irqchip.pin = ue->u.irqchip.pin + delta; |
338 | if (e->irqchip.pin >= KVM_IOAPIC_NUM_PINS) | 342 | if (e->irqchip.pin >= max_pin) |
339 | goto out; | 343 | goto out; |
340 | rt->chip[ue->u.irqchip.irqchip][e->irqchip.pin] = ue->gsi; | 344 | rt->chip[ue->u.irqchip.irqchip][e->irqchip.pin] = ue->gsi; |
341 | break; | 345 | break; |