aerdrv: Move cper_print_aer() call out of interrupt context
The following warning was seen on 3.9 when a corrected PCIe error was being handled by the AER subsystem. WARNING: at .../drivers/pci/search.c:214 pci_get_dev_by_id+0x8a/0x90() This occurred because a call to pci_get_domain_bus_and_slot() was added to cper_print_pcie() to setup for the call to cper_print_aer(). The warning showed up because cper_print_pcie() is called in an interrupt context and pci_get* functions are not supposed to be called in that context. The solution is to move the cper_print_aer() call out of the interrupt context and into aer_recover_work_func() to avoid any warnings when calling pci_get* functions. Signed-off-by: Lance Ortiz <lance.ortiz@hp.com> Acked-by: Borislav Petkov <bp@suse.de> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
@@ -220,7 +220,7 @@ int cper_severity_to_aer(int cper_severity)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cper_severity_to_aer);
|
||||
|
||||
void cper_print_aer(const char *prefix, struct pci_dev *dev, int cper_severity,
|
||||
void cper_print_aer(struct pci_dev *dev, int cper_severity,
|
||||
struct aer_capability_regs *aer)
|
||||
{
|
||||
int aer_severity, layer, agent, status_strs_size, tlp_header_valid = 0;
|
||||
@@ -244,7 +244,7 @@ void cper_print_aer(const char *prefix, struct pci_dev *dev, int cper_severity,
|
||||
agent = AER_GET_AGENT(aer_severity, status);
|
||||
dev_err(&dev->dev, "aer_status: 0x%08x, aer_mask: 0x%08x\n",
|
||||
status, mask);
|
||||
cper_print_bits(prefix, status, status_strs, status_strs_size);
|
||||
cper_print_bits("", status, status_strs, status_strs_size);
|
||||
dev_err(&dev->dev, "aer_layer=%s, aer_agent=%s\n",
|
||||
aer_error_layer[layer], aer_agent_string[agent]);
|
||||
if (aer_severity != AER_CORRECTABLE)
|
||||
|
Reference in New Issue
Block a user