summaryrefslogtreecommitdiff
path: root/arch/arm/mach-oxnas/headsmp.S
diff options
context:
space:
mode:
authorSaurabh Sengar <ssengar@linux.microsoft.com>2023-03-28 10:30:04 +0300
committerThomas Gleixner <tglx@linutronix.de>2023-04-12 18:45:50 +0300
commit5af507bef93c09a94fb8f058213b489178f4cbe5 (patch)
tree4b8028b10f38224167c67018ae0fb7142a8f9661 /arch/arm/mach-oxnas/headsmp.S
parentf96fb2df3eb31ede1b34b0521560967310267750 (diff)
downloadlinux-5af507bef93c09a94fb8f058213b489178f4cbe5.tar.xz
x86/ioapic: Don't return 0 from arch_dynirq_lower_bound()
arch_dynirq_lower_bound() is invoked by the core interrupt code to retrieve the lowest possible Linux interrupt number for dynamically allocated interrupts like MSI. The x86 implementation uses this to exclude the IO/APIC GSI space. This works correctly as long as there is an IO/APIC registered, but returns 0 if not. This has been observed in VMs where the BIOS does not advertise an IO/APIC. 0 is an invalid interrupt number except for the legacy timer interrupt on x86. The return value is unchecked in the core code, so it ends up to allocate interrupt number 0 which is subsequently considered to be invalid by the caller, e.g. the MSI allocation code. The function has already a check for 0 in the case that an IO/APIC is registered, as ioapic_dynirq_base is 0 in case of device tree setups. Consolidate this and zero check for both ioapic_dynirq_base and gsi_top, which is used in the case that no IO/APIC is registered. Fixes: 3e5bedc2c258 ("x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines") Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/1679988604-20308-1-git-send-email-ssengar@linux.microsoft.com
Diffstat (limited to 'arch/arm/mach-oxnas/headsmp.S')
0 files changed, 0 insertions, 0 deletions