[PATCH v2] PCI: mvebu: Dispose INTx IRQs before to removing INTx domain

Thomas Gleixner tglx at linutronix.de
Sat Jul 13 03:33:29 PDT 2024


On Fri, Jul 12 2024 at 15:41, Bjorn Helgaas wrote:
> On Thu, Jul 11, 2024 at 03:25:44PM +0200, Marek Behún wrote:
>>  		/* Remove IRQ domains. */
>> -		if (port->intx_irq_domain)
>> +		if (port->intx_irq_domain) {
>> +			for (int j = 0; j < PCI_NUM_INTX; j++) {
>> +				int virq = irq_find_mapping(port->intx_irq_domain, j);
>> +
>> +				if (virq > 0)
>> +					irq_dispose_mapping(virq);
>
> I am not an IRQ expert, so all I can really do is compare this to
> usage in other drivers.
>
> There are 20+ drivers in drivers/pci/controller, and I don't see
> irq_dispose_mapping() usage similar to this elsewhere.  Does that mean
> most or all of the other drivers have a similar defect?

Right.

But the real question is why is such a mapping not torn down by the
entity (device, bridge, whatever) which set it up in the first place?

Thanks,

        tglx



More information about the linux-arm-kernel mailing list