Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/rtas: Add function return status constants

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@kernel.org>
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-4-e9eafd0c8c6c@linux.ibm.com

authored by

Nathan Lynch and committed by
Michael Ellerman
9592aa5a 669acc7e

+19 -6
+19 -6
arch/powerpc/include/asm/rtas.h
··· 201 201 /* Memory set aside for sys_rtas to use with calls that need a work area. */ 202 202 #define RTAS_USER_REGION_SIZE (64 * 1024) 203 203 204 - /* RTAS return status codes */ 205 - #define RTAS_HARDWARE_ERROR -1 /* Hardware Error */ 206 - #define RTAS_BUSY -2 /* RTAS Busy */ 207 - #define RTAS_INVALID_PARAMETER -3 /* Invalid indicator/domain/sensor etc. */ 208 - #define RTAS_EXTENDED_DELAY_MIN 9900 209 - #define RTAS_EXTENDED_DELAY_MAX 9905 204 + /* 205 + * Common RTAS function return values, derived from the table "RTAS 206 + * Status Word Values" in PAPR+ v2.13 7.2.8: "Return Codes". If a 207 + * function can return a value in this table then generally it has the 208 + * meaning listed here. More extended commentary in the documentation 209 + * for rtas_call(). 210 + * 211 + * RTAS functions may use negative and positive numbers not in this 212 + * set for function-specific error and success conditions, 213 + * respectively. 214 + */ 215 + #define RTAS_SUCCESS 0 /* Success. */ 216 + #define RTAS_HARDWARE_ERROR -1 /* Hardware or other unspecified error. */ 217 + #define RTAS_BUSY -2 /* Retry immediately. */ 218 + #define RTAS_INVALID_PARAMETER -3 /* Invalid indicator/domain/sensor etc. */ 219 + #define RTAS_UNEXPECTED_STATE_CHANGE -7 /* Seems limited to EEH and slot reset. */ 220 + #define RTAS_EXTENDED_DELAY_MIN 9900 /* Retry after delaying for ~1ms. */ 221 + #define RTAS_EXTENDED_DELAY_MAX 9905 /* Retry after delaying for ~100s. */ 222 + #define RTAS_ML_ISOLATION_ERROR -9000 /* Multi-level isolation error. */ 210 223 211 224 /* statuses specific to ibm,suspend-me */ 212 225 #define RTAS_SUSPEND_ABORTED 9000 /* Suspension aborted */