Skip to content

Commit d9e2ed6

Browse files
paulburtonKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Chao-ying Fu <[email protected]> Signed-off-by: Dragan Mladjenovic <[email protected]> Signed-off-by: Aleksandar Rikalo <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Serge Semin <[email protected]> Tested-by: Gregory CLEMENT <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 4964610 commit d9e2ed6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/irqchip/irq-mips-gic.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ static int __gic_with_next_online_cpu(int prev)
8888
return cpu;
8989
}
9090

91+
static inline void gic_unlock_cluster(void)
92+
{
93+
if (mips_cps_multicluster_cpus())
94+
mips_cm_unlock_other();
95+
}
96+
9197
/**
9298
* for_each_online_cpu_gic() - Iterate over online CPUs, access local registers
9399
* @cpu: An integer variable to hold the current CPU number
@@ -102,6 +108,7 @@ static int __gic_with_next_online_cpu(int prev)
102108
guard(raw_spinlock_irqsave)(gic_lock); \
103109
for ((cpu) = __gic_with_next_online_cpu(-1); \
104110
(cpu) < nr_cpu_ids; \
111+
gic_unlock_cluster(), \
105112
(cpu) = __gic_with_next_online_cpu(cpu))
106113

107114
static void gic_clear_pcpu_masks(unsigned int intr)

0 commit comments

Comments
 (0)