devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support
@ 2023-12-20 15:57 Clément Léger
  2023-12-20 15:57 ` [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso Clément Léger
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Clément Léger @ 2023-12-20 15:57 UTC (permalink / raw)
  To: linux-doc, linux-riscv, linux-kernel, devicetree
  Cc: Clément Léger, Jonathan Corbet, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

This series add support for a few more extensions that are present in
the RVA22U64/RVA23U64 (either mandatory or optional) and that are useful
for userspace:
- Zicond
- Zacas
- Ztso

Series currently based on riscv/for-next.

---

Changes in V2:
 - Removed Zam which is not yet ratified
 - Link to v1: https://lore.kernel.org/linux-riscv/20231213113308.133176-1-cleger@rivosinc.com/

Clément Léger (6):
  riscv: add ISA extension parsing for Ztso
  riscv: hwprobe: export Ztso ISA extension
  dt-bindings: riscv: add Zacas ISA extension description
  riscv: add ISA extension parsing for Zacas
  riscv: hwprobe: export Zacas ISA extension
  riscv: hwprobe: export Zicond extension

 Documentation/arch/riscv/hwprobe.rst                | 13 +++++++++++++
 .../devicetree/bindings/riscv/extensions.yaml       |  6 ++++++
 arch/riscv/include/asm/hwcap.h                      |  2 ++
 arch/riscv/include/uapi/asm/hwprobe.h               |  3 +++
 arch/riscv/kernel/cpufeature.c                      |  2 ++
 arch/riscv/kernel/sys_riscv.c                       |  3 +++
 6 files changed, 29 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso
  2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
@ 2023-12-20 15:57 ` Clément Léger
  2024-01-10 11:32   ` Conor Dooley
  2023-12-20 15:57 ` [PATCH v2 2/6] riscv: hwprobe: export Ztso ISA extension Clément Léger
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Clément Léger @ 2023-12-20 15:57 UTC (permalink / raw)
  To: linux-doc, linux-riscv, linux-kernel, devicetree
  Cc: Clément Léger, Jonathan Corbet, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

Add support to parse the Ztso string in the riscv,isa string. The
bindings already supports it but not the ISA parsing code.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
---
 arch/riscv/include/asm/hwcap.h | 1 +
 arch/riscv/kernel/cpufeature.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
index 2438d4685da6..3b31efe2f716 100644
--- a/arch/riscv/include/asm/hwcap.h
+++ b/arch/riscv/include/asm/hwcap.h
@@ -84,6 +84,7 @@
 #define RISCV_ISA_EXT_ZVFH		69
 #define RISCV_ISA_EXT_ZVFHMIN		70
 #define RISCV_ISA_EXT_ZFA		71
+#define RISCV_ISA_EXT_ZTSO		72
 
 #define RISCV_ISA_EXT_MAX		128
 #define RISCV_ISA_EXT_INVALID		U32_MAX
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index dc0ab3e97cd2..3eb48a0eecb3 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -279,6 +279,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
 	__RISCV_ISA_EXT_DATA(zkt, RISCV_ISA_EXT_ZKT),
 	__RISCV_ISA_EXT_DATA(zksed, RISCV_ISA_EXT_ZKSED),
 	__RISCV_ISA_EXT_DATA(zksh, RISCV_ISA_EXT_ZKSH),
