Lines Matching refs:align
163 resource_size_t align; in pdev_sort_resources() local
165 align = pci_resource_alignment(dev_res->dev, in pdev_sort_resources()
168 if (r_align > align) { in pdev_sort_resources()
221 resource_size_t add_size, align; in reassign_resources_sorted() local
244 align = add_res->min_align; in reassign_resources_sorted()
246 res->start = align; in reassign_resources_sorted()
254 add_size, align)) in reassign_resources_sorted()
375 resource_size_t add_align, align; in __assign_resources_sorted() local
419 align = pci_resource_alignment(dev_res2->dev, in __assign_resources_sorted()
421 if (add_align > align) { in __assign_resources_sorted()
795 resource_size_t align) in calculate_iosize() argument
812 size = ALIGN(max(size, add_size) + children_add_size, align); in calculate_iosize()
821 resource_size_t align) in calculate_memsize() argument
830 size = ALIGN(max(size, add_size) + children_add_size, align); in calculate_memsize()
846 resource_size_t align = 1, arch_align; in window_alignment() local
849 align = PCI_P2P_DEFAULT_MEM_ALIGN; in window_alignment()
856 align = PCI_P2P_DEFAULT_IO_ALIGN_1K; in window_alignment()
858 align = PCI_P2P_DEFAULT_IO_ALIGN; in window_alignment()
862 return max(align, arch_align); in window_alignment()
887 resource_size_t min_align, align; in pbus_size_io() local
914 align = pci_resource_alignment(dev, r); in pbus_size_io()
915 if (align > min_align) in pbus_size_io()
916 min_align = align; in pbus_size_io()
951 resource_size_t align = 0; in calculate_mem_align() local
960 if (!align) in calculate_mem_align()
962 else if (ALIGN(align + min_align, min_align) < align1) in calculate_mem_align()
964 align += aligns[order]; in calculate_mem_align()
996 resource_size_t min_align, align, size, size0, size1; in pbus_size_mem() local
1046 align = pci_resource_alignment(dev, r); in pbus_size_mem()
1047 order = __ffs(align) - 20; in pbus_size_mem()
1052 i, r, (unsigned long long) align); in pbus_size_mem()
1056 size += max(r_size, align); in pbus_size_mem()
1061 if (r_size <= align) in pbus_size_mem()
1062 aligns[order] += align; in pbus_size_mem()
1892 resource_size_t size, align, tmp; in remove_dev_resource() local
1898 align = pci_resource_alignment(dev, res); in remove_dev_resource()
1899 align = align ? ALIGN(avail->start, align) - avail->start : 0; in remove_dev_resource()
1900 tmp = align + size; in remove_dev_resource()
1951 resource_size_t io_per_b, mmio_per_b, mmio_pref_per_b, align; in pci_bus_distribute_available_resources() local
1961 align = pci_resource_alignment(bridge, io_res); in pci_bus_distribute_available_resources()
1962 if (!io_res->parent && align) in pci_bus_distribute_available_resources()
1963 io.start = min(ALIGN(io.start, align), io.end + 1); in pci_bus_distribute_available_resources()
1965 align = pci_resource_alignment(bridge, mmio_res); in pci_bus_distribute_available_resources()
1966 if (!mmio_res->parent && align) in pci_bus_distribute_available_resources()
1967 mmio.start = min(ALIGN(mmio.start, align), mmio.end + 1); in pci_bus_distribute_available_resources()
1969 align = pci_resource_alignment(bridge, mmio_pref_res); in pci_bus_distribute_available_resources()
1970 if (!mmio_pref_res->parent && align) in pci_bus_distribute_available_resources()
1971 mmio_pref.start = min(ALIGN(mmio_pref.start, align), in pci_bus_distribute_available_resources()
2046 align = pci_resource_alignment(dev, res); in pci_bus_distribute_available_resources()
2047 io.end = align ? io.start + ALIGN_DOWN(io_per_b, align) - 1 in pci_bus_distribute_available_resources()
2059 align = pci_resource_alignment(dev, res); in pci_bus_distribute_available_resources()
2060 mmio.end = align ? mmio.start + ALIGN_DOWN(mmio_per_b, align) - 1 in pci_bus_distribute_available_resources()
2065 align = pci_resource_alignment(dev, res); in pci_bus_distribute_available_resources()
2066 mmio_pref.end = align ? mmio_pref.start + in pci_bus_distribute_available_resources()
2067 ALIGN_DOWN(mmio_pref_per_b, align) - 1 in pci_bus_distribute_available_resources()