aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/rtas.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/rtas.h')
-rw-r--r--arch/powerpc/include/asm/rtas.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 2e23e92a4372..7a4ede16b283 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -4,6 +4,7 @@
4 4
5#include <linux/spinlock.h> 5#include <linux/spinlock.h>
6#include <asm/page.h> 6#include <asm/page.h>
7#include <linux/time.h>
7 8
8/* 9/*
9 * Definitions for talking to the RTAS on CHRP machines. 10 * Definitions for talking to the RTAS on CHRP machines.
@@ -273,6 +274,7 @@ inline uint32_t rtas_ext_event_company_id(struct rtas_ext_event_log_v6 *ext_log)
273#define PSERIES_ELOG_SECT_ID_MANUFACT_INFO (('M' << 8) | 'I') 274#define PSERIES_ELOG_SECT_ID_MANUFACT_INFO (('M' << 8) | 'I')
274#define PSERIES_ELOG_SECT_ID_CALL_HOME (('C' << 8) | 'H') 275#define PSERIES_ELOG_SECT_ID_CALL_HOME (('C' << 8) | 'H')
275#define PSERIES_ELOG_SECT_ID_USER_DEF (('U' << 8) | 'D') 276#define PSERIES_ELOG_SECT_ID_USER_DEF (('U' << 8) | 'D')
277#define PSERIES_ELOG_SECT_ID_HOTPLUG (('H' << 8) | 'P')
276 278
277/* Vendor specific Platform Event Log Format, Version 6, section header */ 279/* Vendor specific Platform Event Log Format, Version 6, section header */
278struct pseries_errorlog { 280struct pseries_errorlog {
@@ -296,6 +298,31 @@ inline uint16_t pseries_errorlog_length(struct pseries_errorlog *sect)
296 return be16_to_cpu(sect->length); 298 return be16_to_cpu(sect->length);
297} 299}
298 300
301/* RTAS pseries hotplug errorlog section */
302struct pseries_hp_errorlog {
303 u8 resource;
304 u8 action;
305 u8 id_type;
306 u8 reserved;
307 union {
308 __be32 drc_index;
309 __be32 drc_count;
310 char drc_name[1];
311 } _drc_u;
312};
313
314#define PSERIES_HP_ELOG_RESOURCE_CPU 1
315#define PSERIES_HP_ELOG_RESOURCE_MEM 2
316#define PSERIES_HP_ELOG_RESOURCE_SLOT 3
317#define PSERIES_HP_ELOG_RESOURCE_PHB 4
318
319#define PSERIES_HP_ELOG_ACTION_ADD 1
320#define PSERIES_HP_ELOG_ACTION_REMOVE 2
321
322#define PSERIES_HP_ELOG_ID_DRC_NAME 1
323#define PSERIES_HP_ELOG_ID_DRC_INDEX 2
324#define PSERIES_HP_ELOG_ID_DRC_COUNT 3
325
299struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log, 326struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
300 uint16_t section_id); 327 uint16_t section_id);
301 328
@@ -327,7 +354,7 @@ extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data);
327extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data); 354extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data);
328extern int rtas_online_cpus_mask(cpumask_var_t cpus); 355extern int rtas_online_cpus_mask(cpumask_var_t cpus);
329extern int rtas_offline_cpus_mask(cpumask_var_t cpus); 356extern int rtas_offline_cpus_mask(cpumask_var_t cpus);
330extern int rtas_ibm_suspend_me(u64 handle, int *vasi_return); 357extern int rtas_ibm_suspend_me(u64 handle);
331 358
332struct rtc_time; 359struct rtc_time;
333extern unsigned long rtas_get_boot_time(void); 360extern unsigned long rtas_get_boot_time(void);
@@ -343,8 +370,12 @@ extern int early_init_dt_scan_rtas(unsigned long node,
343extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal); 370extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal);
344 371
345#ifdef CONFIG_PPC_PSERIES 372#ifdef CONFIG_PPC_PSERIES
373extern time64_t last_rtas_event;
374extern int clobbering_unread_rtas_event(void);
346extern int pseries_devicetree_update(s32 scope); 375extern int pseries_devicetree_update(s32 scope);
347extern void post_mobility_fixup(void); 376extern void post_mobility_fixup(void);
377#else
378static inline int clobbering_unread_rtas_event(void) { return 0; }
348#endif 379#endif
349 380
350#ifdef CONFIG_PPC_RTAS_DAEMON 381#ifdef CONFIG_PPC_RTAS_DAEMON