Skip to contentSkip to conversation

drivers: firmware: psci: unify enable-method binding on ARM {64, 32}-bit systems

PATCH New Sudeep Holla 3 participants 5 messages Apr 22, 2016 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: firmware: psci: unify enable-method binding on ARM {64, 32}-bit systems

Currently ARM CPUs DT bindings allows different enable-method value for PSCI based systems. On ARM 64-bit this property is required and must be "psci" while on ARM 32-bit systems this property is optional and must be "arm,psci".

This is problematic if 32-bit OS is run on 64-bit system which has "psci" as enable-method rather than the expected "arm,psci".

So let's unify the value into "psci" and remove support for "arm,psci" before it finds any users.

Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
---
 Documentation/devicetree/bindings/arm/cpus.txt | 1 -
 drivers/firmware/psci.c                        | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/arm/cpus.txt +0 -1
index ccc62f145306..3f0cbbb8395f 100644
@@ -192,7 +192,6 @@ nodes to be present and contain the properties described below.
 			  can be one of:
 			    "allwinner,sun6i-a31"
 			    "allwinner,sun8i-a23"
-			    "arm,psci"
 			    "arm,realview-smp"
 			    "brcm,bcm-nsp-smp"
 			    "brcm,brahma-b15"
drivers/firmware/psci.c +1 -1
index 11bfee8b79a9..b5d05807e6ec 100644
@@ -360,7 +360,7 @@ static struct cpuidle_ops psci_cpuidle_ops __initdata = {
 	.init = psci_dt_cpu_init_idle,
 };
 
-CPUIDLE_METHOD_OF_DECLARE(psci, "arm,psci", &psci_cpuidle_ops);
+CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops);
 #endif
 #endif
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 drivers: firmware: psci: unify enable-method binding on ARM {64,32}-bit systems

Quoted 4 lines · Sudeep Holla

Currently ARM CPUs DT bindings allows different enable-method value for PSCI based systems. On ARM 64-bit this property is required and must be "psci" while on ARM 32-bit systems this property is optional and must be "arm,psci".

FWIW, "arm,psci" has always been the compatible string for the PSCI node, and was never intended to be the enable-method. So as far as I can tell, this was a mistake/bug, and not a deliberate attempt at specifying 32-bit differently.

Quoted 11 lines

This is problematic if 32-bit OS is run on 64-bit system which has "psci" as enable-method rather than the expected "arm,psci".

So let's unify the value into "psci" and remove support for "arm,psci" before it finds any users.

Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>

This was definitely a mistake, as "arm,psci" was the compatible string for the psci node, and was never the enable-method. So:

Hopefully no-one's begun to use this.

Thanks,
Mark.

Quoted 33 lines
---
 Documentation/devicetree/bindings/arm/cpus.txt | 1 -
 drivers/firmware/psci.c                        | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/arm/cpus.txt +0 -1
index ccc62f145306..3f0cbbb8395f 100644
@@ -192,7 +192,6 @@ nodes to be present and contain the properties described below.
 			  can be one of:
 			    "allwinner,sun6i-a31"
 			    "allwinner,sun8i-a23"
-			    "arm,psci"
 			    "arm,realview-smp"
 			    "brcm,bcm-nsp-smp"
 			    "brcm,brahma-b15"
drivers/firmware/psci.c +1 -1
index 11bfee8b79a9..b5d05807e6ec 100644
@@ -360,7 +360,7 @@ static struct cpuidle_ops psci_cpuidle_ops __initdata = {
 	.init = psci_dt_cpu_init_idle,
 };
 
-CPUIDLE_METHOD_OF_DECLARE(psci, "arm,psci", &psci_cpuidle_ops);
+CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops);
 #endif
 #endif
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/1 drivers: firmware: psci: unify enable-method binding on ARM {64,32}-bit systems

Quoted 11 lines · Mark Rutland
Quoted 4 lines · Sudeep Holla

Currently ARM CPUs DT bindings allows different enable-method value for PSCI based systems. On ARM 64-bit this property is required and must be "psci" while on ARM 32-bit systems this property is optional and must be "arm,psci".

FWIW, "arm,psci" has always been the compatible string for the PSCI node, and was never intended to be the enable-method. So as far as I can tell, this was a mistake/bug, and not a deliberate attempt at specifying 32-bit differently.

I agree.

Quoted 12 lines
Quoted 11 lines

This is problematic if 32-bit OS is run on 64-bit system which has "psci" as enable-method rather than the expected "arm,psci".

So let's unify the value into "psci" and remove support for "arm,psci" before it finds any users.

Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Quoted 5 lines

