summaryrefslogtreecommitdiff
path: root/arch/mips/pci
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-03-24 18:56:25 +0200
committerBjorn Helgaas <bhelgaas@google.com>2026-03-27 10:18:39 -0500
commitf699bcc8bcdf99565928a7b1fc7ee656f6c81815 (patch)
treee1c50dbc2a6c82ed9c243b689e3593d4cb2dbec8 /arch/mips/pci
parentedfaa81d5da5fbfe3c73fece3ca0417a04cc4ba2 (diff)
downloadlwn-f699bcc8bcdf99565928a7b1fc7ee656f6c81815.tar.gz
lwn-f699bcc8bcdf99565928a7b1fc7ee656f6c81815.zip
resource: Pass full extent of empty space to resource_alignf callback
__find_resource_space() calculates the full extent of empty space but only passes the aligned space to resource_alignf callback. In some situations, the callback may choose take advantage of the free space before the requested alignment. Pass the full extent of the calculated empty space to resource_alignf callback as an additional parameter. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Xifer <xiferdev@gmail.com> Link: https://patch.msgid.link/20260324165633.4583-3-ilpo.jarvinen@linux.intel.com
Diffstat (limited to 'arch/mips/pci')
-rw-r--r--arch/mips/pci/pci-generic.c3
-rw-r--r--arch/mips/pci/pci-legacy.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/pci/pci-generic.c b/arch/mips/pci/pci-generic.c
index d2d68bac3d25..f4957c26efc7 100644
--- a/arch/mips/pci/pci-generic.c
+++ b/arch/mips/pci/pci-generic.c
@@ -22,7 +22,8 @@
* which might have be mirrored at 0x0100-0x03ff..
*/
resource_size_t pcibios_align_resource(void *data, const struct resource *res,
- resource_size_t size, resource_size_t align)
+ const struct resource *empty_res,
+ resource_size_t size, resource_size_t align)
{
struct pci_dev *dev = data;
resource_size_t start = res->start;
diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c
index d04b7c1294b6..817e97402afe 100644
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
@@ -52,6 +52,7 @@ unsigned long pci_address_to_pio(phys_addr_t address)
*/
resource_size_t
pcibios_align_resource(void *data, const struct resource *res,
+ const struct resource *empty_res,
resource_size_t size, resource_size_t align)
{
struct pci_dev *dev = data;