[PATCH v4 03/13] powerpc/rtas: Add function return status constants
Aneesh Kumar K.V (IBM)
aneesh.kumar at kernel.org
Mon Nov 20 19:08:21 AEDT 2023
Nathan Lynch via B4 Relay <devnull+nathanl.linux.ibm.com at kernel.org>
writes:
> From: Nathan Lynch <nathanl at linux.ibm.com>
>
> Not all of the generic RTAS function statuses specified in PAPR have
> symbolic constants and descriptions in rtas.h. Fix this, providing a
> little more background, slightly updating the existing wording, and
> improving the formatting.
>
Reviewed-by: Aneesh Kumar K.V (IBM) <aneesh.kumar at kernel.org>
> Signed-off-by: Nathan Lynch <nathanl at linux.ibm.com>
> ---
> arch/powerpc/include/asm/rtas.h | 25 +++++++++++++++++++------
> 1 file changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
> index c697c3c74694..b73010583a8d 100644
> --- a/arch/powerpc/include/asm/rtas.h
> +++ b/arch/powerpc/include/asm/rtas.h
> @@ -201,12 +201,25 @@ typedef struct {
> /* Memory set aside for sys_rtas to use with calls that need a work area. */
> #define RTAS_USER_REGION_SIZE (64 * 1024)
>
> -/* RTAS return status codes */
> -#define RTAS_HARDWARE_ERROR -1 /* Hardware Error */
> -#define RTAS_BUSY -2 /* RTAS Busy */
> -#define RTAS_INVALID_PARAMETER -3 /* Invalid indicator/domain/sensor etc. */
> -#define RTAS_EXTENDED_DELAY_MIN 9900
> -#define RTAS_EXTENDED_DELAY_MAX 9905
> +/*
> + * Common RTAS function return values, derived from the table "RTAS
> + * Status Word Values" in PAPR+ 7.2.8: "Return Codes". If a function
> + * can return a value in this table then generally it has the meaning
> + * listed here. More extended commentary in the documentation for
> + * rtas_call().
> + *
> + * RTAS functions may use negative and positive numbers not in this
> + * set for function-specific error and success conditions,
> + * respectively.
> + */
> +#define RTAS_SUCCESS 0 /* Success. */
> +#define RTAS_HARDWARE_ERROR -1 /* Hardware or other unspecified error. */
> +#define RTAS_BUSY -2 /* Retry immediately. */
> +#define RTAS_INVALID_PARAMETER -3 /* Invalid indicator/domain/sensor etc. */
> +#define RTAS_UNEXPECTED_STATE_CHANGE -7 /* Seems limited to EEH and slot reset. */
> +#define RTAS_EXTENDED_DELAY_MIN 9900 /* Retry after delaying for ~1ms. */
> +#define RTAS_EXTENDED_DELAY_MAX 9905 /* Retry after delaying for ~100s. */
> +#define RTAS_ML_ISOLATION_ERROR -9000 /* Multi-level isolation error. */
>
> /* statuses specific to ibm,suspend-me */
> #define RTAS_SUSPEND_ABORTED 9000 /* Suspension aborted */
>
> --
> 2.41.0
More information about the Linuxppc-dev
mailing list