Re: [PATCH] x86/apic: Update virtual irq base for DT/OF based system as well

From: Tanwar, Rahul
Date: Wed Aug 21 2019 - 05:31:29 EST


On 21/8/2019 4:34 PM, Thomas Gleixner wrote:

Secondly, this link is irrelevant. ioapic_dynirq_base has nothing to do
with virtual IRQ number 0. It's a boundary for the dynamic allocation of
virtual interrupt numbers so that the core allocator does not pick
interrupts out of the IOAPIC's fixed interrupt number space.

This can be legitimately 0 when IOAPIC is not enabled at all.

Can you please explain what kind of problem you were seing and what this
really fixes?

The problem is that device tree infrastructure considers 0 IRQ value as invalid/error

value whereas for ACPI, 0 is a valid value. Without this change, the problem that we

see is that the first driver using of_irq_get_xx() or its variants fails because of 0 IRQ

number. With this change, allocated IRQ number is never 0 so it works ok.