x86: move a few device initialization objects into .devinit.rodata
[firefly-linux-kernel-4.4.55.git] / arch / x86 / pci / common.c
index bb1a01f089e29c817432907a820ca7a06f727347..8c362b96b644953f018b2001541714dbbfab0c29 100644 (file)
@@ -14,8 +14,7 @@
 #include <asm/segment.h>
 #include <asm/io.h>
 #include <asm/smp.h>
-
-#include "pci.h"
+#include <asm/pci_x86.h>
 
 unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
                                PCI_PROBE_MMCONF;
@@ -91,7 +90,7 @@ static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
        return 0;
 }
 
-static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = {
+static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitconst = {
 /*
  * Systems where PCI IO resource ISA alignment can be skipped
  * when the ISA enable bit in the bridge control is not set
@@ -184,7 +183,7 @@ static int __devinit assign_all_busses(const struct dmi_system_id *d)
 }
 #endif
 
-static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
+static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = {
 #ifdef __i386__
 /*
  * Laptops which need pci=assign-busses to see Cardbus cards
@@ -552,17 +551,25 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
        if ((err = pci_enable_resources(dev, mask)) < 0)
                return err;
 
-       if (!dev->msi_enabled)
+       if (!pci_dev_msi_enabled(dev))
                return pcibios_enable_irq(dev);
        return 0;
 }
 
 void pcibios_disable_device (struct pci_dev *dev)
 {
-       if (!dev->msi_enabled && pcibios_disable_irq)
+       if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq)
                pcibios_disable_irq(dev);
 }
 
+int pci_ext_cfg_avail(struct pci_dev *dev)
+{
+       if (raw_pci_ext_ops)
+               return 1;
+       else
+               return 0;
+}
+
 struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
 {
        struct pci_bus *bus = NULL;