aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:26:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:26:51 -0400
commit5f78e4d33945b291d12765cdd7e4304f437b9361 (patch)
tree113cea729de15a98bb941cc4afb8d13301534ca7 /drivers/pci
parent867a89e0b73af48838c7987e80899a1ff26dd6ff (diff)
parent5f0b2976cb2b62668a076f54419c24b8ab677167 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci: x86: add pci=check_enable_amd_mmconf and dmi check x86: work around io allocation overlap of HT links acpi: get boot_cpu_id as early for k8_scan_nodes x86_64: don't need set default res if only have one root bus x86: double check the multi root bus with fam10h mmconf x86: multi pci root bus with different io resource range, on 64-bit x86: use bus conf in NB conf fun1 to get bus range on, on 64-bit x86: get mp_bus_to_node early x86 pci: remove checking type for mmconfig probe x86: remove unneeded check in mmconf reject driver core: try parent numa_node at first before using default x86: seperate mmconf for fam10h out from setup_64.c x86: if acpi=off, force setting the mmconf for fam10h x86_64: check MSR to get MMCONFIG for AMD Family 10h x86_64: check and enable MMCONFIG for AMD Family 10h x86_64: set cfg_size for AMD Family 10h in case MMCONFIG x86: mmconf enable mcfg early x86: clear pci_mmcfg_virt when mmcfg get rejected x86: validate against acpi motherboard resources Fixed up fairly trivial conflicts in arch/x86/pci/{init.c,pci.h} due to OLPC support manually.
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/probe.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index f991359f0c36..4a55bf380957 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -842,11 +842,14 @@ static void set_pcie_port_type(struct pci_dev *pdev)
842 * reading the dword at 0x100 which must either be 0 or a valid extended 842 * reading the dword at 0x100 which must either be 0 or a valid extended
843 * capability header. 843 * capability header.
844 */ 844 */
845int pci_cfg_space_size(struct pci_dev *dev) 845int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix)
846{ 846{
847 int pos; 847 int pos;
848 u32 status; 848 u32 status;
849 849
850 if (!check_exp_pcix)
851 goto skip;
852
850 pos = pci_find_capability(dev, PCI_CAP_ID_EXP); 853 pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
851 if (!pos) { 854 if (!pos) {
852 pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); 855 pos = pci_find_capability(dev, PCI_CAP_ID_PCIX);
@@ -858,6 +861,7 @@ int pci_cfg_space_size(struct pci_dev *dev)
858 goto fail; 861 goto fail;
859 } 862 }
860 863
864 skip:
861 if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL) 865 if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL)
862 goto fail; 866 goto fail;
863 if (status == 0xffffffff) 867 if (status == 0xffffffff)
@@ -869,6 +873,11 @@ int pci_cfg_space_size(struct pci_dev *dev)
869 return PCI_CFG_SPACE_SIZE; 873 return PCI_CFG_SPACE_SIZE;
870} 874}
871 875
876int pci_cfg_space_size(struct pci_dev *dev)
877{
878 return pci_cfg_space_size_ext(dev, 1);
879}
880
872static void pci_release_bus_bridge_dev(struct device *dev) 881static void pci_release_bus_bridge_dev(struct device *dev)
873{ 882{
874 kfree(dev); 883 kfree(dev);
@@ -964,7 +973,6 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
964 dev->dev.release = pci_release_dev; 973 dev->dev.release = pci_release_dev;
965 pci_dev_get(dev); 974 pci_dev_get(dev);
966 975
967 set_dev_node(&dev->dev, pcibus_to_node(bus));
968 dev->dev.dma_mask = &dev->dma_mask; 976 dev->dev.dma_mask = &dev->dma_mask;
969 dev->dev.dma_parms = &dev->dma_parms; 977 dev->dev.dma_parms = &dev->dma_parms;
970 dev->dev.coherent_dma_mask = 0xffffffffull; 978 dev->dev.coherent_dma_mask = 0xffffffffull;
@@ -1080,6 +1088,10 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
1080 return max; 1088 return max;
1081} 1089}
1082 1090
1091void __attribute__((weak)) set_pci_bus_resources_arch_default(struct pci_bus *b)
1092{
1093}
1094
1083struct pci_bus * pci_create_bus(struct device *parent, 1095struct pci_bus * pci_create_bus(struct device *parent,
1084 int bus, struct pci_ops *ops, void *sysdata) 1096 int bus, struct pci_ops *ops, void *sysdata)
1085{ 1097{
@@ -1119,6 +1131,9 @@ struct pci_bus * pci_create_bus(struct device *parent,
1119 goto dev_reg_err; 1131 goto dev_reg_err;
1120 b->bridge = get_device(dev); 1132 b->bridge = get_device(dev);
1121 1133
1134 if (!parent)
1135 set_dev_node(b->bridge, pcibus_to_node(b));
1136
1122 b->dev.class = &pcibus_class; 1137 b->dev.class = &pcibus_class;
1123 b->dev.parent = b->bridge; 1138 b->dev.parent = b->bridge;
1124 sprintf(b->dev.bus_id, "%04x:%02x", pci_domain_nr(b), bus); 1139 sprintf(b->dev.bus_id, "%04x:%02x", pci_domain_nr(b), bus);
@@ -1136,6 +1151,8 @@ struct pci_bus * pci_create_bus(struct device *parent,
1136 b->resource[0] = &ioport_resource; 1151 b->resource[0] = &ioport_resource;
1137 b->resource[1] = &iomem_resource; 1152 b->resource[1] = &iomem_resource;
1138 1153
1154 set_pci_bus_resources_arch_default(b);
1155
1139 return b; 1156 return b;
1140 1157
1141dev_create_file_err: 1158dev_create_file_err: