Skip to content

Commit

Permalink
PCI: Pass type, width, and prefetchability for window alignment
Browse files Browse the repository at this point in the history
When calculating window_alignment(), type information like IORESOURCE_MEM
and IORESOURCE_PREFETCH may not be enough.  For example, on powernv, we
need to know whether the window is 64-bit or not.

This patch passes the full resource type (res->flags) for window alignment.

[bhelgaas: changelog]
Signed-off-by: Wei Yang <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Gavin Shan <[email protected]>
  • Loading branch information
Wei Yang authored and bjorn-helgaas committed Sep 25, 2013
1 parent 77a0dfc commit 3ad94b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
}

min_align = calculate_mem_align(aligns, max_order);
min_align = max(min_align, window_alignment(bus, b_res->flags & mask));
min_align = max(min_align, window_alignment(bus, b_res->flags));
size0 = calculate_memsize(size, min_size, 0, resource_size(b_res), min_align);
if (children_add_size > add_size)
add_size = children_add_size;
Expand Down

0 comments on commit 3ad94b0

Please sign in to comment.