diff mbox series

dt-bindings: RISC-V: Re-word the I extension binding

Message ID 20230711225212.11542-1-palmer@rivosinc.com (mailing list archive)
State Rejected, archived
Headers show
Series dt-bindings: RISC-V: Re-word the I extension binding | expand

Checks

Context Check Description
conchuod/cover_letter success Single patches do not need cover letters
conchuod/tree_selection success Guessed tree name to be fixes at HEAD 06c2afb862f9
conchuod/fixes_present success Fixes tag present in non-next series
conchuod/maintainers_pattern success MAINTAINERS pattern errors before the patch: 4 and now 4
conchuod/verify_signedoff success Signed-off-by tag matches author and committer
conchuod/kdoc success Errors and warnings before: 0 this patch: 0
conchuod/build_rv64_clang_allmodconfig success Errors and warnings before: 11 this patch: 11
conchuod/module_param success Was 0 now: 0
conchuod/build_rv64_gcc_allmodconfig success Errors and warnings before: 23 this patch: 23
conchuod/build_rv32_defconfig success Build OK
conchuod/dtb_warn_rv64 success Errors and warnings before: 3 this patch: 3
conchuod/header_inline success No static functions without inline keyword in header files
conchuod/checkpatch success total: 0 errors, 0 warnings, 0 checks, 18 lines checked
conchuod/build_rv64_nommu_k210_defconfig success Build OK
conchuod/verify_fixes success Fixes tag looks correct
conchuod/build_rv64_nommu_virt_defconfig success Build OK

Commit Message

Palmer Dabbelt July 11, 2023, 10:52 p.m. UTC
I'd argue this changes the definition of the I binding, as there was
more than just the counters that got split out (CSRs and fence.i at
least).  We haven't released these bindings yet, so IIUC it's OK to
change the definition still.

I think this matches the original intent, or at least what the
implementation does.

Fixes: aeb71e42caae ("dt-bindings: riscv: deprecate riscv,isa")
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
 .../devicetree/bindings/riscv/extensions.yaml        | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comments

Stefan O'Rear July 11, 2023, 11:28 p.m. UTC | #1
On Tue, Jul 11, 2023, at 6:52 PM, Palmer Dabbelt wrote:
> I'd argue this changes the definition of the I binding, as there was
> more than just the counters that got split out (CSRs and fence.i at
> least).  We haven't released these bindings yet, so IIUC it's OK to
> change the definition still.
>
> I think this matches the original intent, or at least what the
> implementation does.
>
> Fixes: aeb71e42caae ("dt-bindings: riscv: deprecate riscv,isa")
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> ---
>  .../devicetree/bindings/riscv/extensions.yaml        | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml 
> b/Documentation/devicetree/bindings/riscv/extensions.yaml
> index cc1f546fdbdc..31ec244bd32f 100644
> --- a/Documentation/devicetree/bindings/riscv/extensions.yaml
> +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
> @@ -67,13 +67,11 @@ properties:
>        anyOf:
>          # single letter extensions, in canonical order
>          - const: i
> -          description: |
> -            The base integer instruction set, as ratified in the 
> 20191213
> -            version of the unprivileged ISA specification.
> -
> -            This does not include Chapter 10, "Counters", which was 
> moved into
> -            the Zicntr and Zihpm extensions after the ratification of 
> the
> -            20191213 version of the unprivileged specification.
> +          description:
> +            The base integer instruction set, as specified by the 2.2
> +            version of the unprivileged ISA specification, formally 
> known as
> +            the user-level ISA.  This definition of I includes various
> +            extensions that were later split out.

Nitpick: the 2.2 unprivileged ISA uses the pre-ratification memory model
(essentially Alpha), which is much weaker than the memory model in 20191213.

-s

> 
>          - const: m
>            description:
> -- 
> 2.40.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
Conor Dooley July 12, 2023, 3:04 p.m. UTC | #2
On Tue, Jul 11, 2023 at 03:52:12PM -0700, Palmer Dabbelt wrote:
> I'd argue this changes the definition of the I binding, as there was
> more than just the counters that got split out (CSRs and fence.i at
> least).  We haven't released these bindings yet, so IIUC it's OK to
> change the definition still.
> 
> I think this matches the original intent, or at least what the
> implementation does.

Depends on what you consider "original". My intent with these new
bindings was to deliberately exclude from `i` things that are already in
extensions at the time of writing, so that when an platform shows up
that decided not to implement them, it does not need a special case
added.
I'm fine with doing it this way though, if that is what you want, but
what do you mean by "the implementation does"? To align the
implementation with the meaning in the current binding, would we need
to refuse harts in riscv_early_of_processor_hartid() in Linux?

> 
> Fixes: aeb71e42caae ("dt-bindings: riscv: deprecate riscv,isa")
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> ---
>  .../devicetree/bindings/riscv/extensions.yaml        | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
> index cc1f546fdbdc..31ec244bd32f 100644
> --- a/Documentation/devicetree/bindings/riscv/extensions.yaml
> +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
> @@ -67,13 +67,11 @@ properties:
>        anyOf:
>          # single letter extensions, in canonical order
>          - const: i
> -          description: |
> -            The base integer instruction set, as ratified in the 20191213
> -            version of the unprivileged ISA specification.
> -
> -            This does not include Chapter 10, "Counters", which was moved into
> -            the Zicntr and Zihpm extensions after the ratification of the
> -            20191213 version of the unprivileged specification.
> +          description:
> +            The base integer instruction set, as specified by the 2.2
> +            version of the unprivileged ISA specification, formally known as
> +            the user-level ISA.  This definition of I includes various
> +            extensions that were later split out.
>  
>          - const: m
>            description:
> -- 
> 2.40.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index cc1f546fdbdc..31ec244bd32f 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -67,13 +67,11 @@  properties:
       anyOf:
         # single letter extensions, in canonical order
         - const: i
-          description: |
-            The base integer instruction set, as ratified in the 20191213
-            version of the unprivileged ISA specification.
-
-            This does not include Chapter 10, "Counters", which was moved into
-            the Zicntr and Zihpm extensions after the ratification of the
-            20191213 version of the unprivileged specification.
+          description:
+            The base integer instruction set, as specified by the 2.2
+            version of the unprivileged ISA specification, formally known as
+            the user-level ISA.  This definition of I includes various
+            extensions that were later split out.
 
         - const: m
           description: