[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <173693320918.31546.8338251434613521373.tip-bot2@tip-bot2>
Date: Wed, 15 Jan 2025 09:26:48 -0000
From: "tip-bot2 for Tianyang Zhang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Tianyang Zhang <zhangtianyang@...ngson.cn>,
Thomas Gleixner <tglx@...utronix.de>, Huacai Chen <chenhuacai@...ngson.cn>,
x86@...nel.org, linux-kernel@...r.kernel.org, maz@...nel.org
Subject:
[tip: irq/core] irqchip/loongarch-avec: Add multi-nodes topology support
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 2af257388473298898d71313cfa6092b572f2602
Gitweb: https://git.kernel.org/tip/2af257388473298898d71313cfa6092b572f2602
Author: Tianyang Zhang <zhangtianyang@...ngson.cn>
AuthorDate: Sat, 11 Jan 2025 10:37:04 +08:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 15 Jan 2025 10:19:20 +01:00
irqchip/loongarch-avec: Add multi-nodes topology support
avecintc_init() enables the Advanced Interrupt Controller (AVEC) of
the boot CPU node, but nothing enables the AVEC on secondary nodes.
Move the enablement to the CPU hotplug callback so that secondary nodes get
the AVEC enabled too. In theory enabling it once per node would be
sufficient, but redundant enabling does no hurt, so keep the code simple
and do it unconditionally.
Signed-off-by: Tianyang Zhang <zhangtianyang@...ngson.cn>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Huacai Chen <chenhuacai@...ngson.cn>
Link: https://lore.kernel.org/all/20250111023704.17285-1-zhangtianyang@loongson.cn
---
drivers/irqchip/irq-loongarch-avec.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-loongarch-avec.c b/drivers/irqchip/irq-loongarch-avec.c
index 0f6e465..80e5595 100644
--- a/drivers/irqchip/irq-loongarch-avec.c
+++ b/drivers/irqchip/irq-loongarch-avec.c
@@ -56,6 +56,15 @@ struct avecintc_data {
unsigned int moving;
};
+static inline void avecintc_enable(void)
+{
+ u64 value;
+
+ value = iocsr_read64(LOONGARCH_IOCSR_MISC_FUNC);
+ value |= IOCSR_MISC_FUNC_AVEC_EN;
+ iocsr_write64(value, LOONGARCH_IOCSR_MISC_FUNC);
+}
+
static inline void avecintc_ack_irq(struct irq_data *d)
{
}
@@ -127,6 +136,8 @@ static int avecintc_cpu_online(unsigned int cpu)
guard(raw_spinlock)(&loongarch_avec.lock);
+ avecintc_enable();
+
irq_matrix_online(loongarch_avec.vector_matrix);
pending_list_init(cpu);
@@ -339,7 +350,6 @@ static int __init irq_matrix_init(void)
static int __init avecintc_init(struct irq_domain *parent)
{
int ret, parent_irq;
- unsigned long value;
raw_spin_lock_init(&loongarch_avec.lock);
@@ -378,9 +388,7 @@ static int __init avecintc_init(struct irq_domain *parent)
"irqchip/loongarch/avecintc:starting",
avecintc_cpu_online, avecintc_cpu_offline);
#endif
- value = iocsr_read64(LOONGARCH_IOCSR_MISC_FUNC);
- value |= IOCSR_MISC_FUNC_AVEC_EN;
- iocsr_write64(value, LOONGARCH_IOCSR_MISC_FUNC);
+ avecintc_enable();
return ret;
Powered by blists - more mailing lists