On Fri, Nov 22 2024 at 11:54, Bjorn Helgaas wrote: > On Mon, Nov 11, 2024 at 03:21:36PM +0800, Joseph Jang wrote: >> We could not detect the duplicated hwirq number (0xc8000000) in this >> case. > > Again, this is really out of my area, but based on > Documentation/core-api/irq/irq-domain.rst, I assumed the point of > hwirq was that hwirq numbers were local to an interrupt controller, > i.e., to an irq_domain. Correct. But due to the truncation problem in pci_msi_domain_calc_hwirq() we ended up with the same hwirq number for two different interrupts in the same domain. That said, I'm not really convinced about the value of the proposed script as it just checks at a random point in time, which does not give any meaningful test coverage. I'd rather want to see a check in the irq domain code itself. At the point where an interrupt is inserted, the irqdomain can validate that there is no existing mapping for the hardware interrupt number. This check can be unconditionally enabled as interrupt setup is not really a hotpath operation and the lookup in the revmap or the tree is cheap. Thanks, tglx