public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] riscv: cpufeature: Add Supm extension id and validation
@ 2026-01-16  2:10 Guodong Xu
  2026-01-16  2:10 ` [PATCH 1/3] dt-bindings: riscv: Add Supm extension description Guodong Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Guodong Xu @ 2026-01-16  2:10 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Samuel Holland,
	Heinrich Schuchardt, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Evan Green, Andrew Jones
  Cc: Paul Walmsley, Conor Dooley, devicetree, linux-riscv,
	linux-kernel, Guodong Xu

Supm as an extension indicates pointer-masking support for user mode
(U-mode). It relies on Ssnpm or Smnpm for the underlying hardware
implementation.

As a ratified feature, define a dedicated RISCV_ISA_EXT_ id for Supm.
However, since Supm is targeting U-mode, it should not be added into
devicetrees that describe hardware running privileged system softwares.

Supm is implied by Ssnpm (S-mode) or Smnpm (M-mode). Add parsing logic
and validation to ensure this dependency.

When CONFIG_RISCV_ISA_SUPM is disabled, Supm validation will fail
regardless of whether Ssnpm or Smnpm exist. This patchset doesn't change
this behavior.

Prior discussions about how Supm should be handled can be found in Links
[1] and [2].

Link: https://lore.kernel.org/lkml/20260101-legume-engraved-0fae8282cfbe@spud/#r [1]
Link: https://lore.kernel.org/all/4ebbe14b-2579-4ba6-808d-d50c24641d04@sifive.com/#r [2]

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
Guodong Xu (3):
      dt-bindings: riscv: Add Supm extension description
      riscv: cpufeature: Add ISA extension parsing for Supm
      riscv: cpufeature: Clarify ISA spec version for canonical order

 .../devicetree/bindings/riscv/extensions.yaml      | 17 ++++++++++
 arch/riscv/include/asm/hwcap.h                     |  3 +-
 arch/riscv/kernel/cpufeature.c                     | 38 ++++++++++++++++++++--
 3 files changed, 53 insertions(+), 5 deletions(-)
---
base-commit: ef41e6187f77b52e4b17ab9637be8f878e1f7a5b
change-id: 20260116-supm-ext-id-826e8da4c4b5

Best regards,
-- 
Guodong Xu <guodong@riscstar.com>


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

end of thread, other threads:[~2026-01-23 17:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16  2:10 [PATCH 0/3] riscv: cpufeature: Add Supm extension id and validation Guodong Xu
2026-01-16  2:10 ` [PATCH 1/3] dt-bindings: riscv: Add Supm extension description Guodong Xu
2026-01-22 18:52   ` Conor Dooley
2026-01-22 23:29     ` Guodong Xu
2026-01-23 17:24       ` Conor Dooley
2026-01-16  2:10 ` [PATCH 2/3] riscv: cpufeature: Add ISA extension parsing for Supm Guodong Xu
2026-01-22 18:53   ` Conor Dooley
2026-01-16  2:10 ` [PATCH 3/3] riscv: cpufeature: Clarify ISA spec version for canonical order Guodong Xu
2026-01-22 18:56   ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox