diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-02-19 18:56:22 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-02-21 15:46:53 +0100 |
commit | ee951a37d8873bff7aa58e23222dfd984111b6cb (patch) | |
tree | c8304bedb44ce8b6f69877547c34d521923b74eb /hw/isa-bus.c | |
parent | 7096a96db2d0227598e3c9fb154e53f912a34da8 (diff) |
isa-bus: Remove bogus IRQ sharing check
Nothing prevented IRQ sharing on the ISA bus in principle. Not all
boards supported this, neither each and every card nor driver and OS.
Still, there existed valid IRQ sharing scenarios, (at least) two of them
can also be found in QEMU: >2 PC UARTs and the PREP IDE buses.
So remove this artificial restriction from our ISA model.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r-- | hw/isa-bus.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c index 6f349a574a..d07aa410f7 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -25,7 +25,6 @@ struct ISABus { BusState qbus; qemu_irq *irqs; - uint32_t assigned; }; static ISABus *isabus; target_phys_addr_t isa_mem_base = 0; @@ -61,33 +60,24 @@ void isa_bus_irqs(qemu_irq *irqs) } /* - * isa_reserve_irq() reserves the ISA irq and returns the corresponding - * qemu_irq entry for the i8259. + * isa_get_irq() returns the corresponding qemu_irq entry for the i8259. * * This function is only for special cases such as the 'ferr', and * temporary use for normal devices until they are converted to qdev. */ -qemu_irq isa_reserve_irq(int isairq) +qemu_irq isa_get_irq(int isairq) { if (isairq < 0 || isairq > 15) { hw_error("isa irq %d invalid", isairq); } - if (isabus->assigned & (1 << isairq)) { - hw_error("isa irq %d already assigned", isairq); - } - isabus->assigned |= (1 << isairq); return isabus->irqs[isairq]; } void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq) { assert(dev->nirqs < ARRAY_SIZE(dev->isairq)); - if (isabus->assigned & (1 << isairq)) { - hw_error("isa irq %d already assigned", isairq); - } - isabus->assigned |= (1 << isairq); dev->isairq[dev->nirqs] = isairq; - *p = isabus->irqs[isairq]; + *p = isa_get_irq(isairq); dev->nirqs++; } |