[RFC PATCH v2 1/8] ACPICA: Update values to hex to follow ACPI specs

Zaid Alali posted 8 patches 6 months, 1 week ago
[RFC PATCH v2 1/8] ACPICA: Update values to hex to follow ACPI specs
Posted by Zaid Alali 6 months, 1 week ago
ACPI specs(1) define Error Injection Actions in hex values.
This commit intends to update values from decimal to hex to be
consistent with ACPI specs. This commit and the following one are
not to be merged and will come form ACPICA project(2).

(1) https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html
(2) https://lore.kernel.org/acpica-devel/20240514184150.6285-1-zaidal@os.amperecomputing.com/

Signed-off-by: Zaid Alali <zaidal@os.amperecomputing.com>
---
 include/acpi/actbl1.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 841ef9f22795..b321d481b09a 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1017,18 +1017,18 @@ struct acpi_einj_entry {
 /* Values for Action field above */
 
 enum acpi_einj_actions {
-	ACPI_EINJ_BEGIN_OPERATION = 0,
-	ACPI_EINJ_GET_TRIGGER_TABLE = 1,
-	ACPI_EINJ_SET_ERROR_TYPE = 2,
-	ACPI_EINJ_GET_ERROR_TYPE = 3,
-	ACPI_EINJ_END_OPERATION = 4,
-	ACPI_EINJ_EXECUTE_OPERATION = 5,
-	ACPI_EINJ_CHECK_BUSY_STATUS = 6,
-	ACPI_EINJ_GET_COMMAND_STATUS = 7,
-	ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
-	ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
-	ACPI_EINJ_ACTION_RESERVED = 10,	/* 10 and greater are reserved */
-	ACPI_EINJ_TRIGGER_ERROR = 0xFF	/* Except for this value */
+	ACPI_EINJ_BEGIN_OPERATION =		0x0,
+	ACPI_EINJ_GET_TRIGGER_TABLE =		0x1,
+	ACPI_EINJ_SET_ERROR_TYPE =		0x2,
+	ACPI_EINJ_GET_ERROR_TYPE =		0x3,
+	ACPI_EINJ_END_OPERATION =		0x4,
+	ACPI_EINJ_EXECUTE_OPERATION =		0x5,
+	ACPI_EINJ_CHECK_BUSY_STATUS =		0x6,
+	ACPI_EINJ_GET_COMMAND_STATUS =		0x7,
+	ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS =	0x8,
+	ACPI_EINJ_GET_EXECUTE_TIMINGS =		0x9,
+	ACPI_EINJ_ACTION_RESERVED =		0xA,	/* 0xA and greater are reserved */
+	ACPI_EINJ_TRIGGER_ERROR =		0xFF	/* Except for this value */
 };
 
 /* Values for Instruction field above */
-- 
2.34.1
Re: [RFC PATCH v2 1/8] ACPICA: Update values to hex to follow ACPI specs
Posted by Rafael J. Wysocki 6 months, 1 week ago
On Tue, May 21, 2024 at 11:11 PM Zaid Alali
<zaidal@os.amperecomputing.com> wrote:
>
> ACPI specs(1) define Error Injection Actions in hex values.
> This commit intends to update values from decimal to hex to be
> consistent with ACPI specs. This commit and the following one are
> not to be merged and will come form ACPICA project(2).
>
> (1) https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html
> (2) https://lore.kernel.org/acpica-devel/20240514184150.6285-1-zaidal@os.amperecomputing.com/
>
> Signed-off-by: Zaid Alali <zaidal@os.amperecomputing.com>

In order to modify the ACPICA code in the Linux kernel, you need to
submit a corresponding pull request to the upstream ACPICA project on
GitHub.  Once that pull request has been merged, please send the Linux
patch with a Link: tag pointing to the upstream ACPICA pull request
corresponding to it.

Thanks!

> ---
>  include/acpi/actbl1.h | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index 841ef9f22795..b321d481b09a 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h
> @@ -1017,18 +1017,18 @@ struct acpi_einj_entry {
>  /* Values for Action field above */
>
>  enum acpi_einj_actions {
> -       ACPI_EINJ_BEGIN_OPERATION = 0,
> -       ACPI_EINJ_GET_TRIGGER_TABLE = 1,
> -       ACPI_EINJ_SET_ERROR_TYPE = 2,
> -       ACPI_EINJ_GET_ERROR_TYPE = 3,
> -       ACPI_EINJ_END_OPERATION = 4,
> -       ACPI_EINJ_EXECUTE_OPERATION = 5,
> -       ACPI_EINJ_CHECK_BUSY_STATUS = 6,
> -       ACPI_EINJ_GET_COMMAND_STATUS = 7,
> -       ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
> -       ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
> -       ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
> -       ACPI_EINJ_TRIGGER_ERROR = 0xFF  /* Except for this value */
> +       ACPI_EINJ_BEGIN_OPERATION =             0x0,
> +       ACPI_EINJ_GET_TRIGGER_TABLE =           0x1,
> +       ACPI_EINJ_SET_ERROR_TYPE =              0x2,
> +       ACPI_EINJ_GET_ERROR_TYPE =              0x3,
> +       ACPI_EINJ_END_OPERATION =               0x4,
> +       ACPI_EINJ_EXECUTE_OPERATION =           0x5,
> +       ACPI_EINJ_CHECK_BUSY_STATUS =           0x6,
> +       ACPI_EINJ_GET_COMMAND_STATUS =          0x7,
> +       ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 0x8,
> +       ACPI_EINJ_GET_EXECUTE_TIMINGS =         0x9,
> +       ACPI_EINJ_ACTION_RESERVED =             0xA,    /* 0xA and greater are reserved */
> +       ACPI_EINJ_TRIGGER_ERROR =               0xFF    /* Except for this value */
>  };
>
>  /* Values for Instruction field above */
> --
> 2.34.1
>