diff options
author | Anton Blanchard <anton@samba.org> | 2012-03-21 11:47:07 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-27 20:31:58 -0400 |
commit | 6431f20879e338306b997cd75a36824cf9d6e687 (patch) | |
tree | 3ae6dd6a4347861b1834ea6b612ae686d23e0c1e /arch/powerpc/include/asm/rtas.h | |
parent | 1a5c2e63f497bdb5912138888053a02870ed1153 (diff) |
powerpc: Make function that parses RTAS error logs global
The IO event interrupt code has a function that finds specific
sections in an RTAS error log. We want to use it in the EPOW
code so make it global.
Rename things to make it less cryptic:
find_xelog_section() -> get_pseries_errorlog()
struct pseries_elog_section -> struct pseries_errorlog
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/rtas.h')
-rw-r--r-- | arch/powerpc/include/asm/rtas.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index 01c143bb77ae..a01fa3eee6bd 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h | |||
@@ -204,6 +204,39 @@ struct rtas_ext_event_log_v6 { | |||
204 | /* Variable length. */ | 204 | /* Variable length. */ |
205 | }; | 205 | }; |
206 | 206 | ||
207 | /* pSeries event log format */ | ||
208 | |||
209 | /* Two bytes ASCII section IDs */ | ||
210 | #define PSERIES_ELOG_SECT_ID_PRIV_HDR (('P' << 8) | 'H') | ||
211 | #define PSERIES_ELOG_SECT_ID_USER_HDR (('U' << 8) | 'H') | ||
212 | #define PSERIES_ELOG_SECT_ID_PRIMARY_SRC (('P' << 8) | 'S') | ||
213 | #define PSERIES_ELOG_SECT_ID_EXTENDED_UH (('E' << 8) | 'H') | ||
214 | #define PSERIES_ELOG_SECT_ID_FAILING_MTMS (('M' << 8) | 'T') | ||
215 | #define PSERIES_ELOG_SECT_ID_SECONDARY_SRC (('S' << 8) | 'S') | ||
216 | #define PSERIES_ELOG_SECT_ID_DUMP_LOCATOR (('D' << 8) | 'H') | ||
217 | #define PSERIES_ELOG_SECT_ID_FW_ERROR (('S' << 8) | 'W') | ||
218 | #define PSERIES_ELOG_SECT_ID_IMPACT_PART_ID (('L' << 8) | 'P') | ||
219 | #define PSERIES_ELOG_SECT_ID_LOGIC_RESOURCE_ID (('L' << 8) | 'R') | ||
220 | #define PSERIES_ELOG_SECT_ID_HMC_ID (('H' << 8) | 'M') | ||
221 | #define PSERIES_ELOG_SECT_ID_EPOW (('E' << 8) | 'P') | ||
222 | #define PSERIES_ELOG_SECT_ID_IO_EVENT (('I' << 8) | 'E') | ||
223 | #define PSERIES_ELOG_SECT_ID_MANUFACT_INFO (('M' << 8) | 'I') | ||
224 | #define PSERIES_ELOG_SECT_ID_CALL_HOME (('C' << 8) | 'H') | ||
225 | #define PSERIES_ELOG_SECT_ID_USER_DEF (('U' << 8) | 'D') | ||
226 | |||
227 | /* Vendor specific Platform Event Log Format, Version 6, section header */ | ||
228 | struct pseries_errorlog { | ||
229 | uint16_t id; /* 0x00 2-byte ASCII section ID */ | ||
230 | uint16_t length; /* 0x02 Section length in bytes */ | ||
231 | uint8_t version; /* 0x04 Section version */ | ||
232 | uint8_t subtype; /* 0x05 Section subtype */ | ||
233 | uint16_t creator_component; /* 0x06 Creator component ID */ | ||
234 | uint8_t data[]; /* 0x08 Start of section data */ | ||
235 | }; | ||
236 | |||
237 | struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log, | ||
238 | uint16_t section_id); | ||
239 | |||
207 | /* | 240 | /* |
208 | * This can be set by the rtas_flash module so that it can get called | 241 | * This can be set by the rtas_flash module so that it can get called |
209 | * as the absolutely last thing before the kernel terminates. | 242 | * as the absolutely last thing before the kernel terminates. |