This was definitely a mistake, as "arm,psci" was the compatible string for the psci node, and was never the enable-method. So:

Thanks.

Quoted 2 lines

Hopefully no-one's begun to use this.

Seems so. Even the 32-bit kernel doesn't make use of that.

The first user was for idle(see below) which was added in v4.6 just to keep it in sync with binding. It would be good to get it fixed before the final v4.6

Quoted 10 lines
Quoted 10 lines
drivers/firmware/psci.c +1 -1
index 11bfee8b79a9..b5d05807e6ec 100644
@@ -360,7 +360,7 @@ static struct cpuidle_ops psci_cpuidle_ops __initdata = {
  	.init = psci_dt_cpu_init_idle,
  };
 
-CPUIDLE_METHOD_OF_DECLARE(psci, "arm,psci", &psci_cpuidle_ops);
+CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops);
Signature · 2 lines
Regards,
Sudeep
#3 lore raw

PATCH 1/1 drivers: firmware: psci: unify enable-method binding on ARM {64,32}-bit systems

Quoted 33 lines · Sudeep Holla
Quoted 10 lines · Mark Rutland
Quoted 4 lines · Sudeep Holla

Currently ARM CPUs DT bindings allows different enable-method value for PSCI based systems. On ARM 64-bit this property is required and must be "psci" while on ARM 32-bit systems this property is optional and must be "arm,psci".

FWIW, "arm,psci" has always been the compatible string for the PSCI node, and was never intended to be the enable-method. So as far as I can tell, this was a mistake/bug, and not a deliberate attempt at specifying 32-bit differently.

I agree.

Quoted 12 lines
Quoted 11 lines

This is problematic if 32-bit OS is run on 64-bit system which has "psci" as enable-method rather than the expected "arm,psci".

So let's unify the value into "psci" and remove support for "arm,psci" before it finds any users.

Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Quoted 4 lines

This was definitely a mistake, as "arm,psci" was the compatible string for the psci node, and was never the enable-method. So:

Thanks.

Quoted 7 lines
Quoted 1 line

Hopefully no-one's begun to use this.

Seems so. Even the 32-bit kernel doesn't make use of that.

The first user was for idle(see below) which was added in v4.6 just to keep it in sync with binding. It would be good to get it fixed before the final v4.6

Indeed.

Lorenzo, how should we forward this on? Do we have any other urgent fixes for v4.6, or should we ask arm-soc to take this alone?

Thanks,
Mark.

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
drivers/firmware/psci.c +1 -1
index 11bfee8b79a9..b5d05807e6ec 100644
@@ -360,7 +360,7 @@ static struct cpuidle_ops psci_cpuidle_ops __initdata = {
 	.init = psci_dt_cpu_init_idle,
 };
 
-CPUIDLE_METHOD_OF_DECLARE(psci, "arm,psci", &psci_cpuidle_ops);
+CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops);
Signature · 6 lines
Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH 1/1 drivers: firmware: psci: unify enable-method binding on ARM {64,32}-bit systems

In reply to Sudeep Holla
Quoted 16 lines · Sudeep Holla

Currently ARM CPUs DT bindings allows different enable-method value for PSCI based systems. On ARM 64-bit this property is required and must be "psci" while on ARM 32-bit systems this property is optional and must be "arm,psci".

This is problematic if 32-bit OS is run on 64-bit system which has "psci" as enable-method rather than the expected "arm,psci".

So let's unify the value into "psci" and remove support for "arm,psci" before it finds any users.

Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Quoted 4 lines
---
 Documentation/devicetree/bindings/arm/cpus.txt | 1 -
 drivers/firmware/psci.c                        | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
Quoted 28 lines
Documentation/devicetree/bindings/arm/cpus.txt +0 -1
index ccc62f145306..3f0cbbb8395f 100644
@@ -192,7 +192,6 @@ nodes to be present and contain the properties described below.
 			  can be one of:
 			    "allwinner,sun6i-a31"
 			    "allwinner,sun8i-a23"
-			    "arm,psci"
 			    "arm,realview-smp"
 			    "brcm,bcm-nsp-smp"
 			    "brcm,brahma-b15"
drivers/firmware/psci.c +1 -1
index 11bfee8b79a9..b5d05807e6ec 100644
@@ -360,7 +360,7 @@ static struct cpuidle_ops psci_cpuidle_ops __initdata = {
 	.init = psci_dt_cpu_init_idle,
 };
 
-CPUIDLE_METHOD_OF_DECLARE(psci, "arm,psci", &psci_cpuidle_ops);
+CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops);
 #endif
 #endif
 
Signature · 1 line
1.9.1