Lines Matching +full:used +full:- +full:by +full:- +full:rtas

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
8 #include <asm/rtas-types.h>
13 * Definitions for talking to the RTAS on CHRP machines.
19 #define RTAS_UNKNOWN_SERVICE (-1)
20 #define RTAS_INSTANTIATE_MAX (1ULL<<30) /* Don't instantiate rtas at/above this value */
25 /* RTAS return status codes */
26 #define RTAS_BUSY -2 /* RTAS Busy */
30 /* statuses specific to ibm,suspend-me */
32 #define RTAS_NOT_SUSPENDABLE -9004 /* Partition not suspendable */
33 #define RTAS_THREADS_ACTIVE -9005 /* Multiple processor threads active */
34 #define RTAS_OUTSTANDING_COPROC -9006 /* Outstanding coprocessor operations */
37 * In general to call RTAS use rtas_token("string") to lookup
38 * an RTAS token for the given string (e.g. "event-scan").
47 * may be safely used for one-shot calls to RTAS.
51 /* RTAS event classes */
58 /* RTAS event severity */
66 /* RTAS event disposition */
71 /* RTAS event initiator */
79 /* RTAS event target */
87 /* RTAS event type */
127 /* RTAS check-exception vector offset */
132 return (elog->byte1 & 0xE0) >> 5; in rtas_error_severity()
137 return (elog->byte1 & 0x18) >> 3; in rtas_error_disposition()
143 elog->byte1 &= ~0x18; in rtas_set_disposition_recovered()
144 elog->byte1 |= (RTAS_DISP_FULLY_RECOVERED << 3); in rtas_set_disposition_recovered()
149 return (elog->byte1 & 0x04) >> 2; in rtas_error_extended()
154 return (elog->byte2 & 0xf0) >> 4; in rtas_error_initiator()
157 #define rtas_error_type(x) ((x)->byte3)
162 return be32_to_cpu(elog->extended_log_length); in rtas_error_extended_log_length()
172 return ext_log->byte2 & 0x0F; in rtas_ext_event_log_format()
178 return be32_to_cpu(ext_log->company_id); in rtas_ext_event_company_id()
206 return be16_to_cpu(sect->id); in pseries_errorlog_id()
212 return be16_to_cpu(sect->length); in pseries_errorlog_length()
233 * This can be set by the rtas_flash module so that it can get called
238 extern struct rtas_t rtas;
284 return -EINVAL; in rtas_syscall_dispatch_ibm_suspend_me()
297 #define ERR_TYPE_RTAS_LOG 0x2 /* from rtas event-scan */
305 #define RTAS_DEBUG KERN_DEBUG "RTAS: "
310 * Return the firmware-specified size of the error log buffer
311 * for all rtas calls that require an error buffer argument.
312 * This includes 'check-exception' and 'rtas-last-error'.
320 #define LOG_NUMBER_MASK (LOG_NUMBER-1)
322 /* Some RTAS ops require a data buffer and that buffer must be < 4G.
324 * (get the lock first), make the RTAS call. Copy the data instead
332 /* RMO buffer reserved for user-space RTAS use */
338 * rtas_config_addr - Format a busno, devfn and reg for RTAS.
340 * @devfn: The device and function number as encoded by PCI_DEVFN().
344 * required for RTAS calls that take a "config_addr" parameter.
345 * See PAPR requirement 7.3.4-1 for more info.
366 * move some of the rtas suspend-me stuff to pseries */