PCI/ACPI: Remove the need for 'struct hotplug_params'
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Fri, 19 Apr 2019 19:27:36 +0000 (14:27 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Apr 2019 21:38:05 +0000 (16:38 -0500)
commit87fcf12e846a5028c14d21a94a0712fd1ad5bad0
treef9118c667e86dc0b4c92a4aa0c851dc95e632199
parente77704501ca00ecb3f2f6439b3eb0d8afbe3a1bf
PCI/ACPI: Remove the need for 'struct hotplug_params'

We used to first parse all the _HPP and _HPX tables before using the
information to program registers of PCIe devices.  Up through HPX Type 2,
there was only one structure of each type, so we could cheat and store it
on the stack.

With HPX Type 3 we get an arbitrary number of entries, so the above model
doesn't scale that well.  Instead of parsing all tables at once, parse and
program each entry separately.  For _HPP and _HPX Types 0 through 2, this
is functionally equivalent.  The change enables the upcoming _HPX Type 3 to
integrate more easily.

Link: https://lore.kernel.org/lkml/20190208162414.3996-3-mr.nuke.me@gmail.com
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
[bhelgaas: fix build errors]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-acpi.c
drivers/pci/probe.c
include/linux/pci_hotplug.h