Commit 95c35491 authored by Tyler Baicar's avatar Tyler Baicar Committed by Bjorn Helgaas

PCI/AER: Remove duplicate AER severity translation

Currently the AER severity is being translated twice in the code flow for
PCIe errors.  It is first translated in ghes_do_proc() before calling into
the AER driver.  Then it is translated again when the AER driver calls
cper_print_aer().  This causes the severity that is used in
cper_print_aer() to be incorrect.

Remove the second translation that is in cper_print_aer() since this
function is already receiving the correct AER severity.
Signed-off-by: default avatarTyler Baicar <tbaicar@codeaurora.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
parent 7ece1417
...@@ -219,15 +219,13 @@ int cper_severity_to_aer(int cper_severity) ...@@ -219,15 +219,13 @@ int cper_severity_to_aer(int cper_severity)
} }
EXPORT_SYMBOL_GPL(cper_severity_to_aer); EXPORT_SYMBOL_GPL(cper_severity_to_aer);
void cper_print_aer(struct pci_dev *dev, int cper_severity, void cper_print_aer(struct pci_dev *dev, int aer_severity,
struct aer_capability_regs *aer) struct aer_capability_regs *aer)
{ {
int aer_severity, layer, agent, status_strs_size, tlp_header_valid = 0; int layer, agent, status_strs_size, tlp_header_valid = 0;
u32 status, mask; u32 status, mask;
const char **status_strs; const char **status_strs;
aer_severity = cper_severity_to_aer(cper_severity);
if (aer_severity == AER_CORRECTABLE) { if (aer_severity == AER_CORRECTABLE) {
status = aer->cor_status; status = aer->cor_status;
mask = aer->cor_mask; mask = aer->cor_mask;
......
...@@ -63,7 +63,7 @@ static inline int pci_cleanup_aer_error_status_regs(struct pci_dev *dev) ...@@ -63,7 +63,7 @@ static inline int pci_cleanup_aer_error_status_regs(struct pci_dev *dev)
} }
#endif #endif
void cper_print_aer(struct pci_dev *dev, int cper_severity, void cper_print_aer(struct pci_dev *dev, int aer_severity,
struct aer_capability_regs *aer); struct aer_capability_regs *aer);
int cper_severity_to_aer(int cper_severity); int cper_severity_to_aer(int cper_severity);
void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment