OSDN Git Service

Merge branches 'acpi-smbus', 'acpi-ec' and 'acpi-pci'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 20 Nov 2015 00:22:52 +0000 (01:22 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 20 Nov 2015 00:22:52 +0000 (01:22 +0100)
* acpi-smbus:
  Revert "ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook"
  ACPI / SMBus: Fix boot stalls / high CPU caused by reentrant code

* acpi-ec:
  ACPI-EC: Drop unnecessary check made before calling acpi_ec_delete_query()

* acpi-pci:
  PCI: Fix OF logic in pci_dma_configure()

1  2  3  4 
drivers/pci/probe.c

diff --combined drivers/pci/probe.c
    #include <linux/module.h>
    #include <linux/cpumask.h>
    #include <linux/pci-aspm.h>
   +#include <linux/aer.h>
    #include <linux/acpi.h>
    #include <asm-generic/pci-bridge.h>
    #include "pci.h"
@@@@@ -1600,9 -1600,9 -1600,9 -1599,6 +1600,9 @@@@@ static struct pci_dev *pci_scan_device(
    
    static void pci_init_capabilities(struct pci_dev *dev)
    {
   +    /* Enhanced Allocation */
   +    pci_ea_init(dev);
   +
        /* MSI/MSI-X list */
        pci_msi_init_pci_dev(dev);
    
    
        /* Enable ACS P2P upstream forwarding */
        pci_enable_acs(dev);
   +
   +    pci_cleanup_aer_error_status_regs(dev);
   +}
   +
   +/*
   + * This is the equivalent of pci_host_bridge_msi_domain that acts on
   + * devices. Firmware interfaces that can select the MSI domain on a
   + * per-device basis should be called from here.
   + */
   +static struct irq_domain *pci_dev_msi_domain(struct pci_dev *dev)
   +{
   +    struct irq_domain *d;
   +
   +    /*
   +     * If a domain has been set through the pcibios_add_device
   +     * callback, then this is the one (platform code knows best).
   +     */
   +    d = dev_get_msi_domain(&dev->dev);
   +    if (d)
   +            return d;
   +
   +    /*
   +     * Let's see if we have a firmware interface able to provide
   +     * the domain.
   +     */
   +    d = pci_msi_get_device_domain(dev);
   +    if (d)
   +            return d;
   +
   +    return NULL;
    }
    
    static void pci_set_msi_domain(struct pci_dev *dev)
    {
   +    struct irq_domain *d;
   +
        /*
   -     * If no domain has been set through the pcibios_add_device
   -     * callback, inherit the default from the bus device.
   +     * If the platform or firmware interfaces cannot supply a
   +     * device-specific MSI domain, then inherit the default domain
   +     * from the host bridge itself.
         */
   -    if (!dev_get_msi_domain(&dev->dev))
   -            dev_set_msi_domain(&dev->dev,
   -                               dev_get_msi_domain(&dev->bus->dev));
   +    d = pci_dev_msi_domain(dev);
   +    if (!d)
   +            d = dev_get_msi_domain(&dev->bus->dev);
   +
   +    dev_set_msi_domain(&dev->dev, d);
    }
    
    /**
@@@@@ -1685,8 -1685,8 -1685,8 -1646,8 +1685,8 @@@@@ static void pci_dma_configure(struct pc
    {
        struct device *bridge = pci_get_host_bridge_device(dev);
    
---     if (IS_ENABLED(CONFIG_OF) && dev->dev.of_node) {
---             if (bridge->parent)
+++     if (IS_ENABLED(CONFIG_OF) &&
+++             bridge->parent && bridge->parent->of_node) {
                        of_dma_configure(&dev->dev, bridge->parent->of_node);
        } else if (has_acpi_companion(bridge)) {
                struct acpi_device *adev = to_acpi_device_node(bridge->fwnode);