[tip: irq/drivers] irqchip/loongson-eiointc: Use pa_to_nid() rather than hard-code

From: tip-bot2 for Huacai Chen

Date: Thu Oct 15 2026 - 06:29:34 EST


The following commit has been merged into the irq/drivers branch of tip:

Commit-ID: 0a0cdf87d07e22927c2a4c47b78a09bec37a7d38
Gitweb: https://git.kernel.org/tip/0a0cdf87d07e22927c2a4c47b78a09bec37a7d38
Author: Huacai Chen <chenhuacai@xxxxxxxxxxx>
AuthorDate: Tue, 13 Oct 2026 14:23:58 +08:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Thu, 15 Oct 2026 12:16:59 +02:00

irqchip/loongson-eiointc: Use pa_to_nid() rather than hard-code

NODE_ADDRSPACE_SHIFT is 44 now but may be changed in the future, so use
pa_to_nid() rather than the hard-coded valud.

Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20261013062358.60654-1-chenhuacai@xxxxxxxxxxx
---
drivers/irqchip/irq-loongson-eiointc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index a9e8b48..ba6e848 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -454,7 +454,7 @@ static int __init pch_pic_parse_madt(union acpi_subtable_headers *header,
const unsigned long end)
{
struct acpi_madt_bio_pic *pchpic_entry = (struct acpi_madt_bio_pic *)header;
- unsigned int node = (pchpic_entry->address >> 44) & 0xf;
+ unsigned int node = pa_to_nid(pchpic_entry->address) & 0xf;
struct irq_domain *parent = acpi_get_vec_parent(node, pch_group);

if (parent)