diff mbox series

[v6,2/2] schemas: memory: Add ECC properties

Message ID 20230907214012.74978-2-sjg@chromium.org
State New
Headers show
Series [v6,1/2] schemas: Add some common reserved-memory usages | expand

Commit Message

Simon Glass Sept. 7, 2023, 9:40 p.m. UTC
Some memories provide ECC detection and/or correction. For software which
wants to check memory, it is helpful to see which regions provide this
feature.

Add this as a property of the /memory nodes, since it presumably follows
the hardware-level memory system.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v6:
- Use a number of bits instead of a string property
- Fix inidcates typo

Changes in v5:
- Redo to make this property specific to ECC
- Provide properties both for detection and correction

Changes in v3:
- Add new patch to update the /memory nodes

 dtschema/schemas/memory.yaml | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Comments

Peter Robinson Sept. 8, 2023, 9:39 a.m. UTC | #1
On Thu, Sep 7, 2023 at 11:57 PM Simon Glass <sjg@chromium.org> wrote:
>
> Some memories provide ECC detection and/or correction. For software which
> wants to check memory, it is helpful to see which regions provide this
> feature.
>
> Add this as a property of the /memory nodes, since it presumably follows
> the hardware-level memory system.

Have these been accepted upstream? A grep of bindings in the upstream
kernel I don't see them.

> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v6:
> - Use a number of bits instead of a string property
> - Fix inidcates typo
>
> Changes in v5:
> - Redo to make this property specific to ECC
> - Provide properties both for detection and correction
>
> Changes in v3:
> - Add new patch to update the /memory nodes
>
>  dtschema/schemas/memory.yaml | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/dtschema/schemas/memory.yaml b/dtschema/schemas/memory.yaml
> index 1d74410..1a48b1c 100644
> --- a/dtschema/schemas/memory.yaml
> +++ b/dtschema/schemas/memory.yaml
> @@ -31,10 +31,21 @@ patternProperties:
>
>        numa-node-id:
>          $ref: types.yaml#/definitions/uint32
> -        description:
> +        description: |
>            For the purpose of identification, each NUMA node is associated with
>            a unique token known as a node id.
> -
> +      ecc-detection-bits:
> +        default: 0
> +        description: |
> +          If present, this indicates the number of bits of memory error which
> +          can be detected and reported by the Error-Correction Code (ECC) memory
> +          subsystem (typically 0, 1 or 2).
> +      ecc-correction-bits:
> +        default: 0
> +        description: |
> +          If present, this indicates the number of bits of memory error which
> +          can be corrected by the Error-Correction Code (ECC) memory subsystem
> +          (typically 0, 1 or 2).
>
>      required:
>        - device_type
> --
> 2.42.0.283.g2d96d420d3-goog
>
Rob Herring (Arm) Sept. 8, 2023, 11:45 a.m. UTC | #2
On Thu, Sep 7, 2023 at 4:40 PM Simon Glass <sjg@chromium.org> wrote:
>
> Some memories provide ECC detection and/or correction. For software which
> wants to check memory, it is helpful to see which regions provide this
> feature.
>
> Add this as a property of the /memory nodes, since it presumably follows
> the hardware-level memory system.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v6:
> - Use a number of bits instead of a string property
> - Fix inidcates typo
>
> Changes in v5:
> - Redo to make this property specific to ECC
> - Provide properties both for detection and correction
>
> Changes in v3:
> - Add new patch to update the /memory nodes
>
>  dtschema/schemas/memory.yaml | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/dtschema/schemas/memory.yaml b/dtschema/schemas/memory.yaml
> index 1d74410..1a48b1c 100644
> --- a/dtschema/schemas/memory.yaml
> +++ b/dtschema/schemas/memory.yaml
> @@ -31,10 +31,21 @@ patternProperties:
>
>        numa-node-id:
>          $ref: types.yaml#/definitions/uint32
> -        description:
> +        description: |

Why? '|' is not needed for any of these.

