Files
linux/arch/mips/kernel
Paul Burton 00a134fc2b MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
The pm-cps code has up until now used per-CPU variables indexed by core,
rather than CPU number, in order to share data amongst sibling CPUs (ie.
VPs/threads in a core). This works fine for single cluster systems, but
with multi-cluster systems a core number is no longer unique in the
system, leading to sharing between CPUs that are not actually siblings.

Avoid this issue by using per-CPU variables as they are more generally
used - ie. access them using CPU numbers rather than core numbers.
Sharing between siblings is then accomplished by:
 - Assigning the same pointer to entries for each sibling CPU for the
   nc_asm_enter & ready_count variables, which allow this by virtue of
   being per-CPU pointers.

 - Indexing by the first CPU set in a CPUs cpu_sibling_map in the case
   of pm_barrier, for which we can't use the previous approach because
   the per-CPU variable is not a pointer.

Signed-off-by: Paul Burton <paulburton@kernel.org>
Signed-off-by: Dragan Mladjenovic <dragan.mladjenovic@syrmia.com>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2025-02-21 10:19:30 +01:00
..
2021-04-07 16:11:05 +02:00
2024-10-23 18:10:24 +02:00
2018-10-31 08:54:16 -07:00
2022-03-01 10:07:22 +01:00
2025-01-11 12:32:12 +01:00
2022-03-01 10:07:22 +01:00
2021-02-15 12:23:54 +01:00
2024-01-08 10:39:12 +01:00
2023-12-10 17:21:38 -08:00
2024-01-08 10:39:12 +01:00
2022-05-19 19:30:31 +02:00
2024-03-07 17:18:50 +01:00
2023-12-10 17:21:38 -08:00
2023-12-10 17:21:38 -08:00
2023-06-09 10:34:14 +02:00
2024-09-08 16:01:10 +02:00
2023-12-10 17:21:38 -08:00
2024-01-08 10:39:12 +01:00
2020-05-07 11:55:47 +02:00