On 08/11/09 16:45, Jes Sorensen wrote: > On 08/11/2009 04:08 PM, Gerd Hoffmann wrote: >> On 08/11/09 13:32, Jes Sorensen wrote: >>> In principle that would be good, the problem is just that the most of >>> the code still brute force messages with the i8259 array directly, >>> including the new ISA code. It really needs to be fixed to reference >>> the ISA IRQ number and not the i8259 array directly :-( >> >> How about making isa-bus.c own the i8259 array then? We could pass it to >> isa_bus_new. Then switch over to reference isa irqs by number. That >> allows isa-bus to keep track of the allocations. Maybe it makes sense to >> kill the sysbus-style isa_{init,connect}_irq split and have a irq bus >> property then. > > Hi Gerd, > > I would like to see that. I was looking into how much it would be, but I > got lost in the qdev dependencies :( Attached a patch. It will: (1) make isa-bus maintain isa irqs, complain when allocating already taken irqs. (2) note that (1) works only for isa devices converted to qdev already (floppy and ps2/kbd/mouse right now), so more work is needed to make this really useful. (3) split floppy init into isa and sysbus versions. (4) add sysbus->isa bridge & fix -M isapc breakage. cheers, Gerd