aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-01-13 18:46:15 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-01-13 18:46:15 -0500
commit6b9bd1e3ee8f23b55d407becf4f6f422ec4610f2 (patch)
treec5bee117d8ae1b20e6f9de393c382430ecc7faf5
parent96702be560374ee7e7139a34cab03554129abbb4 (diff)
parent339c0fc58618b717565f109d68da50c5bc1a0510 (diff)
Merge branch 'pci/aer' into next
* pci/aer: PCI/AER: Support ACPI HEST AER error sources for PCI domains other than 0 ACPICA: Add helper macros to extract bus/segment numbers from HEST table.
-rw-r--r--drivers/pci/pcie/aer/aerdrv_acpi.c8
-rw-r--r--include/acpi/actbl1.h10
2 files changed, 13 insertions, 5 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c
index 4d6991794fa2..01906576ab91 100644
--- a/drivers/pci/pcie/aer/aerdrv_acpi.c
+++ b/drivers/pci/pcie/aer/aerdrv_acpi.c
@@ -23,10 +23,10 @@
23static inline int hest_match_pci(struct acpi_hest_aer_common *p, 23static inline int hest_match_pci(struct acpi_hest_aer_common *p,
24 struct pci_dev *pci) 24 struct pci_dev *pci)
25{ 25{
26 return (0 == pci_domain_nr(pci->bus) && 26 return ACPI_HEST_SEGMENT(p->bus) == pci_domain_nr(pci->bus) &&
27 p->bus == pci->bus->number && 27 ACPI_HEST_BUS(p->bus) == pci->bus->number &&
28 p->device == PCI_SLOT(pci->devfn) && 28 p->device == PCI_SLOT(pci->devfn) &&
29 p->function == PCI_FUNC(pci->devfn)); 29 p->function == PCI_FUNC(pci->devfn);
30} 30}
31 31
32static inline bool hest_match_type(struct acpi_hest_header *hest_hdr, 32static inline bool hest_match_type(struct acpi_hest_header *hest_hdr,
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 556c83ee6b42..4ec8c194bfe5 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -457,7 +457,7 @@ struct acpi_hest_aer_common {
457 u8 enabled; 457 u8 enabled;
458 u32 records_to_preallocate; 458 u32 records_to_preallocate;
459 u32 max_sections_per_record; 459 u32 max_sections_per_record;
460 u32 bus; 460 u32 bus; /* Bus and Segment numbers */
461 u16 device; 461 u16 device;
462 u16 function; 462 u16 function;
463 u16 device_control; 463 u16 device_control;
@@ -473,6 +473,14 @@ struct acpi_hest_aer_common {
473#define ACPI_HEST_FIRMWARE_FIRST (1) 473#define ACPI_HEST_FIRMWARE_FIRST (1)
474#define ACPI_HEST_GLOBAL (1<<1) 474#define ACPI_HEST_GLOBAL (1<<1)
475 475
476/*
477 * Macros to access the bus/segment numbers in Bus field above:
478 * Bus number is encoded in bits 7:0
479 * Segment number is encoded in bits 23:8
480 */
481#define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
482#define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
483
476/* Hardware Error Notification */ 484/* Hardware Error Notification */
477 485
478struct acpi_hest_notify { 486struct acpi_hest_notify {