mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Aleksandar Rikalo <arikalo@gmail.com>,
	 Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	 Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: "Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Gregory CLEMENT" <gregory.clement@bootlin.com>
Subject: [PATCH v3 4/5] MIPS: CPS: Support broken HCI for multicluster
Date: Thu, 23 Jan 2025 12:01:57 +0100	[thread overview]
Message-ID: <20250123-cluster-hci-broken-v3-4-8a7ec57cbf68@bootlin.com> (raw)
In-Reply-To: <20250123-cluster-hci-broken-v3-0-8a7ec57cbf68@bootlin.com>

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>
---
 arch/mips/kernel/smp-cps.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index b20ea4048429e1aab2bffbada793ee594bee1e05..e85bd087467e8caf0640ad247ee5f8eb65107591 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 */

-- 
2.45.2


  parent reply	other threads:[~2025-01-23 11:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23 11:01 [PATCH v3 0/5] MIPS: Allow using multi-cluster with a broken HCI Gregory CLEMENT
2025-01-23 11:01 ` [PATCH v3 1/5] dt-bindings: mips: Document mti,mips-cm Gregory CLEMENT
2025-01-27 19:09   ` Rob Herring (Arm)
2025-01-23 11:01 ` [PATCH v3 2/5] dt-bindings: mips: mips-cm: Add a new compatible string for EyeQ6 Gregory CLEMENT
2025-01-27 19:10   ` Rob Herring (Arm)
2025-01-27 21:43   ` Jiaxun Yang
2025-01-27 22:07     ` Rob Herring
2025-01-28  1:16       ` Jiaxun Yang
2025-01-28 16:23         ` Gregory CLEMENT
2025-02-21  9:37           ` Thomas Bogendoerfer
2025-02-21  9:45             ` Gregory CLEMENT
2025-01-23 11:01 ` [PATCH v3 3/5] MIPS: cm: Detect CM quirks from device tree Gregory CLEMENT
2025-01-23 11:01 ` Gregory CLEMENT [this message]
2025-01-23 11:01 ` [PATCH v3 5/5] MIPS: mobileye: dts: eyeq6h: Enable cluster support Gregory CLEMENT
2025-02-21 14:04 ` [PATCH v3 0/5] MIPS: Allow using multi-cluster with a broken HCI Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250123-cluster-hci-broken-v3-4-8a7ec57cbf68@bootlin.com \
    --to=gregory.clement@bootlin.com \
    --cc=arikalo@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=theo.lebrun@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vladimir.kondratiev@mobileye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®