mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 2/4] ARM: psci: client: match most specific compatible first
Date: Tue,  1 Nov 2022 07:26:40 +0100	[thread overview]
Message-ID: <20221101062642.3207113-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20221101062642.3207113-1-a.fatoum@pengutronix.de>

The PSCI client driver will use the barebox compatible to determine
whether it's safe to use the ARM_PSCI_0_2_FN_PSCI_VERSION command.

For this reason, we need to match against the newer PSCI compatibles
first, because otherwise

  compatible = "arm,psci-1.0", "arm,psci-0.2", "arm,psci";

would have us end up with PSCI v0.1 instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/cpu/psci-client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/psci-client.c b/arch/arm/cpu/psci-client.c
index 7d5b3768b59e..8e151177c2d7 100644
--- a/arch/arm/cpu/psci-client.c
+++ b/arch/arm/cpu/psci-client.c
@@ -176,9 +176,9 @@ static int __init psci_probe(struct device_d *dev)
 }
 
 static __maybe_unused struct of_device_id psci_dt_ids[] = {
-	{ .compatible = "arm,psci",	.data = (void*)ARM_PSCI_VER(0,1) },
-	{ .compatible = "arm,psci-0.2",	.data = (void*)ARM_PSCI_VER(0,2) },
 	{ .compatible = "arm,psci-1.0",	.data = (void*)ARM_PSCI_VER(1,0) },
+	{ .compatible = "arm,psci-0.2",	.data = (void*)ARM_PSCI_VER(0,2) },
+	{ .compatible = "arm,psci",	.data = (void*)ARM_PSCI_VER(0,1) },
 	{ /* sentinel */ },
 };
 
-- 
2.30.2




  parent reply	other threads:[~2022-11-01  6:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01  6:26 [PATCH master 0/4] ARM: psci: client: unbreak hypervisor boot Ahmad Fatoum
2022-11-01  6:26 ` [PATCH master 1/4] ARM: psci: of: fixup only version if node already exists Ahmad Fatoum
2022-11-01  6:26 ` Ahmad Fatoum [this message]
2022-11-01  6:26 ` [PATCH master 3/4] ARM: psci: client: always register OF fixup Ahmad Fatoum
2022-11-01  6:26 ` [PATCH master 4/4] ARM: psci: keep older PSCI versions in compatible fixup Ahmad Fatoum

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=20221101062642.3207113-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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