>            For the purpose of identification, each NUMA node is associated with
>            a unique token known as a node id.
> -

blank line between properties.

I can fix these up when applying.

> +      ecc-detection-bits:
> +        default: 0
> +        description: |
> +          If present, this indicates the number of bits of memory error which
> +          can be detected and reported by the Error-Correction Code (ECC) memory
> +          subsystem (typically 0, 1 or 2).
> +      ecc-correction-bits:
> +        default: 0
> +        description: |
> +          If present, this indicates the number of bits of memory error which
> +          can be corrected by the Error-Correction Code (ECC) memory subsystem
> +          (typically 0, 1 or 2).
>
>      required:
>        - device_type
> --
> 2.42.0.283.g2d96d420d3-goog
>
Simon Glass Sept. 9, 2023, 10:40 p.m. UTC | #3
Hi Rob,

On Fri, 8 Sept 2023 at 05:46, Rob Herring <robh@kernel.org> wrote:
>
> On Thu, Sep 7, 2023 at 4:40 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Some memories provide ECC detection and/or correction. For software which
> > wants to check memory, it is helpful to see which regions provide this
> > feature.
> >
> > Add this as a property of the /memory nodes, since it presumably follows
> > the hardware-level memory system.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > Changes in v6:
> > - Use a number of bits instead of a string property
> > - Fix inidcates typo
> >
> > Changes in v5:
> > - Redo to make this property specific to ECC
> > - Provide properties both for detection and correction
> >
> > Changes in v3:
> > - Add new patch to update the /memory nodes
> >
> >  dtschema/schemas/memory.yaml | 15 +++++++++++++--
> >  1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/dtschema/schemas/memory.yaml b/dtschema/schemas/memory.yaml
> > index 1d74410..1a48b1c 100644
> > --- a/dtschema/schemas/memory.yaml
> > +++ b/dtschema/schemas/memory.yaml
> > @@ -31,10 +31,21 @@ patternProperties:
> >
> >        numa-node-id:
> >          $ref: types.yaml#/definitions/uint32
> > -        description:
> > +        description: |
>
> Why? '|' is not needed for any of these.
>
> >            For the purpose of identification, each NUMA node is associated with
> >            a unique token known as a node id.
> > -
>
> blank line between properties.
>
> I can fix these up when applying.

OK thank you.

>
> > +      ecc-detection-bits:
> > +        default: 0
> > +        description: |
> > +          If present, this indicates the number of bits of memory error which
> > +          can be detected and reported by the Error-Correction Code (ECC) memory
> > +          subsystem (typically 0, 1 or 2).
> > +      ecc-correction-bits:
> > +        default: 0
> > +        description: |
> > +          If present, this indicates the number of bits of memory error which
> > +          can be corrected by the Error-Correction Code (ECC) memory subsystem
> > +          (typically 0, 1 or 2).
> >
> >      required:
> >        - device_type
> > --
> > 2.42.0.283.g2d96d420d3-goog
> >

Regards,
Simon
diff mbox series

Patch

diff --git a/dtschema/schemas/memory.yaml b/dtschema/schemas/memory.yaml
index 1d74410..1a48b1c 100644
--- a/dtschema/schemas/memory.yaml
+++ b/dtschema/schemas/memory.yaml
@@ -31,10 +31,21 @@  patternProperties:
 
       numa-node-id:
         $ref: types.yaml#/definitions/uint32
-        description:
+        description: |
           For the purpose of identification, each NUMA node is associated with
           a unique token known as a node id.
-
+      ecc-detection-bits:
+        default: 0
+        description: |
+          If present, this indicates the number of bits of memory error which
+          can be detected and reported by the Error-Correction Code (ECC) memory
+          subsystem (typically 0, 1 or 2).
+      ecc-correction-bits:
+        default: 0
+        description: |
+          If present, this indicates the number of bits of memory error which
+          can be corrected by the Error-Correction Code (ECC) memory subsystem
+          (typically 0, 1 or 2).
 
     required:
       - device_type