diff mbox series

ACPI: APEI: EINJ: Add CXL error types

Message ID 20230314004611.48583-1-tony.luck@intel.com
State Accepted
Commit fe6603cafabbe9c0213cfaaca24bcbb3cc6e2a51
Headers show
Series ACPI: APEI: EINJ: Add CXL error types | expand

Commit Message

Tony Luck March 14, 2023, 12:46 a.m. UTC
ACPI 6.5 added six new error types for CXL. See chapter 18
table 18.30.

Add strings for the new types so that Linux will list them in the
/sys/kernel/debug/apei/einj/available_error_types file.

It seems no other changes are needed. Linux already accepts
the CXL codes (on a BIOS that advertises them).

Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 drivers/acpi/apei/einj.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Davidlohr Bueso March 16, 2023, 7:54 p.m. UTC | #1
On Mon, 13 Mar 2023, Tony Luck wrote:

>ACPI 6.5 added six new error types for CXL. See chapter 18
>table 18.30.
>
>Add strings for the new types so that Linux will list them in the
>/sys/kernel/debug/apei/einj/available_error_types file.
>
>It seems no other changes are needed. Linux already accepts
>the CXL codes (on a BIOS that advertises them).
>
>Signed-off-by: Tony Luck <tony.luck@intel.com>

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>

>---
> drivers/acpi/apei/einj.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
>index b4373e575660..39bee5a067cc 100644
>--- a/drivers/acpi/apei/einj.c
>+++ b/drivers/acpi/apei/einj.c
>@@ -584,6 +584,12 @@ static const char * const einj_error_type_string[] = {
>	"0x00000200\tPlatform Correctable\n",
>	"0x00000400\tPlatform Uncorrectable non-fatal\n",
>	"0x00000800\tPlatform Uncorrectable fatal\n",
>+	"0x00001000\tCXL.cache Protocol Correctable\n",
>+	"0x00002000\tCXL.cache Protocol Uncorrectable non-fatal\n",
>+	"0x00004000\tCXL.cache Protocol Uncorrectable fatal\n",
>+	"0x00008000\tCXL.mem Protocol Correctable\n",
>+	"0x00010000\tCXL.mem Protocol Uncorrectable non-fatal\n",
>+	"0x00020000\tCXL.mem Protocol Uncorrectable fatal\n",
> };
>
> static int available_error_type_show(struct seq_file *m, void *v)
>--
>2.39.2
>
Dave Jiang March 16, 2023, 8:26 p.m. UTC | #2
On 3/13/23 5:46 PM, Tony Luck wrote:
> ACPI 6.5 added six new error types for CXL. See chapter 18
> table 18.30.
> 
> Add strings for the new types so that Linux will list them in the
> /sys/kernel/debug/apei/einj/available_error_types file.
> 
> It seems no other changes are needed. Linux already accepts
> the CXL codes (on a BIOS that advertises them).
> 
> Signed-off-by: Tony Luck <tony.luck@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   drivers/acpi/apei/einj.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
> index b4373e575660..39bee5a067cc 100644
> --- a/drivers/acpi/apei/einj.c
> +++ b/drivers/acpi/apei/einj.c
> @@ -584,6 +584,12 @@ static const char * const einj_error_type_string[] = {
>   	"0x00000200\tPlatform Correctable\n",
>   	"0x00000400\tPlatform Uncorrectable non-fatal\n",
>   	"0x00000800\tPlatform Uncorrectable fatal\n",
> +	"0x00001000\tCXL.cache Protocol Correctable\n",
> +	"0x00002000\tCXL.cache Protocol Uncorrectable non-fatal\n",
> +	"0x00004000\tCXL.cache Protocol Uncorrectable fatal\n",
> +	"0x00008000\tCXL.mem Protocol Correctable\n",
> +	"0x00010000\tCXL.mem Protocol Uncorrectable non-fatal\n",
> +	"0x00020000\tCXL.mem Protocol Uncorrectable fatal\n",
>   };
>   
>   static int available_error_type_show(struct seq_file *m, void *v)
Rafael J. Wysocki March 20, 2023, 5:34 p.m. UTC | #3
On Tue, Mar 14, 2023 at 1:47 AM Tony Luck <tony.luck@intel.com> wrote:
>
> ACPI 6.5 added six new error types for CXL. See chapter 18
> table 18.30.
>
> Add strings for the new types so that Linux will list them in the
> /sys/kernel/debug/apei/einj/available_error_types file.
>
> It seems no other changes are needed. Linux already accepts
> the CXL codes (on a BIOS that advertises them).
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
>  drivers/acpi/apei/einj.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
> index b4373e575660..39bee5a067cc 100644
> --- a/drivers/acpi/apei/einj.c
> +++ b/drivers/acpi/apei/einj.c
> @@ -584,6 +584,12 @@ static const char * const einj_error_type_string[] = {
>         "0x00000200\tPlatform Correctable\n",
>         "0x00000400\tPlatform Uncorrectable non-fatal\n",
>         "0x00000800\tPlatform Uncorrectable fatal\n",
> +       "0x00001000\tCXL.cache Protocol Correctable\n",
> +       "0x00002000\tCXL.cache Protocol Uncorrectable non-fatal\n",
> +       "0x00004000\tCXL.cache Protocol Uncorrectable fatal\n",
> +       "0x00008000\tCXL.mem Protocol Correctable\n",
> +       "0x00010000\tCXL.mem Protocol Uncorrectable non-fatal\n",
> +       "0x00020000\tCXL.mem Protocol Uncorrectable fatal\n",
>  };
>
>  static int available_error_type_show(struct seq_file *m, void *v)
> --

Applied as 6.4 material, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index b4373e575660..39bee5a067cc 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -584,6 +584,12 @@  static const char * const einj_error_type_string[] = {
 	"0x00000200\tPlatform Correctable\n",
 	"0x00000400\tPlatform Uncorrectable non-fatal\n",
 	"0x00000800\tPlatform Uncorrectable fatal\n",
+	"0x00001000\tCXL.cache Protocol Correctable\n",
+	"0x00002000\tCXL.cache Protocol Uncorrectable non-fatal\n",
+	"0x00004000\tCXL.cache Protocol Uncorrectable fatal\n",
+	"0x00008000\tCXL.mem Protocol Correctable\n",
+	"0x00010000\tCXL.mem Protocol Uncorrectable non-fatal\n",
+	"0x00020000\tCXL.mem Protocol Uncorrectable fatal\n",
 };
 
 static int available_error_type_show(struct seq_file *m, void *v)