powerpc/pci: Always print PHB and PE numbers as hexadecimal
PHB, PE (and by association MVE) numbers are printed as a mix of decimal and hexadecimal throughout the kernel. This can be misleading, so make them all hexadecimal. Standardising on hex instead of dec because: - PHB numbers are presented in hex in sysfs/debugfs (and lspci, etc) - PE numbers are presented as hex in sysfs and parsed in hex in debugfs The only place I think this could cause confusing are the messages during boot, i.e. pci 000a:01 : [PE# 000] Secondary bus 1 associated with PE#0 which can be a quick way to check PE numbers. pe_level_printk() will only print two characters instead of three, so the above would be pci 000a:01 : [PE# 00] Secondary bus 1 associated with PE#0 which gives a hint it's in hex. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
d4791db527
commit
1f52f17614
@@ -372,7 +372,7 @@ static int eeh_phb_check_failure(struct eeh_pe *pe)
|
||||
/* Find the PHB PE */
|
||||
phb_pe = eeh_phb_pe_get(pe->phb);
|
||||
if (!phb_pe) {
|
||||
pr_warn("%s Can't find PE for PHB#%d\n",
|
||||
pr_warn("%s Can't find PE for PHB#%x\n",
|
||||
__func__, pe->phb->global_number);
|
||||
return -EEXIST;
|
||||
}
|
||||
@@ -664,7 +664,7 @@ int eeh_pci_enable(struct eeh_pe *pe, int function)
|
||||
rc = eeh_ops->set_option(pe, function);
|
||||
if (rc)
|
||||
pr_warn("%s: Unexpected state change %d on "
|
||||
"PHB#%d-PE#%x, err=%d\n",
|
||||
"PHB#%x-PE#%x, err=%d\n",
|
||||
__func__, function, pe->phb->global_number,
|
||||
pe->addr, rc);
|
||||
|
||||
@@ -864,7 +864,7 @@ int eeh_reset_pe(struct eeh_pe *pe)
|
||||
}
|
||||
|
||||
if (state < 0) {
|
||||
pr_warn("%s: Unrecoverable slot failure on PHB#%d-PE#%x",
|
||||
pr_warn("%s: Unrecoverable slot failure on PHB#%x-PE#%x",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
ret = -ENOTRECOVERABLE;
|
||||
goto out;
|
||||
|
@@ -732,7 +732,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
|
||||
frozen_bus = eeh_pe_bus_get(pe);
|
||||
if (!frozen_bus) {
|
||||
pr_err("%s: Cannot find PCI bus for PHB#%d-PE#%x\n",
|
||||
pr_err("%s: Cannot find PCI bus for PHB#%x-PE#%x\n",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
return;
|
||||
}
|
||||
@@ -876,7 +876,7 @@ excess_failures:
|
||||
* are due to poorly seated PCI cards. Only 10% or so are
|
||||
* due to actual, failed cards.
|
||||
*/
|
||||
pr_err("EEH: PHB#%d-PE#%x has failed %d times in the\n"
|
||||
pr_err("EEH: PHB#%x-PE#%x has failed %d times in the\n"
|
||||
"last hour and has been permanently disabled.\n"
|
||||
"Please try reseating or replacing it.\n",
|
||||
pe->phb->global_number, pe->addr,
|
||||
@@ -884,7 +884,7 @@ excess_failures:
|
||||
goto perm_error;
|
||||
|
||||
hard_fail:
|
||||
pr_err("EEH: Unable to recover from failure from PHB#%d-PE#%x.\n"
|
||||
pr_err("EEH: Unable to recover from failure from PHB#%x-PE#%x.\n"
|
||||
"Please try reseating or replacing it\n",
|
||||
pe->phb->global_number, pe->addr);
|
||||
|
||||
@@ -998,7 +998,7 @@ static void eeh_handle_special_event(void)
|
||||
bus = eeh_pe_bus_get(phb_pe);
|
||||
if (!bus) {
|
||||
pr_err("%s: Cannot find PCI bus for "
|
||||
"PHB#%d-PE#%x\n",
|
||||
"PHB#%x-PE#%x\n",
|
||||
__func__,
|
||||
pe->phb->global_number,
|
||||
pe->addr);
|
||||
|
@@ -75,11 +75,11 @@ static int eeh_event_handler(void * dummy)
|
||||
if (pe) {
|
||||
eeh_pe_state_mark(pe, EEH_PE_RECOVERING);
|
||||
if (pe->type & EEH_PE_PHB)
|
||||
pr_info("EEH: Detected error on PHB#%d\n",
|
||||
pr_info("EEH: Detected error on PHB#%x\n",
|
||||
pe->phb->global_number);
|
||||
else
|
||||
pr_info("EEH: Detected PCI bus error on "
|
||||
"PHB#%d-PE#%x\n",
|
||||
"PHB#%x-PE#%x\n",
|
||||
pe->phb->global_number, pe->addr);
|
||||
eeh_handle_event(pe);
|
||||
eeh_pe_state_clear(pe, EEH_PE_RECOVERING);
|
||||
|
@@ -104,7 +104,7 @@ int eeh_phb_pe_create(struct pci_controller *phb)
|
||||
/* Put it into the list */
|
||||
list_add_tail(&pe->child, &eeh_phb_pe);
|
||||
|
||||
pr_debug("EEH: Add PE for PHB#%d\n", phb->global_number);
|
||||
pr_debug("EEH: Add PE for PHB#%x\n", phb->global_number);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev)
|
||||
|
||||
/* Check if the PE number is valid */
|
||||
if (!eeh_has_flag(EEH_VALID_PE_ZERO) && !edev->pe_config_addr) {
|
||||
pr_err("%s: Invalid PE#0 for edev 0x%x on PHB#%d\n",
|
||||
pr_err("%s: Invalid PE#0 for edev 0x%x on PHB#%x\n",
|
||||
__func__, edev->config_addr, edev->phb->global_number);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user