Skip to content

PCI: preallocate resource patch series

Ram Pai lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4PCI: refactor io size calculation codedrivers/pci/setup-bus.c+42 -240 replies
2/4PCI: data structure agnostic free list functiondrivers/pci/setup-bus.c+12 -150 replies
3/4PCI: introduce reset_resource()drivers/pci/setup-bus.c+8 -31 reply
4/4PCI: pre-allocate additional resources to devices only after successful allocation of essential resources.drivers/pci/setup-bus.c+184 -471 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] PCI: preallocate resource patch series

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.

The first 3 patches refactors common code and builds the ground work for the 4 patch which contains the core piece of the fix.

patch 1/4: refactors the io size calculation logic patch 2/4: refactors the list freeing logic patch 3/4: refactors the resource reset logic patch 4/4: contains the fix to the original problem

drivers/pci/setup-bus.c | 269 ++++++++++++++++++++++++++++++++++------------