Alpha arch development list
 help / color / mirror / Atom feed
* [PATCH 02/13] alpha/PCI: Convert to pci_bus_size_and_assign_resources()
       [not found] <20261116152403.2672-1-ilpo.jarvinen@linux.intel.com>
@ 2026-11-16 15:23 ` Ilpo Järvinen
  0 siblings, 0 replies; only message in thread
From: Ilpo Järvinen @ 2026-11-16 15:23 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas, Lorenzo Pieralisi, Rob Herring,
	Krzysztof Wilczyński, Richard Henderson, Matt Turner,
	Magnus Lindholm, linux-alpha, linux-kernel
  Cc: Ilpo Järvinen

To serialize bridge window sizing and resource assignment, PCI core
needs to hold locks across both phases. Alpha nautilus PCI code calls
pci_bus_size_bridges() and pci_bus_assign_resources() separately
because it needs to do special resource alignment and setup after the
window sizes have been calculated. At least the former would seem to
belong to some existing __weak pcibios_*() hook but the latter might
need yet another pcibios_*() hook just for this single use.

The nautilus code runs during init, so nothing is likely to race with
it. Converting it is mainly about consolidating the sizing and
assignment entry points of PCI core, which eventually allows removing
pci_bus_assign_resources().

Instead of trying to do a complex rework of the code, which is risky
without the ability to test on the hardware, simply convert
pci_bus_assign_resources() to pci_bus_size_and_assign_resources(). This
adds a small bit of extra work by performing the sizing step again, but
the calculations should yield the same sizes, so it seems safe.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 arch/alpha/kernel/sys_nautilus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
index 13b79960b4b9..23a74fd4a83f 100644
--- a/arch/alpha/kernel/sys_nautilus.c
+++ b/arch/alpha/kernel/sys_nautilus.c
@@ -263,7 +263,7 @@ nautilus_init_pci(void)
 	if ((IRONGATE0->dev_vendor >> 16) > 0x7006)	/* Albacore? */
 		IRONGATE0->pci_mem = pci_mem;
 
-	pci_bus_assign_resources(bus);
+	pci_bus_size_and_assign_resources(bus);
 	pci_bus_add_devices(bus);
 }
 
-- 
2.47.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-16 15:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261116152403.2672-1-ilpo.jarvinen@linux.intel.com>
2026-11-16 15:23 ` [PATCH 02/13] alpha/PCI: Convert to pci_bus_size_and_assign_resources() Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox