diff mbox series

[v10,2/5] ACPI: Add CXL protocol error defines

Message ID 20240117194501.298233-3-Benjamin.Cheatham@amd.com
State Superseded
Headers show
Series CXL, ACPI, APEI, EINJ: Update EINJ for CXL error types | expand

Commit Message

Ben Cheatham Jan. 17, 2024, 7:44 p.m. UTC
Add CXL protocol error defines to include/actbl1.h.

Signed-off-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
---

I made a pull request for this support in the ACPICA project which has
been accepted (link below), so this patch is temporary and I expect it
to be dropped once the kernel updates from ACPICA.

[1]:
Link: https://github.com/acpica/acpica/pull/884

Signed-off-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
---
 include/acpi/actbl1.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Dan Williams Feb. 3, 2024, 3:58 a.m. UTC | #1
Ben Cheatham wrote:
> Add CXL protocol error defines to include/actbl1.h.
> 
> Signed-off-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
> ---
> 
> I made a pull request for this support in the ACPICA project which has

Hmm, it has been a few months with no movement and nothing in v6.8.

> been accepted (link below), so this patch is temporary and I expect it
> to be dropped once the kernel updates from ACPICA.

Ben, not sure what is happening with the ACPICA process right now, but
since the ACPI_EINJ driver is the only consumer of these defines I would
say that in the spirit of the policy in "include/linux/pci_ids.h":

"Do not add new entries to this file unless the definitions
 are shared between multiple drivers."

...go ahead and defines these locally in einj.c.

#ifndef ACPI_EINJ_CXL_CACHE_CORRECTABLE
#define ACPI_EINJ_CXL_CACHE_CORRECTABLE     (1<<12)
#define ACPI_EINJ_CXL_CACHE_UNCORRECTABLE   (1<<13)
#define ACPI_EINJ_CXL_CACHE_FATAL           (1<<14)
#define ACPI_EINJ_CXL_MEM_CORRECTABLE       (1<<15)
#define ACPI_EINJ_CXL_MEM_UNCORRECTABLE     (1<<16)
#define ACPI_EINJ_CXL_MEM_FATAL             (1<<17)
#endif

Then you can delete them later if they ever get duplicated in actbl1.h.
Ben Cheatham Feb. 8, 2024, 5:43 p.m. UTC | #2
On 2/2/24 9:58 PM, Dan Williams wrote:
> Ben Cheatham wrote:
>> Add CXL protocol error defines to include/actbl1.h.
>>
>> Signed-off-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
>> ---
>>
>> I made a pull request for this support in the ACPICA project which has
> 
> Hmm, it has been a few months with no movement and nothing in v6.8.
> 
>> been accepted (link below), so this patch is temporary and I expect it
>> to be dropped once the kernel updates from ACPICA.
> 
> Ben, not sure what is happening with the ACPICA process right now, but
> since the ACPI_EINJ driver is the only consumer of these defines I would
> say that in the spirit of the policy in "include/linux/pci_ids.h":
> 
> "Do not add new entries to this file unless the definitions
>  are shared between multiple drivers."
> 
> ...go ahead and defines these locally in einj.c.
> 
> #ifndef ACPI_EINJ_CXL_CACHE_CORRECTABLE
> #define ACPI_EINJ_CXL_CACHE_CORRECTABLE     (1<<12)
> #define ACPI_EINJ_CXL_CACHE_UNCORRECTABLE   (1<<13)
> #define ACPI_EINJ_CXL_CACHE_FATAL           (1<<14)
> #define ACPI_EINJ_CXL_MEM_CORRECTABLE       (1<<15)
> #define ACPI_EINJ_CXL_MEM_UNCORRECTABLE     (1<<16)
> #define ACPI_EINJ_CXL_MEM_FATAL             (1<<17)
> #endif
> 
> Then you can delete them later if they ever get duplicated in actbl1.h.

Sorry for the late response, but will do! I should be able to send a v11 this afternoon
with this change.

Thanks,
Ben
diff mbox series

Patch

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index a33375e055ad..1f58c5d86869 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1096,6 +1096,12 @@  enum acpi_einj_command_status {
 #define ACPI_EINJ_PLATFORM_CORRECTABLE      (1<<9)
 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE    (1<<10)
 #define ACPI_EINJ_PLATFORM_FATAL            (1<<11)
+#define ACPI_EINJ_CXL_CACHE_CORRECTABLE     (1<<12)
+#define ACPI_EINJ_CXL_CACHE_UNCORRECTABLE   (1<<13)
+#define ACPI_EINJ_CXL_CACHE_FATAL           (1<<14)
+#define ACPI_EINJ_CXL_MEM_CORRECTABLE       (1<<15)
+#define ACPI_EINJ_CXL_MEM_UNCORRECTABLE     (1<<16)
+#define ACPI_EINJ_CXL_MEM_FATAL             (1<<17)
 #define ACPI_EINJ_VENDOR_DEFINED            (1<<31)
 
 /*******************************************************************************