+	__RISCV_ISA_EXT_DATA(ztso, RISCV_ISA_EXT_ZTSO),
 	__RISCV_ISA_EXT_SUPERSET(zvbb, RISCV_ISA_EXT_ZVBB, riscv_zvbb_exts),
 	__RISCV_ISA_EXT_DATA(zvbc, RISCV_ISA_EXT_ZVBC),
 	__RISCV_ISA_EXT_DATA(zvfh, RISCV_ISA_EXT_ZVFH),
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/6] riscv: hwprobe: export Ztso ISA extension
  2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
  2023-12-20 15:57 ` [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso Clément Léger
@ 2023-12-20 15:57 ` Clément Léger
  2023-12-20 15:57 ` [PATCH v2 3/6] dt-bindings: riscv: add Zacas ISA extension description Clément Léger
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Clément Léger @ 2023-12-20 15:57 UTC (permalink / raw)
  To: linux-doc, linux-riscv, linux-kernel, devicetree
  Cc: Clément Léger, Jonathan Corbet, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

Export the Ztso extension to userspace.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
---
 Documentation/arch/riscv/hwprobe.rst  | 4 ++++
 arch/riscv/include/uapi/asm/hwprobe.h | 1 +
 arch/riscv/kernel/sys_riscv.c         | 1 +
 3 files changed, 6 insertions(+)

diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst
index 41463b932268..10bd7b170118 100644
--- a/Documentation/arch/riscv/hwprobe.rst
+++ b/Documentation/arch/riscv/hwprobe.rst
@@ -161,6 +161,10 @@ The following keys are defined:
        defined in the RISC-V ISA manual starting from commit 056b6ff467c7
        ("Zfa is ratified").
 
+  * :c:macro:`RISCV_HWPROBE_EXT_ZTSO`: The Ztso extension is supported as
+       defined in the RISC-V ISA manual starting from commit 5618fb5a216b
+       ("Ztso is now ratified.")
+
 * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
   information about the selected set of processors.
 
diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h
index 91fbe1a7f2e2..01ac3dc196e5 100644
--- a/arch/riscv/include/uapi/asm/hwprobe.h
+++ b/arch/riscv/include/uapi/asm/hwprobe.h
@@ -56,6 +56,7 @@ struct riscv_hwprobe {
 #define		RISCV_HWPROBE_EXT_ZVFH		(1 << 30)
 #define		RISCV_HWPROBE_EXT_ZVFHMIN	(1 << 31)
 #define		RISCV_HWPROBE_EXT_ZFA		(1ULL << 32)
+#define		RISCV_HWPROBE_EXT_ZTSO		(1ULL << 33)
 #define RISCV_HWPROBE_KEY_CPUPERF_0	5
 #define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0)
 #define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0)
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index f0bd7b480b7f..6564fa9e7a7f 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -174,6 +174,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
 		EXT_KEY(ZKSH);
 		EXT_KEY(ZKT);
 		EXT_KEY(ZIHINTNTL);
+		EXT_KEY(ZTSO);
 
 		if (has_vector()) {
 			EXT_KEY(ZVBB);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/6] dt-bindings: riscv: add Zacas ISA extension description
  2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
  2023-12-20 15:57 ` [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso Clément Léger
  2023-12-20 15:57 ` [PATCH v2 2/6] riscv: hwprobe: export Ztso ISA extension Clément Léger
@ 2023-12-20 15:57 ` Clément Léger
  2023-12-20 15:57 ` [PATCH v2 4/6] riscv: add ISA extension parsing for Zacas Clément Léger
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Clément Léger @ 2023-12-20 15:57 UTC (permalink / raw)
  To: linux-doc, linux-riscv, linux-kernel, devicetree
  Cc: Clément Léger, Jonathan Corbet, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida, Conor Dooley

Add description for the Zacas ISA extension which was ratified recently.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
 Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index 3574a0b70be4..27beedb98198 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -171,6 +171,12 @@ properties:
             memory types as ratified in the 20191213 version of the privileged
             ISA specification.
 
+        - const: zacas
+          description: |
+            The Zacas extension for Atomic Compare-and-Swap (CAS) instructions
+            is supported as ratified at commit 5059e0ca641c ("update to
+            ratified") of the riscv-zacas.
+
         - const: zba
           description: |
             The standard Zba bit-manipulation extension for address generation
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/6] riscv: add ISA extension parsing for Zacas
  2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
                   ` (2 preceding siblings ...)
  2023-12-20 15:57 ` [PATCH v2 3/6] dt-bindings: riscv: add Zacas ISA extension description Clément Léger
@ 2023-12-20 15:57 ` Clément Léger
  2024-01-10 11:31   ` Conor Dooley
  2023-12-20 15:57 ` [PATCH v2 5/6] riscv: hwprobe: export Zacas ISA extension Clément Léger
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Clément Léger @ 2023-12-20 15:57 UTC (permalink / raw)
  To: linux-doc, linux-riscv, linux-kernel, devicetree
  Cc: Clément Léger, Jonathan Corbet, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

Add parsing for Zacas ISA extension which was ratified recently in the
riscv-zacas manual.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
---
 arch/riscv/include/asm/hwcap.h | 1 +
 arch/riscv/kernel/cpufeature.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
index 3b31efe2f716..34f86424d743 100644
--- a/arch/riscv/include/asm/hwcap.h
+++ b/arch/riscv/include/asm/hwcap.h
@@ -85,6 +85,7 @@
 #define RISCV_ISA_EXT_ZVFHMIN		70
 #define RISCV_ISA_EXT_ZFA		71
 #define RISCV_ISA_EXT_ZTSO		72
+#define RISCV_ISA_EXT_ZACAS		73
 
 #define RISCV_ISA_EXT_MAX		128
 #define RISCV_ISA_EXT_INVALID		U32_MAX
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 3eb48a0eecb3..9a9d915b5bb2 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -259,6 +259,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
 	__RISCV_ISA_EXT_DATA(zihintntl, RISCV_ISA_EXT_ZIHINTNTL),
 	__RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE),
 	__RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM),
