mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
powerpc/pseries/mce: Improve array initialization.
This is a follow up to the patch that fixed misleading print for TLB mutlihit due to wrongly populated mc_err_types[] array. Convert all the static array initialization to '[x] = val' style for better readability of array indexing and avoid any further confusion. Suggested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
56c46bba9b
commit
c9d8dda423
1 changed files with 26 additions and 26 deletions
|
@ -539,44 +539,44 @@ static void pseries_print_mce_info(struct pt_regs *regs,
|
||||||
int disposition = rtas_error_disposition(errp);
|
int disposition = rtas_error_disposition(errp);
|
||||||
|
|
||||||
static const char * const initiators[] = {
|
static const char * const initiators[] = {
|
||||||
"Unknown",
|
[0] = "Unknown",
|
||||||
"CPU",
|
[1] = "CPU",
|
||||||
"PCI",
|
[2] = "PCI",
|
||||||
"ISA",
|
[3] = "ISA",
|
||||||
"Memory",
|
[4] = "Memory",
|
||||||
"Power Mgmt",
|
[5] = "Power Mgmt",
|
||||||
};
|
};
|
||||||
static const char * const mc_err_types[] = {
|
static const char * const mc_err_types[] = {
|
||||||
"UE",
|
[0] = "UE",
|
||||||
"SLB",
|
[1] = "SLB",
|
||||||
"ERAT",
|
[2] = "ERAT",
|
||||||
"Unknown",
|
[3] = "Unknown",
|
||||||
"TLB",
|
[4] = "TLB",
|
||||||
"D-Cache",
|
[5] = "D-Cache",
|
||||||
"Unknown",
|
[6] = "Unknown",
|
||||||
"I-Cache",
|
[7] = "I-Cache",
|
||||||
};
|
};
|
||||||
static const char * const mc_ue_types[] = {
|
static const char * const mc_ue_types[] = {
|
||||||
"Indeterminate",
|
[0] = "Indeterminate",
|
||||||
"Instruction fetch",
|
[1] = "Instruction fetch",
|
||||||
"Page table walk ifetch",
|
[2] = "Page table walk ifetch",
|
||||||
"Load/Store",
|
[3] = "Load/Store",
|
||||||
"Page table walk Load/Store",
|
[4] = "Page table walk Load/Store",
|
||||||
};
|
};
|
||||||
|
|
||||||
/* SLB sub errors valid values are 0x0, 0x1, 0x2 */
|
/* SLB sub errors valid values are 0x0, 0x1, 0x2 */
|
||||||
static const char * const mc_slb_types[] = {
|
static const char * const mc_slb_types[] = {
|
||||||
"Parity",
|
[0] = "Parity",
|
||||||
"Multihit",
|
[1] = "Multihit",
|
||||||
"Indeterminate",
|
[2] = "Indeterminate",
|
||||||
};
|
};
|
||||||
|
|
||||||
/* TLB and ERAT sub errors valid values are 0x1, 0x2, 0x3 */
|
/* TLB and ERAT sub errors valid values are 0x1, 0x2, 0x3 */
|
||||||
static const char * const mc_soft_types[] = {
|
static const char * const mc_soft_types[] = {
|
||||||
"Unknown",
|
[0] = "Unknown",
|
||||||
"Parity",
|
[1] = "Parity",
|
||||||
"Multihit",
|
[2] = "Multihit",
|
||||||
"Indeterminate",
|
[3] = "Indeterminate",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!rtas_error_extended(errp)) {
|
if (!rtas_error_extended(errp)) {
|
||||||
|
|
Loading…
Reference in a new issue