Commit 93b6547e authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Marcelo Tosatti

KVM: switch to symbolic name for irq_states size

Use PIC_NUM_PINS instead of hard-coded 16 for pic pins.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent c7a7062f
...@@ -70,7 +70,7 @@ struct kvm_pic { ...@@ -70,7 +70,7 @@ struct kvm_pic {
struct kvm_io_device dev_slave; struct kvm_io_device dev_slave;
struct kvm_io_device dev_eclr; struct kvm_io_device dev_eclr;
void (*ack_notifier)(void *opaque, int irq); void (*ack_notifier)(void *opaque, int irq);
unsigned long irq_states[16]; unsigned long irq_states[PIC_NUM_PINS];
}; };
struct kvm_pic *kvm_create_pic(struct kvm *kvm); struct kvm_pic *kvm_create_pic(struct kvm *kvm);
......
...@@ -343,11 +343,11 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt, ...@@ -343,11 +343,11 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt,
switch (ue->u.irqchip.irqchip) { switch (ue->u.irqchip.irqchip) {
case KVM_IRQCHIP_PIC_MASTER: case KVM_IRQCHIP_PIC_MASTER:
e->set = kvm_set_pic_irq; e->set = kvm_set_pic_irq;
max_pin = 16; max_pin = PIC_NUM_PINS;
break; break;
case KVM_IRQCHIP_PIC_SLAVE: case KVM_IRQCHIP_PIC_SLAVE:
e->set = kvm_set_pic_irq; e->set = kvm_set_pic_irq;
max_pin = 16; max_pin = PIC_NUM_PINS;
delta = 8; delta = 8;
break; break;
case KVM_IRQCHIP_IOAPIC: case KVM_IRQCHIP_IOAPIC:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment