On 11/9/20 3:23 PM, Peter Maydell wrote: > On Sat, 7 Nov 2020 at 19:34, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: >> >> This series is inspired by Peter's following patch: >> https://www.mail-archive.com/qemu-devel@nongnu.org/msg758178.html >> >> I started to audit the IRQ uses and fixed the easy problems. >> >> Unresolved ones: >> - stellaris_init() connects different TYPE_STELLARIS_GPTM >> to the same ADC input (seems some weird kludge) >> - platform_bus_link_device() uses sysbus_has_irq() to check >> if an device has IRQ mapped but it doesn't seem to work. > > Were you finding these by inspection, or did you add some > kind of assert or other check for double-irq-line-connections?
I was not sure adding a field to IRQState would be accepted, so I added a trace event in qdev_connect_gpio_out_named(): trace_qdev_connect_gpio_out(pin, n, name, object_get_typename(OBJECT(dev))); And lookup up when 'pin' pointer value appears more than 1 time. For 6.0 I am wondering about replacing --enable-qom-cast-debug by --maintainer-mode and add a field in IRQState guarded for that mode. Maybe it is not too bad and we can use it normally. > > Applied to target-arm.next, thanks (deletion of omap_uart_attach() > can be a separate followup cleanup). Yes, I have *some* OMAP patches for 6.0 ;) > > -- PMM >