mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
PCI: Rename window_alignment() to pci_min_window_alignment()
window_alignment() lacks prefix. Rename it to pci_min_window_alignment() in order to include the prefix and also add min to indicate the returned window alignment is the minimum PCI spec and arch allows. Also make it available in drivers/pci/pci.h as upcoming changes will need to call it from outside of setup-bus.c. 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-9-ilpo.jarvinen@linux.intel.com
This commit is contained in:
parent
38ec53e16f
commit
8bbe8cec89
|
|
@ -1053,6 +1053,9 @@ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,
|
|||
return resource_alignment(res);
|
||||
}
|
||||
|
||||
resource_size_t pci_min_window_alignment(struct pci_bus *bus,
|
||||
unsigned long type);
|
||||
|
||||
void pci_acs_init(struct pci_dev *dev);
|
||||
void pci_enable_acs(struct pci_dev *dev);
|
||||
#ifdef CONFIG_PCI_QUIRKS
|
||||
|
|
|
|||
|
|
@ -1035,7 +1035,7 @@ resource_size_t __weak pcibios_window_alignment(struct pci_bus *bus,
|
|||
#define PCI_P2P_DEFAULT_IO_ALIGN SZ_4K
|
||||
#define PCI_P2P_DEFAULT_IO_ALIGN_1K SZ_1K
|
||||
|
||||
static resource_size_t window_alignment(struct pci_bus *bus, unsigned long type)
|
||||
resource_size_t pci_min_window_alignment(struct pci_bus *bus, unsigned long type)
|
||||
{
|
||||
resource_size_t align = 1, arch_align;
|
||||
|
||||
|
|
@ -1084,7 +1084,7 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t add_size,
|
|||
if (resource_assigned(b_res))
|
||||
return;
|
||||
|
||||
min_align = window_alignment(bus, IORESOURCE_IO);
|
||||
min_align = pci_min_window_alignment(bus, IORESOURCE_IO);
|
||||
list_for_each_entry(dev, &bus->devices, bus_list) {
|
||||
struct resource *r;
|
||||
|
||||
|
|
@ -1339,7 +1339,7 @@ static void pbus_size_mem(struct pci_bus *bus, struct resource *b_res,
|
|||
}
|
||||
}
|
||||
|
||||
win_align = window_alignment(bus, b_res->flags);
|
||||
win_align = pci_min_window_alignment(bus, b_res->flags);
|
||||
min_align = calculate_head_align(aligns, max_order);
|
||||
min_align = max(min_align, win_align);
|
||||
size0 = calculate_memsize(size, realloc_head ? 0 : add_size,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user