Skip to contentSkip to conversation

powerpc: Fix SPE Power ISA properties for e500v1 platforms

PATCH Applied Pali Rohár 2 participants 3 messages Sep 2, 2022 – Oct 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 powerpc: Fix SPE Power ISA properties for e500v1 platforms

Commit 2eb28006431c ("powerpc/e500v2: Add Power ISA properties to comply with ePAPR 1.1") introduced new include file e500v2_power_isa.dtsi and should have used it for all e500v2 platforms. But apparently it was used also for e500v1 platforms mpc8540, mpc8541, mpc8555 and mpc8560.

e500v1 cores compared to e500v2 do not support double precision floating point SPE instructions. Hence power-isa-sp.fd should not be set on e500v1 platforms, which is in e500v2_power_isa.dtsi include file.

Fix this issue by introducing a new e500v1_power_isa.dtsi include file and use it in all e500v1 device tree files.

Fixes 2eb28006431c ("powerpc/e500v2: Add Power ISA properties to comply with ePAPR 1.1")
---
 .../dts/fsl/{e500v2_power_isa.dtsi => e500v1_power_isa.dtsi}   | 3 +--
 arch/powerpc/boot/dts/fsl/mpc8540ads.dts                       | 2 +-
 arch/powerpc/boot/dts/fsl/mpc8541cds.dts                       | 2 +-
 arch/powerpc/boot/dts/fsl/mpc8555cds.dts                       | 2 +-
 arch/powerpc/boot/dts/fsl/mpc8560ads.dts                       | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)
 copy arch/powerpc/boot/dts/fsl/{e500v2_power_isa.dtsi => e500v1_power_isa.dtsi} (95%)
