linux/drivers/pci
Ram Pai c8adf9a3e8 PCI: pre-allocate additional resources to devices only after successful allocation of essential resources.
Linux tries to pre-allocate minimal resources to hotplug bridges. This
works fine as long as there are enough resources  to satisfy all other
genuine resource requirements. However if enough resources are not
available to satisfy any of these nice-to-have pre-allocations, the
resource-allocator reports errors and returns failure.

This patch distinguishes between must-have resource from nice-to-have
resource.  Any failure to allocate nice-to-have resources are ignored.

This behavior can be particularly useful to trigger automatic
reallocation when the OS discovers genuine allocation-conflicts or
genuine unallocated-requests caused by buggy allocation behavior of the
native BIOS/uEFI.

https://bugzilla.kernel.org/show_bug.cgi?id=15960 captures the
movitation behind the patch. This patch is verified to resolve the above
bug.

    changelog v2:  o  fixed a bug where pci_assign_resource() was called on a
    		  resource of zero resource size.

    changelog v3:  addressed Bjorn's comment
    	       o  "Please don't indent and right-justify the changelog".
    	       o  removed add_size from struct resource.  The additional
    		  size is now tracked using a linked list.

    changelog v4:  o moved freeing up of elements in head list from
    		assign_requested_resources_sorted() to
    		__assign_resources_sorted().
    	       o removed a wrong reference to 'add_size' in
    			pbus_size_mem().
    	       o some code optimizations in adjust_resources_sorted()
    			and assign_requested_resources_sorted()

    changelog v5:  o moved freeing up of elements in head list from
    		assign_requested_resources_sorted() to
    		__assign_resources_sorted().
    	       o removed a wrong reference to 'add_size' in
    			pbus_size_mem().
    	       o some code optimizations in adjust_resources_sorted()
    			and assign_requested_resources_sorted()

    changelog v5:  o factored out common code and made them into
		separate independent patches
    	       o added comments in kdoc format
	       o added a BUG_ON in pci_assign_unassigned_resources()
		 to catch for memory leak.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-03-04 10:46:47 -08:00
..
hotplug PCI hotplug: acpiphp: set current_state to D0 in register_slot 2011-03-04 10:42:22 -08:00
pcie PCI: aer-inject: Override PCIe AER Mask Registers 2011-03-04 10:41:02 -08:00
.gitignore
access.c
bus.c Revert "PCI: allocate bus resources from the top down" 2010-12-17 10:00:54 -08:00
dmar.c x86, vt-d: Handle previous faults after enabling fault handling 2010-12-13 16:53:57 -08:00
hotplug-pci.c
hotplug.c
htirq.c
intel-iommu.c
intr_remapping.c
intr_remapping.h
ioapic.c
iov.c
iova.c
irq.c
Kconfig PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-04 10:41:56 -08:00
Makefile PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-04 10:41:56 -08:00
msi.c PCI: Add mask bit definition for MSI-X table 2010-12-23 12:53:08 -08:00
msi.h PCI: MSI: Move MSI-X entry definition to pci_regs.h 2010-12-23 12:53:07 -08:00
pci-acpi.c PCI/PM: Report wakeup events before resuming devices 2011-01-14 08:55:43 -08:00
pci-driver.c PCI: fix __pci_device_probe kernel-doc warning 2010-12-23 12:53:09 -08:00
pci-label.c PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-04 10:41:56 -08:00
pci-stub.c PCI: pci-stub: ignore zero-length id parameters 2010-12-23 12:53:52 -08:00
pci-sysfs.c PCI: sysfs: Fix failure path for addition of "vpd" attribute 2011-02-08 10:02:46 -08:00
pci.c PCI/PM: Report wakeup events before resuming devices 2011-01-14 08:55:43 -08:00
pci.h PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-04 10:41:56 -08:00
probe.c PCI: Avoid potential NULL pointer dereference in pci_scan_bridge 2011-02-08 13:08:05 -08:00
proc.c
quirks.c PCI: do not create quirk I/O regions below PCIBIOS_MIN_IO for ICH 2011-03-04 10:42:32 -08:00
remove.c
rom.c
search.c
setup-bus.c PCI: pre-allocate additional resources to devices only after successful allocation of essential resources. 2011-03-04 10:46:47 -08:00
setup-irq.c
setup-res.c
slot.c
syscall.c
vpd.c
xen-pcifront.c