powerpc/pseries: Define rtas hotplug event sections
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Tue, 10 Feb 2015 19:43:24 +0000 (13:43 -0600)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 16 Mar 2015 23:57:44 +0000 (10:57 +1100)
In order to handle device hotplug in the kernel on pseries the hotplug
request will be communicated in the kernel in the form of a
rtas hotplug event. This patch adds the definition of rtas hotplug event
sections.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/rtas.h

index 2e23e92a43722fcb0d0e3097b65025631f78dd51..eddc8469543aea3844f63246622b4391e2ce24ff 100644 (file)
@@ -273,6 +273,7 @@ inline uint32_t rtas_ext_event_company_id(struct rtas_ext_event_log_v6 *ext_log)
 #define PSERIES_ELOG_SECT_ID_MANUFACT_INFO     (('M' << 8) | 'I')
 #define PSERIES_ELOG_SECT_ID_CALL_HOME         (('C' << 8) | 'H')
 #define PSERIES_ELOG_SECT_ID_USER_DEF          (('U' << 8) | 'D')
+#define PSERIES_ELOG_SECT_ID_HOTPLUG           (('H' << 8) | 'P')
 
 /* Vendor specific Platform Event Log Format, Version 6, section header */
 struct pseries_errorlog {
@@ -296,6 +297,31 @@ inline uint16_t pseries_errorlog_length(struct pseries_errorlog *sect)
        return be16_to_cpu(sect->length);
 }
 
+/* RTAS pseries hotplug errorlog section */
+struct pseries_hp_errorlog {
+       u8      resource;
+       u8      action;
+       u8      id_type;
+       u8      reserved;
+       union {
+               __be32  drc_index;
+               __be32  drc_count;
+               char    drc_name[1];
+       } _drc_u;
+};
+
+#define PSERIES_HP_ELOG_RESOURCE_CPU   1
+#define PSERIES_HP_ELOG_RESOURCE_MEM   2
+#define PSERIES_HP_ELOG_RESOURCE_SLOT  3
+#define PSERIES_HP_ELOG_RESOURCE_PHB   4
+
+#define PSERIES_HP_ELOG_ACTION_ADD     1
+#define PSERIES_HP_ELOG_ACTION_REMOVE  2
+
+#define PSERIES_HP_ELOG_ID_DRC_NAME    1
+#define PSERIES_HP_ELOG_ID_DRC_INDEX   2
+#define PSERIES_HP_ELOG_ID_DRC_COUNT   3
+
 struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
                                              uint16_t section_id);
 
This page took 0.026151 seconds and 5 git commands to generate.