diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-11 21:50:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-11 21:50:26 -0500 |
commit | 7b67e751479d50b7f84d1a3cc5216eed5e534b66 (patch) | |
tree | a1a6746857cf65f04dde739fe271bf4143d55eaf /arch/ia64 | |
parent | 9f13a1fd452f11c18004ba2422a6384b424ec8a9 (diff) | |
parent | 76ccc297018d25d55b789bbd508861ef1e2cdb0c (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
PCI: Increase resource array mask bit size in pcim_iomap_regions()
PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
x86/PCI: amd: factor out MMCONFIG discovery
PCI: Enable ATS at the device state restore
PCI: msi: fix imbalanced refcount of msi irq sysfs objects
PCI: kconfig: English typo in pci/pcie/Kconfig
PCI/PM/Runtime: make PCI traces quieter
PCI: remove pci_create_bus()
xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
sparc/PCI: convert to pci_create_root_bus()
sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
powerpc/PCI: convert to pci_create_root_bus()
powerpc/PCI: split PHB part out of pcibios_map_io_space()
...
Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
to the same patches being applied in other branches.
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/include/asm/pci.h | 6 | ||||
-rw-r--r-- | arch/ia64/pci/pci.c | 43 |
2 files changed, 20 insertions, 29 deletions
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h index 127dd7be346a..279b38ae74aa 100644 --- a/arch/ia64/include/asm/pci.h +++ b/arch/ia64/include/asm/pci.h | |||
@@ -43,12 +43,6 @@ extern unsigned long ia64_max_iommu_merge_mask; | |||
43 | #define PCI_DMA_BUS_IS_PHYS (ia64_max_iommu_merge_mask == ~0UL) | 43 | #define PCI_DMA_BUS_IS_PHYS (ia64_max_iommu_merge_mask == ~0UL) |
44 | 44 | ||
45 | static inline void | 45 | static inline void |
46 | pcibios_set_master (struct pci_dev *dev) | ||
47 | { | ||
48 | /* No special bus mastering setup handling */ | ||
49 | } | ||
50 | |||
51 | static inline void | ||
52 | pcibios_penalize_isa_irq (int irq, int active) | 46 | pcibios_penalize_isa_irq (int irq, int active) |
53 | { | 47 | { |
54 | /* We don't do dynamic PCI IRQ allocation */ | 48 | /* We don't do dynamic PCI IRQ allocation */ |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 2c27714d7b78..f82f5d4b65fd 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -134,6 +134,7 @@ alloc_pci_controller (int seg) | |||
134 | struct pci_root_info { | 134 | struct pci_root_info { |
135 | struct acpi_device *bridge; | 135 | struct acpi_device *bridge; |
136 | struct pci_controller *controller; | 136 | struct pci_controller *controller; |
137 | struct list_head resources; | ||
137 | char *name; | 138 | char *name; |
138 | }; | 139 | }; |
139 | 140 | ||
@@ -315,24 +316,13 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data) | |||
315 | &window->resource); | 316 | &window->resource); |
316 | } | 317 | } |
317 | 318 | ||
318 | return AE_OK; | 319 | /* HP's firmware has a hack to work around a Windows bug. |
319 | } | 320 | * Ignore these tiny memory ranges */ |
320 | 321 | if (!((window->resource.flags & IORESOURCE_MEM) && | |
321 | static void __devinit | 322 | (window->resource.end - window->resource.start < 16))) |
322 | pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl) | 323 | pci_add_resource(&info->resources, &window->resource); |
323 | { | ||
324 | int i; | ||
325 | 324 | ||
326 | pci_bus_remove_resources(bus); | 325 | return AE_OK; |
327 | for (i = 0; i < ctrl->windows; i++) { | ||
328 | struct resource *res = &ctrl->window[i].resource; | ||
329 | /* HP's firmware has a hack to work around a Windows bug. | ||
330 | * Ignore these tiny memory ranges */ | ||
331 | if ((res->flags & IORESOURCE_MEM) && | ||
332 | (res->end - res->start < 16)) | ||
333 | continue; | ||
334 | pci_bus_add_resource(bus, res, 0); | ||
335 | } | ||
336 | } | 326 | } |
337 | 327 | ||
338 | struct pci_bus * __devinit | 328 | struct pci_bus * __devinit |
@@ -343,6 +333,7 @@ pci_acpi_scan_root(struct acpi_pci_root *root) | |||
343 | int bus = root->secondary.start; | 333 | int bus = root->secondary.start; |
344 | struct pci_controller *controller; | 334 | struct pci_controller *controller; |
345 | unsigned int windows = 0; | 335 | unsigned int windows = 0; |
336 | struct pci_root_info info; | ||
346 | struct pci_bus *pbus; | 337 | struct pci_bus *pbus; |
347 | char *name; | 338 | char *name; |
348 | int pxm; | 339 | int pxm; |
@@ -359,11 +350,10 @@ pci_acpi_scan_root(struct acpi_pci_root *root) | |||
359 | controller->node = pxm_to_node(pxm); | 350 | controller->node = pxm_to_node(pxm); |
360 | #endif | 351 | #endif |
361 | 352 | ||
353 | INIT_LIST_HEAD(&info.resources); | ||
362 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, | 354 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, |
363 | &windows); | 355 | &windows); |
364 | if (windows) { | 356 | if (windows) { |
365 | struct pci_root_info info; | ||
366 | |||
367 | controller->window = | 357 | controller->window = |
368 | kmalloc_node(sizeof(*controller->window) * windows, | 358 | kmalloc_node(sizeof(*controller->window) * windows, |
369 | GFP_KERNEL, controller->node); | 359 | GFP_KERNEL, controller->node); |
@@ -387,8 +377,14 @@ pci_acpi_scan_root(struct acpi_pci_root *root) | |||
387 | * should handle the case here, but it appears that IA64 hasn't | 377 | * should handle the case here, but it appears that IA64 hasn't |
388 | * such quirk. So we just ignore the case now. | 378 | * such quirk. So we just ignore the case now. |
389 | */ | 379 | */ |
390 | pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller); | 380 | pbus = pci_create_root_bus(NULL, bus, &pci_root_ops, controller, |
381 | &info.resources); | ||
382 | if (!pbus) { | ||
383 | pci_free_resource_list(&info.resources); | ||
384 | return NULL; | ||
385 | } | ||
391 | 386 | ||
387 | pbus->subordinate = pci_scan_child_bus(pbus); | ||
392 | return pbus; | 388 | return pbus; |
393 | 389 | ||
394 | out3: | 390 | out3: |
@@ -504,14 +500,15 @@ pcibios_fixup_bus (struct pci_bus *b) | |||
504 | if (b->self) { | 500 | if (b->self) { |
505 | pci_read_bridge_bases(b); | 501 | pci_read_bridge_bases(b); |
506 | pcibios_fixup_bridge_resources(b->self); | 502 | pcibios_fixup_bridge_resources(b->self); |
507 | } else { | ||
508 | pcibios_setup_root_windows(b, b->sysdata); | ||
509 | } | 503 | } |
510 | list_for_each_entry(dev, &b->devices, bus_list) | 504 | list_for_each_entry(dev, &b->devices, bus_list) |
511 | pcibios_fixup_device_resources(dev); | 505 | pcibios_fixup_device_resources(dev); |
512 | platform_pci_fixup_bus(b); | 506 | platform_pci_fixup_bus(b); |
507 | } | ||
513 | 508 | ||
514 | return; | 509 | void pcibios_set_master (struct pci_dev *dev) |
510 | { | ||
511 | /* No special bus mastering setup handling */ | ||
515 | } | 512 | } |
516 | 513 | ||
517 | void __devinit | 514 | void __devinit |