Message ID | 54174C20.1000009@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Michael Ellerman |
Headers | show |
On Mon, 2014-09-15 at 15:29 -0500, Nathan Fontenot wrote: > diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h > index b390f55..a01879e 100644 > --- a/arch/powerpc/include/asm/rtas.h > +++ b/arch/powerpc/include/asm/rtas.h > @@ -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 { > + uint8_t resource; > + uint8_t action; > + uint8_t id_type; > + uint8_t reserved; These should be u8. > + union { > + __be32 drc_index; > + __be32 drc_count; > + char drc_name[1]; I don't see drc_name used? > + } _drc_u; > +}; cheers
On 09/17/2014 02:06 AM, Michael Ellerman wrote: > > On Mon, 2014-09-15 at 15:29 -0500, Nathan Fontenot wrote: >> diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h >> index b390f55..a01879e 100644 >> --- a/arch/powerpc/include/asm/rtas.h >> +++ b/arch/powerpc/include/asm/rtas.h >> @@ -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 { >> + uint8_t resource; >> + uint8_t action; >> + uint8_t id_type; >> + uint8_t reserved; > > These should be u8. ok. > >> + union { >> + __be32 drc_index; >> + __be32 drc_count; >> + char drc_name[1]; > > I don't see drc_name used? I don't use drc_name in this patch set but the drc_name piece is part of the rtas hotplug section definition and I wanted to provide a complete definition of the section. -Nathan > >> + } _drc_u; >> +}; > > cheers > > > > > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev >
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index b390f55..a01879e 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h @@ -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 { + uint8_t resource; + uint8_t action; + uint8_t id_type; + uint8_t 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);
In order to handle device hotplug in the kernel on pseries the hotplug notification will be communicated to 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> --- arch/powerpc/include/asm/rtas.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)