+	__RISCV_ISA_EXT_DATA(zacas, RISCV_ISA_EXT_ZACAS),
 	__RISCV_ISA_EXT_DATA(zfa, RISCV_ISA_EXT_ZFA),
 	__RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH),
 	__RISCV_ISA_EXT_DATA(zfhmin, RISCV_ISA_EXT_ZFHMIN),
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 5/6] riscv: hwprobe: export Zacas ISA extension
  2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
                   ` (3 preceding siblings ...)
  2023-12-20 15:57 ` [PATCH v2 4/6] riscv: add ISA extension parsing for Zacas Clément Léger
@ 2023-12-20 15:57 ` Clément Léger
  2023-12-20 15:57 ` [PATCH v2 6/6] riscv: hwprobe: export Zicond extension Clément Léger
  2024-01-11 14:50 ` [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support patchwork-bot+linux-riscv
  6 siblings, 0 replies; 10+ messages in thread
From: Clément Léger @ 2023-12-20 15:57 UTC (permalink / raw)
  To: linux-doc, linux-riscv, linux-kernel, devicetree
  Cc: Clément Léger, Jonathan Corbet, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

Export Zacas ISA extension through hwprobe.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
---
 Documentation/arch/riscv/hwprobe.rst  | 4 ++++
 arch/riscv/include/uapi/asm/hwprobe.h | 1 +
 arch/riscv/kernel/sys_riscv.c         | 1 +
 3 files changed, 6 insertions(+)

diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst
index 10bd7b170118..bff68004ad43 100644
--- a/Documentation/arch/riscv/hwprobe.rst
+++ b/Documentation/arch/riscv/hwprobe.rst
@@ -165,6 +165,10 @@ The following keys are defined:
        defined in the RISC-V ISA manual starting from commit 5618fb5a216b
        ("Ztso is now ratified.")
 
+  * :c:macro:`RISCV_HWPROBE_EXT_ZACAS`: The Zacas extension is supported as
+       defined in the Atomic Compare-and-Swap (CAS) instructions manual starting
+       from commit 5059e0ca641c ("update to ratified").
+
 * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
   information about the selected set of processors.
 
diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h
index 01ac3dc196e5..ac65bb43c8e7 100644
--- a/arch/riscv/include/uapi/asm/hwprobe.h
+++ b/arch/riscv/include/uapi/asm/hwprobe.h
@@ -57,6 +57,7 @@ struct riscv_hwprobe {
 #define		RISCV_HWPROBE_EXT_ZVFHMIN	(1 << 31)
 #define		RISCV_HWPROBE_EXT_ZFA		(1ULL << 32)
 #define		RISCV_HWPROBE_EXT_ZTSO		(1ULL << 33)
+#define		RISCV_HWPROBE_EXT_ZACAS		(1ULL << 34)
 #define RISCV_HWPROBE_KEY_CPUPERF_0	5
 #define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0)
 #define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0)
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index 6564fa9e7a7f..6c680c75ac0d 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -175,6 +175,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
 		EXT_KEY(ZKT);
 		EXT_KEY(ZIHINTNTL);
 		EXT_KEY(ZTSO);
+		EXT_KEY(ZACAS);
 
 		if (has_vector()) {
 			EXT_KEY(ZVBB);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 6/6] riscv: hwprobe: export Zicond extension
  2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
                   ` (4 preceding siblings ...)
  2023-12-20 15:57 ` [PATCH v2 5/6] riscv: hwprobe: export Zacas ISA extension Clément Léger
@ 2023-12-20 15:57 ` Clément Léger
  2024-01-11 14:50 ` [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support patchwork-bot+linux-riscv
  6 siblings, 0 replies; 10+ messages in thread
From: Clément Léger @ 2023-12-20 15:57 UTC (permalink / raw)
  To: linux-doc, linux-riscv, linux-kernel, devicetree
  Cc: Clément Léger, Jonathan Corbet, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

Export the zicond extension to userspace using hwprobe.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
---
 Documentation/arch/riscv/hwprobe.rst  | 5 +++++
 arch/riscv/include/uapi/asm/hwprobe.h | 1 +
 arch/riscv/kernel/sys_riscv.c         | 1 +
 3 files changed, 7 insertions(+)

diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst
index bff68004ad43..ee320fe7581b 100644
--- a/Documentation/arch/riscv/hwprobe.rst
+++ b/Documentation/arch/riscv/hwprobe.rst
@@ -169,6 +169,11 @@ The following keys are defined:
        defined in the Atomic Compare-and-Swap (CAS) instructions manual starting
        from commit 5059e0ca641c ("update to ratified").
 
+  * :c:macro:`RISCV_HWPROBE_EXT_ZICOND`: The Zicond extension is supported as
+       defined in the RISC-V Integer Conditional (Zicond) operations extension
+       manual starting from commit 95cf1f9 ("Add changes requested by Ved
+       during signoff")
+
 * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
   information about the selected set of processors.
 
diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h
index ac65bb43c8e7..fd7af0dddb12 100644
--- a/arch/riscv/include/uapi/asm/hwprobe.h
+++ b/arch/riscv/include/uapi/asm/hwprobe.h
@@ -58,6 +58,7 @@ struct riscv_hwprobe {
 #define		RISCV_HWPROBE_EXT_ZFA		(1ULL << 32)
 #define		RISCV_HWPROBE_EXT_ZTSO		(1ULL << 33)
 #define		RISCV_HWPROBE_EXT_ZACAS		(1ULL << 34)
+#define		RISCV_HWPROBE_EXT_ZICOND	(1ULL << 35)
 #define RISCV_HWPROBE_KEY_CPUPERF_0	5
 #define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0)
 #define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0)
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index 6c680c75ac0d..cca9b1e35647 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -176,6 +176,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
 		EXT_KEY(ZIHINTNTL);
 		EXT_KEY(ZTSO);
 		EXT_KEY(ZACAS);
+		EXT_KEY(ZICOND);
 
 		if (has_vector()) {
 			EXT_KEY(ZVBB);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 4/6] riscv: add ISA extension parsing for Zacas
  2023-12-20 15:57 ` [PATCH v2 4/6] riscv: add ISA extension parsing for Zacas Clément Léger
