aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/apei/ghes.c
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2011-12-07 22:25:41 -0500
committerLen Brown <len.brown@intel.com>2012-01-17 03:54:21 -0500
commita654e5ee4f2213844d23361eda4955fe9efaf35f (patch)
tree79e99e3314289cd3e2310e0c5c5aa8f579c12d2d /drivers/acpi/apei/ghes.c
parent04c25997c97e57d95d1f5a7a6e5fff2411dbd48b (diff)
ACPI, APEI, GHES: Add PCIe AER recovery support
aer_recover_queue() is called when recoverable PCIe AER errors are notified by firmware to do the recovery work. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/apei/ghes.c')
-rw-r--r--drivers/acpi/apei/ghes.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index b8e08cb67a18..511b971d1148 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -45,6 +45,8 @@
45#include <linux/irq_work.h> 45#include <linux/irq_work.h>
46#include <linux/llist.h> 46#include <linux/llist.h>
47#include <linux/genalloc.h> 47#include <linux/genalloc.h>
48#include <linux/pci.h>
49#include <linux/aer.h>
48#include <acpi/apei.h> 50#include <acpi/apei.h>
49#include <acpi/atomicio.h> 51#include <acpi/atomicio.h>
50#include <acpi/hed.h> 52#include <acpi/hed.h>
@@ -476,6 +478,27 @@ static void ghes_do_proc(const struct acpi_hest_generic_status *estatus)
476 } 478 }
477#endif 479#endif
478 } 480 }
481#ifdef CONFIG_ACPI_APEI_PCIEAER
482 else if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
483 CPER_SEC_PCIE)) {
484 struct cper_sec_pcie *pcie_err;
485 pcie_err = (struct cper_sec_pcie *)(gdata+1);
486 if (sev == GHES_SEV_RECOVERABLE &&
487 sec_sev == GHES_SEV_RECOVERABLE &&
488 pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID &&
489 pcie_err->validation_bits & CPER_PCIE_VALID_AER_INFO) {
490 unsigned int devfn;
491 int aer_severity;
492 devfn = PCI_DEVFN(pcie_err->device_id.device,
493 pcie_err->device_id.function);
494 aer_severity = cper_severity_to_aer(sev);
495 aer_recover_queue(pcie_err->device_id.segment,
496 pcie_err->device_id.bus,
497 devfn, aer_severity);
498 }
499
500 }
501#endif
479 } 502 }
480} 503}
481 504