arch/powerpc/boot/dts/fsl/e500v1_power_isa.dtsi renamed from arch/powerpc/boot/dts/fsl/e500v2_power_isa.dtsi +1 -2
similarity index 95%
copy from arch/powerpc/boot/dts/fsl/e500v2_power_isa.dtsi
copy to arch/powerpc/boot/dts/fsl/e500v1_power_isa.dtsi
index f4928144d2c8..7e2a90cde72e 100644
@@ -1,5 +1,5 @@
 /*
- * e500v2 Power ISA Device Tree Source (include)
+ * e500v1 Power ISA Device Tree Source (include)
  *
  * Copyright 2012 Freescale Semiconductor Inc.
  *
@@ -44,7 +44,6 @@
 		power-isa-ecl;		// Embedded Cache Locking
 		power-isa-mmc;		// Memory Coherence
 		power-isa-sp;		// Signal Processing Engine
-		power-isa-sp.fd;	// SPE.Embedded Float Scalar Double
 		power-isa-sp.fs;	// SPE.Embedded Float Scalar Single
 		power-isa-sp.fv;	// SPE.Embedded Float Vector
 		mmu-type = "power-embedded";
arch/powerpc/boot/dts/fsl/mpc8540ads.dts +1 -1
index 18a885130538..e03ae130162b 100644
@@ -7,7 +7,7 @@
 
 /dts-v1/;
 
-/include/ "e500v2_power_isa.dtsi"
+/include/ "e500v1_power_isa.dtsi"
 
 / {
 	model = "MPC8540ADS";
arch/powerpc/boot/dts/fsl/mpc8541cds.dts +1 -1
index ac381e7b1c60..a2a6c5cf852e 100644
@@ -7,7 +7,7 @@
 
 /dts-v1/;
 
-/include/ "e500v2_power_isa.dtsi"
+/include/ "e500v1_power_isa.dtsi"
 
 / {
 	model = "MPC8541CDS";
arch/powerpc/boot/dts/fsl/mpc8555cds.dts +1 -1
index 9f58db2a7e66..901b6ff06dfb 100644
@@ -7,7 +7,7 @@
 
 /dts-v1/;
 
-/include/ "e500v2_power_isa.dtsi"
+/include/ "e500v1_power_isa.dtsi"
 
 / {
 	model = "MPC8555CDS";
arch/powerpc/boot/dts/fsl/mpc8560ads.dts +1 -1
index a24722ccaebf..c2f9aea78b29 100644
@@ -7,7 +7,7 @@
 
 /dts-v1/;
 
-/include/ "e500v2_power_isa.dtsi"
+/include/ "e500v1_power_isa.dtsi"
 
 / {
 	model = "MPC8560ADS";
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 powerpc: Include e500v1_power_isa.dtsi for remaining e500v1 platforms

There are still some board device tree files without Power ISA properties which have Freescale e500v1 cores, namely those which are based on Freescale mpc8540, mpc8541, mpc8555 and mpc8560 processors.

So include newly introduced e500v1_power_isa.dtsi file in devices tree files with those processors.

---
 arch/powerpc/boot/dts/ksi8560.dts      | 2 ++
 arch/powerpc/boot/dts/stx_gp3_8560.dts | 2 ++
 arch/powerpc/boot/dts/stxssa8555.dts   | 2 ++
 arch/powerpc/boot/dts/tqm8540.dts      | 2 ++
 arch/powerpc/boot/dts/tqm8541.dts      | 2 ++
 arch/powerpc/boot/dts/tqm8555.dts      | 2 ++
 arch/powerpc/boot/dts/tqm8560.dts      | 2 ++
 7 files changed, 14 insertions(+)
arch/powerpc/boot/dts/ksi8560.dts +2 -0
index fe6c17c8812a..37a7eb576d02 100644
@@ -14,6 +14,8 @@
 
 /dts-v1/;
 
+/include/ "fsl/e500v1_power_isa.dtsi"
+
 / {
 	model = "KSI8560";
 	compatible = "emerson,KSI8560";
arch/powerpc/boot/dts/stx_gp3_8560.dts +2 -0
index d1ab698eef36..e73f7e75b0b4 100644
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+/include/ "fsl/e500v1_power_isa.dtsi"
+
 / {
 	model = "stx,gp3";
 	compatible = "stx,gp3-8560", "stx,gp3";
arch/powerpc/boot/dts/stxssa8555.dts +2 -0
index 5dca2a91c41f..96add25c904b 100644
@@ -9,6 +9,8 @@
 
 /dts-v1/;
 
+/include/ "fsl/e500v1_power_isa.dtsi"
+
 / {
 	model = "stx,gp3";
         compatible = "stx,gp3-8560", "stx,gp3";
arch/powerpc/boot/dts/tqm8540.dts +2 -0
index 9c1eb9779108..eb4d8fd3f7aa 100644
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+/include/ "fsl/e500v1_power_isa.dtsi"
+
 / {
 	model = "tqc,tqm8540";
 	compatible = "tqc,tqm8540";
arch/powerpc/boot/dts/tqm8541.dts +2 -0
index 44595cf675d0..fe5d3d873ec9 100644
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+/include/ "fsl/e500v1_power_isa.dtsi"
+
 / {
 	model = "tqc,tqm8541";
 	compatible = "tqc,tqm8541";
arch/powerpc/boot/dts/tqm8555.dts +2 -0
index 54f3e82907d6..4be05b7d225d 100644
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+/include/ "fsl/e500v1_power_isa.dtsi"
+
 / {
 	model = "tqc,tqm8555";
 	compatible = "tqc,tqm8555";
arch/powerpc/boot/dts/tqm8560.dts +2 -0
index 7415cb69f60d..8ea48502420b 100644
@@ -8,6 +8,8 @@
 
 /dts-v1/;
 
+/include/ "fsl/e500v1_power_isa.dtsi"
+
 / {
 	model = "tqc,tqm8560";
 	compatible = "tqc,tqm8560";
Signature · 1 line
2.20.1
#2 lore raw
In reply to Pali Rohár
Quoted 10 lines · Pali Rohár

Commit 2eb28006431c ("powerpc/e500v2: Add Power ISA properties to comply with ePAPR 1.1") introduced new include file e500v2_power_isa.dtsi and should have used it for all e500v2 platforms. But apparently it was used also for e500v1 platforms mpc8540, mpc8541, mpc8555 and mpc8560.

e500v1 cores compared to e500v2 do not support double precision floating point SPE instructions. Hence power-isa-sp.fd should not be set on e500v1 platforms, which is in e500v2_power_isa.dtsi include file.

[...]

Applied to powerpc/next.

[1/2] powerpc: Fix SPE Power ISA properties for e500v1 platforms

      https://git.kernel.org/powerpc/c/37b9345ce7f4ab17538ea62def6f6d430f091355
[2/2] powerpc: Include e500v1_power_isa.dtsi for remaining e500v1 platforms
      https://git.kernel.org/powerpc/c/c102432005e8811b80b25641e12c4577970b5558

cheers