@ 2024-01-10 11:31   ` Conor Dooley
  0 siblings, 0 replies; 10+ messages in thread
From: Conor Dooley @ 2024-01-10 11:31 UTC (permalink / raw)
  To: Clément Léger
  Cc: linux-doc, linux-riscv, linux-kernel, devicetree, Jonathan Corbet,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

[-- Attachment #1: Type: text/plain, Size: 1576 bytes --]

On Wed, Dec 20, 2023 at 04:57:20PM +0100, Clément Léger wrote:
> Add parsing for Zacas ISA extension which was ratified recently in the
> riscv-zacas manual.
> 
> Signed-off-by: Clément Léger <cleger@rivosinc.com>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> ---
>  arch/riscv/include/asm/hwcap.h | 1 +
>  arch/riscv/kernel/cpufeature.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
> index 3b31efe2f716..34f86424d743 100644
> --- a/arch/riscv/include/asm/hwcap.h
> +++ b/arch/riscv/include/asm/hwcap.h
> @@ -85,6 +85,7 @@
>  #define RISCV_ISA_EXT_ZVFHMIN		70
>  #define RISCV_ISA_EXT_ZFA		71
>  #define RISCV_ISA_EXT_ZTSO		72
> +#define RISCV_ISA_EXT_ZACAS		73
>  
>  #define RISCV_ISA_EXT_MAX		128
>  #define RISCV_ISA_EXT_INVALID		U32_MAX
> diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
> index 3eb48a0eecb3..9a9d915b5bb2 100644
> --- a/arch/riscv/kernel/cpufeature.c
> +++ b/arch/riscv/kernel/cpufeature.c
> @@ -259,6 +259,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
>  	__RISCV_ISA_EXT_DATA(zihintntl, RISCV_ISA_EXT_ZIHINTNTL),
>  	__RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE),
>  	__RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM),
> +	__RISCV_ISA_EXT_DATA(zacas, RISCV_ISA_EXT_ZACAS),
>  	__RISCV_ISA_EXT_DATA(zfa, RISCV_ISA_EXT_ZFA),
>  	__RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH),
>  	__RISCV_ISA_EXT_DATA(zfhmin, RISCV_ISA_EXT_ZFHMIN),
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso
  2023-12-20 15:57 ` [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso Clément Léger
@ 2024-01-10 11:32   ` Conor Dooley
  0 siblings, 0 replies; 10+ messages in thread
From: Conor Dooley @ 2024-01-10 11:32 UTC (permalink / raw)
  To: Clément Léger
  Cc: linux-doc, linux-riscv, linux-kernel, devicetree, Jonathan Corbet,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Rob Herring,
	Krzysztof Kozlowski, Robbin Ehn, Gianluca Guida

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

On Wed, Dec 20, 2023 at 04:57:17PM +0100, Clément Léger wrote:
> Add support to parse the Ztso string in the riscv,isa string. The
> bindings already supports it but not the ISA parsing code.
> 
> Signed-off-by: Clément Léger <cleger@rivosinc.com>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> ---
>  arch/riscv/include/asm/hwcap.h | 1 +
>  arch/riscv/kernel/cpufeature.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
> index 2438d4685da6..3b31efe2f716 100644
> --- a/arch/riscv/include/asm/hwcap.h
> +++ b/arch/riscv/include/asm/hwcap.h
> @@ -84,6 +84,7 @@
>  #define RISCV_ISA_EXT_ZVFH		69
>  #define RISCV_ISA_EXT_ZVFHMIN		70
>  #define RISCV_ISA_EXT_ZFA		71
> +#define RISCV_ISA_EXT_ZTSO		72
>  
>  #define RISCV_ISA_EXT_MAX		128
>  #define RISCV_ISA_EXT_INVALID		U32_MAX
> diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
> index dc0ab3e97cd2..3eb48a0eecb3 100644
> --- a/arch/riscv/kernel/cpufeature.c
> +++ b/arch/riscv/kernel/cpufeature.c
> @@ -279,6 +279,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
>  	__RISCV_ISA_EXT_DATA(zkt, RISCV_ISA_EXT_ZKT),
>  	__RISCV_ISA_EXT_DATA(zksed, RISCV_ISA_EXT_ZKSED),
>  	__RISCV_ISA_EXT_DATA(zksh, RISCV_ISA_EXT_ZKSH),
> +	__RISCV_ISA_EXT_DATA(ztso, RISCV_ISA_EXT_ZTSO),
>  	__RISCV_ISA_EXT_SUPERSET(zvbb, RISCV_ISA_EXT_ZVBB, riscv_zvbb_exts),
>  	__RISCV_ISA_EXT_DATA(zvbc, RISCV_ISA_EXT_ZVBC),
>  	__RISCV_ISA_EXT_DATA(zvfh, RISCV_ISA_EXT_ZVFH),
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support
  2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
                   ` (5 preceding siblings ...)
  2023-12-20 15:57 ` [PATCH v2 6/6] riscv: hwprobe: export Zicond extension Clément Léger
@ 2024-01-11 14:50 ` patchwork-bot+linux-riscv
  6 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-01-11 14:50 UTC (permalink / raw)
  To: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2VyIDxjbGVnZXJAcml2b3NpbmMuY29tPg==?=
  Cc: linux-riscv, linux-doc, linux-kernel, devicetree, corbet,
	paul.walmsley, palmer, aou, conor, robh+dt,
	krzysztof.kozlowski+dt, rehn, gianluca

Hello:

This series was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Wed, 20 Dec 2023 16:57:16 +0100 you wrote:
> This series add support for a few more extensions that are present in
> the RVA22U64/RVA23U64 (either mandatory or optional) and that are useful
> for userspace:
> - Zicond
> - Zacas
> - Ztso
> 
> [...]

Here is the summary with links:
  - [v2,1/6] riscv: add ISA extension parsing for Ztso
    https://git.kernel.org/riscv/c/1ec9f381e848
  - [v2,2/6] riscv: hwprobe: export Ztso ISA extension
    https://git.kernel.org/riscv/c/5b4d64a819c0
  - [v2,3/6] dt-bindings: riscv: add Zacas ISA extension description
    https://git.kernel.org/riscv/c/cd7be4d02f41
  - [v2,4/6] riscv: add ISA extension parsing for Zacas
    https://git.kernel.org/riscv/c/188a2122c827
  - [v2,5/6] riscv: hwprobe: export Zacas ISA extension
    https://git.kernel.org/riscv/c/154a37061229
  - [v2,6/6] riscv: hwprobe: export Zicond extension
    https://git.kernel.org/riscv/c/3359866b40a9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-11 14:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-20 15:57 [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support Clément Léger
2023-12-20 15:57 ` [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso Clément Léger
2024-01-10 11:32   ` Conor Dooley
2023-12-20 15:57 ` [PATCH v2 2/6] riscv: hwprobe: export Ztso ISA extension Clément Léger
2023-12-20 15:57 ` [PATCH v2 3/6] dt-bindings: riscv: add Zacas ISA extension description Clément Léger
2023-12-20 15:57 ` [PATCH v2 4/6] riscv: add ISA extension parsing for Zacas Clément Léger
2024-01-10 11:31   ` Conor Dooley
2023-12-20 15:57 ` [PATCH v2 5/6] riscv: hwprobe: export Zacas ISA extension Clément Léger
2023-12-20 15:57 ` [PATCH v2 6/6] riscv: hwprobe: export Zicond extension Clément Léger
2024-01-11 14:50 ` [PATCH v2 0/6] riscv: hwprobe: add Zicond, Zacas and Ztso support patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).