[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173029979323.3137.10389404869472643777.tip-bot2@tip-bot2>
Date: Wed, 30 Oct 2024 14:49:53 -0000
From: "tip-bot2 for Paul Burton" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Paul Burton <paulburton@...nel.org>, "Chao-ying Fu" <cfu@...ecomp.com>,
Dragan Mladjenovic <dragan.mladjenovic@...mia.com>,
Aleksandar Rikalo <arikalo@...il.com>, Thomas Gleixner <tglx@...utronix.de>,
Serge Semin <fancer.lancer@...il.com>,
Gregory CLEMENT <gregory.clement@...tlin.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/core] irqchip/mips-gic: Support multi-cluster in
for_each_online_cpu_gic()
The following commit has been merged into the irq/core branch of tip:
Commit-ID: d9e2ed610a6094534d13ea347c7b7a5bd7ce4ee5
Gitweb: https://git.kernel.org/tip/d9e2ed610a6094534d13ea347c7b7a5bd7ce4ee5
Author: Paul Burton <paulburton@...nel.org>
AuthorDate: Mon, 28 Oct 2024 18:59:24 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 30 Oct 2024 15:41:18 +01:00
irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic()
Use CM's GCR_CL_REDIRECT register to access registers in remote clusters,
so that users of gic_with_each_online_cpu() gains support for multi-cluster
without further changes.
Signed-off-by: Paul Burton <paulburton@...nel.org>
Signed-off-by: Chao-ying Fu <cfu@...ecomp.com>
Signed-off-by: Dragan Mladjenovic <dragan.mladjenovic@...mia.com>
Signed-off-by: Aleksandar Rikalo <arikalo@...il.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Serge Semin <fancer.lancer@...il.com>
Tested-by: Gregory CLEMENT <gregory.clement@...tlin.com>
Link: https://lore.kernel.org/all/20241028175935.51250-3-arikalo@gmail.com
---
drivers/irqchip/irq-mips-gic.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 6c7a7d2..29bdfdc 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -88,6 +88,12 @@ static int __gic_with_next_online_cpu(int prev)
return cpu;
}
+static inline void gic_unlock_cluster(void)
+{
+ if (mips_cps_multicluster_cpus())
+ mips_cm_unlock_other();
+}
+
/**
* for_each_online_cpu_gic() - Iterate over online CPUs, access local registers
* @cpu: An integer variable to hold the current CPU number
@@ -102,6 +108,7 @@ static int __gic_with_next_online_cpu(int prev)
guard(raw_spinlock_irqsave)(gic_lock); \
for ((cpu) = __gic_with_next_online_cpu(-1); \
(cpu) < nr_cpu_ids; \
+ gic_unlock_cluster(), \
(cpu) = __gic_with_next_online_cpu(cpu))
static void gic_clear_pcpu_masks(unsigned int intr)
Powered by blists - more mailing lists