Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (27 commits) x86: allocate space within a region top-down x86: update iomem_resource end based on CPU physical address capabilities x86/PCI: allocate space from the end of a region, not the beginning PCI: allocate bus resources from the top down resources: support allocating space within a region from the top down resources: handle overflow when aligning start of available area resources: ensure callback doesn't allocate outside available space resources: factor out resource_clip() to simplify find_resource() resources: add a default alignf to simplify find_resource() x86/PCI: MMCONFIG: fix region end calculation PCI: Add support for polling PME state on suspended legacy PCI devices PCI: Export some PCI PM functionality PCI: fix message typo PCI: log vendor/device ID always PCI: update Intel chipset names and defines PCI: use new ccflags variable in Makefile PCI: add PCI_MSIX_TABLE/PBA defines PCI: add PCI vendor id for STmicroelectronics x86/PCI: irq and pci_ids patch for Intel Patsburg DeviceIDs PCI: OLPC: Only enable PCI configuration type override on XO-1 ...
This commit is contained in:
@@ -416,7 +416,7 @@ static void aer_error_resume(struct pci_dev *dev)
|
||||
*/
|
||||
static int __init aer_service_init(void)
|
||||
{
|
||||
if (!pci_aer_available())
|
||||
if (!pci_aer_available() || aer_acpi_firmware_first())
|
||||
return -ENXIO;
|
||||
return pcie_port_service_register(&aerdriver);
|
||||
}
|
||||
|
@@ -132,6 +132,7 @@ static inline int aer_osc_setup(struct pcie_device *pciedev)
|
||||
|
||||
#ifdef CONFIG_ACPI_APEI
|
||||
extern int pcie_aer_get_firmware_first(struct pci_dev *pci_dev);
|
||||
extern bool aer_acpi_firmware_first(void);
|
||||
#else
|
||||
static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev)
|
||||
{
|
||||
@@ -139,6 +140,8 @@ static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev)
|
||||
return pci_dev->__aer_firmware_first;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool aer_acpi_firmware_first(void) { return false; }
|
||||
#endif
|
||||
|
||||
static inline void pcie_aer_force_firmware_first(struct pci_dev *pci_dev,
|
||||
|
@@ -93,4 +93,38 @@ int pcie_aer_get_firmware_first(struct pci_dev *dev)
|
||||
aer_set_firmware_first(dev);
|
||||
return dev->__aer_firmware_first;
|
||||
}
|
||||
|
||||
static bool aer_firmware_first;
|
||||
|
||||
static int aer_hest_parse_aff(struct acpi_hest_header *hest_hdr, void *data)
|
||||
{
|
||||
struct acpi_hest_aer_common *p;
|
||||
|
||||
if (aer_firmware_first)
|
||||
return 0;
|
||||
|
||||
switch (hest_hdr->type) {
|
||||
case ACPI_HEST_TYPE_AER_ROOT_PORT:
|
||||
case ACPI_HEST_TYPE_AER_ENDPOINT:
|
||||
case ACPI_HEST_TYPE_AER_BRIDGE:
|
||||
p = (struct acpi_hest_aer_common *)(hest_hdr + 1);
|
||||
aer_firmware_first = !!(p->flags & ACPI_HEST_FIRMWARE_FIRST);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* aer_acpi_firmware_first - Check if APEI should control AER.
|
||||
*/
|
||||
bool aer_acpi_firmware_first(void)
|
||||
{
|
||||
static bool parsed = false;
|
||||
|
||||
if (!parsed) {
|
||||
apei_hest_parse(aer_hest_parse_aff, NULL);
|
||||
parsed = true;
|
||||
}
|
||||
return aer_firmware_first;
|
||||
}
|
||||
#endif
|
||||
|
@@ -754,7 +754,7 @@ void aer_isr(struct work_struct *work)
|
||||
{
|
||||
struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler);
|
||||
struct pcie_device *p_device = rpc->rpd;
|
||||
struct aer_err_source e_src;
|
||||
struct aer_err_source uninitialized_var(e_src);
|
||||
|
||||
mutex_lock(&rpc->rpc_mutex);
|
||||
while (get_e_source(rpc, &e_src))
|
||||
|
@@ -49,7 +49,7 @@ int pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask)
|
||||
| OSC_PCI_EXPRESS_PME_CONTROL;
|
||||
|
||||
if (pci_aer_available()) {
|
||||
if (pcie_aer_get_firmware_first(port))
|
||||
if (aer_acpi_firmware_first())
|
||||
dev_dbg(&port->dev, "PCIe errors handled by BIOS.\n");
|
||||
else
|
||||
flags |= OSC_PCI_EXPRESS_AER_CONTROL;
|
||||
|
Reference in New Issue
Block a user