Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Ilpo Järvinen and committed by
Bjorn Helgaas
8bbe8cec 38ec53e1

+6 -3
+3
drivers/pci/pci.h
··· 1053 1053 return resource_alignment(res); 1054 1054 } 1055 1055 1056 + resource_size_t pci_min_window_alignment(struct pci_bus *bus, 1057 + unsigned long type); 1058 + 1056 1059 void pci_acs_init(struct pci_dev *dev); 1057 1060 void pci_enable_acs(struct pci_dev *dev); 1058 1061 #ifdef CONFIG_PCI_QUIRKS
+3 -3
drivers/pci/setup-bus.c
··· 1035 1035 #define PCI_P2P_DEFAULT_IO_ALIGN SZ_4K 1036 1036 #define PCI_P2P_DEFAULT_IO_ALIGN_1K SZ_1K 1037 1037 1038 - static resource_size_t window_alignment(struct pci_bus *bus, unsigned long type) 1038 + resource_size_t pci_min_window_alignment(struct pci_bus *bus, unsigned long type) 1039 1039 { 1040 1040 resource_size_t align = 1, arch_align; 1041 1041 ··· 1084 1084 if (resource_assigned(b_res)) 1085 1085 return; 1086 1086 1087 - min_align = window_alignment(bus, IORESOURCE_IO); 1087 + min_align = pci_min_window_alignment(bus, IORESOURCE_IO); 1088 1088 list_for_each_entry(dev, &bus->devices, bus_list) { 1089 1089 struct resource *r; 1090 1090 ··· 1339 1339 } 1340 1340 } 1341 1341 1342 - win_align = window_alignment(bus, b_res->flags); 1342 + win_align = pci_min_window_alignment(bus, b_res->flags); 1343 1343 min_align = calculate_head_align(aligns, max_order); 1344 1344 min_align = max(min_align, win_align); 1345 1345 size0 = calculate_memsize(size, realloc_head ? 0 : add_size,