1
0
Fork 0
alistair23-linux/drivers/pci
Jiang Liu d66ecb7220 PCI / ACPI: Use boot-time resource allocation rules during hotplug
On x86 platforms, the kernel respects PCI resource assignments from
the BIOS and only reassigns resources for unassigned BARs at boot
time.  However, with the ACPI-based hotplug (acpiphp), it ignores the
BIOS' PCI resource assignments completely and reassigns all resources
by itself.  This causes differences in PCI resource allocation
between boot time and runtime hotplug to occur, which is generally
undesirable and sometimes actively breaks things.

Namely, if there are enough resources, reassigning all PCI resources
during runtime hotplug should work, but it may fail if the resources
are constrained.  This may happen, for instance, when some PCI
devices with huge MMIO BARs are involved in the runtime hotplug
operations, because the current PCI MMIO alignment algorithm may
waste huge chunks of MMIO address space in those cases.

On the Alexander's Sony VAIO VPCZ23A4R the BIOS allocates limited
MMIO resources for the dock station which contains a device
(graphics adapter) with a 256MB MMIO BAR.  An attempt to reassign
that during runtime hotplug causes the dock station MMIO window to be
exhausted and acpiphp fails to allocate resources for the majority
of devices on the dock station as a result.

To prevent that from happening, modify acpiphp to follow the boot
time resources allocation behavior so that the BIOS' resource
assignments are respected during runtime hotplug too.

[rjw: Changelog]
References: https://bugzilla.kernel.org/show_bug.cgi?id=56531
Reported-and-tested-by: Alexander E. Patrakov <patrakov@gmail.com>
Tested-by: Illya Klymov <xanf@xanf.me>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Cc: 3.9+ <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-06-23 01:01:35 +02:00
..
hotplug PCI / ACPI: Use boot-time resource allocation rules during hotplug 2013-06-23 01:01:35 +02:00
pcie aerdrv: Move cper_print_aer() call out of interrupt context 2013-05-30 10:51:20 -07:00
Kconfig PCI: Drop bogus default from ARCH_SUPPORTS_MSI 2012-09-10 16:49:52 -06:00
Makefile PCI: Always build setup-bus when PCI is enabled 2012-11-28 13:00:58 -08:00
access.c PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS 2013-02-15 11:46:24 -07:00
ats.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
bus.c PCI: Delay final fixups until resources are assigned 2013-05-07 14:35:44 -06:00
host-bridge.c PCI: add host bridge release support 2012-04-30 14:52:43 -06:00
hotplug-pci.c PCI: hotplug: remove pci_do_scan_bus() 2012-06-13 15:42:27 -06:00
htirq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
ioapic.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00
iov.c pci: Add SRIOV helper function to determine if VFs are assigned to guest 2013-04-24 19:31:58 -07:00
irq.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
msi.c PCI: Set ->mask_pos correctly 2013-04-30 08:49:19 -07:00
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
pci-driver.c PCI: Don't try to disable Bus Master on disconnected PCI devices 2013-04-02 18:03:09 -06:00
pci-label.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
pci-stub.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
pci-sysfs.c PCI: Use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT 2013-04-15 14:30:44 -06:00
pci.c Merge branch 'pci/rafael-pm' into next 2013-04-17 10:43:16 -06:00
pci.h PCI / ACPI: Use boot-time resource allocation rules during hotplug 2013-06-23 01:01:35 +02:00
probe.c PCI updates for v3.10: 2013-05-09 10:21:44 -07:00
proc.c proc: Supply a function to remove a proc entry by PDE 2013-05-01 17:29:46 -04:00
quirks.c PCI: Clean up quirk_io_region 2013-04-15 14:30:44 -06:00
remove.c PCI: Add pcibios hooks for adding and removing PCI buses 2013-04-12 15:38:25 -06:00
rom.c PCI: Add PCI ROM helper for platform-provided ROM images 2013-03-26 17:19:41 -06:00
search.c PCI: Fix reference count leak in pci_dev_present() 2013-01-25 13:49:27 -07:00
setup-bus.c PCI / ACPI: Use boot-time resource allocation rules during hotplug 2013-06-23 01:01:35 +02:00
setup-irq.c PCI: Provide a default pcibios_update_irq() 2012-09-18 17:28:21 -06:00
setup-res.c PCI: Remove unused variables 2013-04-15 10:56:27 -06:00
slot.c PCI: Warn about failures instead of "must_check" functions 2013-04-17 10:21:12 -06:00
syscall.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00