From: "tip-bot2 for Icenowy Zheng" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Icenowy Zheng <zhengxingda@iscas.ac.cn>,
Thomas Gleixner <tglx@kernel.org>,
Huacai Chen <chenhuacai@loongson.cn>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] LoongArch: Override arch_dynirq_lower_bound to reserve LPC IRQs
Date: Thu, 26 Mar 2026 15:21:59 -0000 [thread overview]
Message-ID: <177453851901.1647592.7699962055637892754.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260321092032.3502701-3-zhengxingda@iscas.ac.cn>
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: dc30127cd050dbc9d8452846ee7fa6692a1093d2
Gitweb: https://git.kernel.org/tip/dc30127cd050dbc9d8452846ee7fa6692a1093d2
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>
AuthorDate: Sat, 21 Mar 2026 17:20:28 +08:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Thu, 26 Mar 2026 16:15:03 +01:00
LoongArch: Override arch_dynirq_lower_bound to reserve LPC IRQs
Loongson 7A PCH chips all contain a LPC controller, which is used in
some devices to connect legacy ISA devices (e.g. 8259 PS/2 controller).
The LPC irqchip driver will register LPC interrupts at the fixed range
0~15, and the PCH PIC irqchip driver uses dynamic allocation. However the
LPC interrupt numbers are currently not exempted from dynamic allocation.
The current setup work by accident because the LPC interrupt controller is
the first consumer of PIC interrupt controller, and the PIC interrupt
number is allocated after LPC interrupts are registered. Such setup is
fragile and will stop to work when the LPC irqchip driver is reworked.
Override arch_dynirq_lower_bound() to reserve LPC interrupts from dynamic
allocation, to prevent interrupt number collision and allow rework of the
LPC irqchip driver.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/20260321092032.3502701-3-zhengxingda@iscas.ac.cn
---
arch/loongarch/kernel/irq.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/loongarch/kernel/irq.c b/arch/loongarch/kernel/irq.c
index 80946ca..7bf68a7 100644
--- a/arch/loongarch/kernel/irq.c
+++ b/arch/loongarch/kernel/irq.c
@@ -11,6 +11,7 @@
#include <linux/irqchip.h>
#include <linux/kernel_stat.h>
#include <linux/proc_fs.h>
+#include <linux/minmax.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
@@ -99,6 +100,11 @@ int __init arch_probe_nr_irqs(void)
return NR_IRQS_LEGACY;
}
+unsigned int arch_dynirq_lower_bound(unsigned int from)
+{
+ return MAX(from, NR_IRQS_LEGACY);
+}
+
void __init init_IRQ(void)
{
int i;
next prev parent reply other threads:[~2026-03-26 15:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 9:20 [PATCH v4 0/6] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
2026-03-21 9:20 ` [PATCH v4 1/6] MIPS: loongson64: Override arch_dynirq_lower_bound to reserve LPC IRQs Icenowy Zheng
2026-03-26 15:22 ` [tip: irq/drivers] " tip-bot2 for Icenowy Zheng
2026-03-26 21:40 ` [PATCH v4 1/6] " Jiaxun Yang
2026-03-26 22:46 ` Thomas Bogendoerfer
2026-03-21 9:20 ` [PATCH v4 2/6] LoongArch: " Icenowy Zheng
2026-03-26 15:21 ` tip-bot2 for Icenowy Zheng [this message]
2026-03-21 9:20 ` [PATCH v4 3/6] dt-bindings: interrupt-controller: add LS7A PCH LPC Icenowy Zheng
2026-03-21 11:45 ` Jiaxun Yang
2026-03-25 16:56 ` Rob Herring (Arm)
2026-03-26 15:21 ` [tip: irq/drivers] dt-bindings: interrupt-controller: Add " tip-bot2 for Icenowy Zheng
2026-03-21 9:20 ` [PATCH v4 4/6] irqchip/loongson-pch-lpc: Extract non-ACPI-related code from ACPI init Icenowy Zheng
2026-03-26 15:21 ` [tip: irq/drivers] " tip-bot2 for Icenowy Zheng
2026-03-21 9:20 ` [PATCH v4 5/6] irqchip/loongson-pch-lpc: Add OF init code Icenowy Zheng
2026-03-26 15:21 ` [tip: irq/drivers] " tip-bot2 for Icenowy Zheng
2026-03-21 9:20 ` [PATCH v4 6/6] irqchip/loongson-pch-lpc: Enable building on MIPS Loongson64 Icenowy Zheng
2026-03-21 11:46 ` Jiaxun Yang
2026-03-26 15:21 ` [tip: irq/drivers] " tip-bot2 for Icenowy Zheng
2026-03-21 12:10 ` [PATCH v4 0/6] Add support for LS7A LPC IRQ for MIPS Loongson systems Huacai Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=177453851901.1647592.7699962055637892754.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=chenhuacai@loongson.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=zhengxingda@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®