aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@bootlin.com>2025-01-23 12:01:57 +0100
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2025-02-21 14:49:24 +0100
commitccd015b02d18e708bfebe41f017634b88903f057 (patch)
treedd668f31ac51f137de37b1e61341d0fd0478fb41 /arch/mips/kernel
parentMIPS: cm: Detect CM quirks from device tree (diff)
downloadwireguard-linux-ccd015b02d18e708bfebe41f017634b88903f057.tar.xz
wireguard-linux-ccd015b02d18e708bfebe41f017634b88903f057.zip
MIPS: CPS: Support broken HCI for multicluster
Some CM3.5 devices incorrectly report that hardware cache initialization has completed, and also claim to support hardware cache initialization when they don't actually do so. This commit fixes this issue by retrieving the correct information from the device tree and allowing the system to bypass the hardware cache initialization step. Instead, it relies on manual operation. As a result, multi-user support is now possible for these CPUs. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/smp-cps.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index b20ea4048429..e85bd087467e 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -333,6 +333,9 @@ static void __init cps_prepare_cpus(unsigned int max_cpus)
sizeof(*mips_cps_cluster_bootcfg),
GFP_KERNEL);
+ if (nclusters > 1)
+ mips_cm_update_property();
+
for (cl = 0; cl < nclusters; cl++) {
/* Allocate core boot configuration structs */
ncores = mips_cps_numcores(cl);
@@ -394,7 +397,7 @@ static void init_cluster_l2(void)
{
u32 l2_cfg, l2sm_cop, result;
- while (1) {
+ while (!mips_cm_is_l2_hci_broken) {
l2_cfg = read_gcr_redir_l2_ram_config();
/* If HCI is not supported, use the state machine below */