From: Wei Yang Date: Fri, 6 Sep 2013 01:45:58 +0000 (+0800) Subject: PCI: Pass type, width, and prefetchability for window alignment X-Git-Tag: v3.13-rc1~95^2~9^2~4 X-Git-Url: http://pileus.org/git/?p=~andy%2Flinux;a=commitdiff_plain;h=3ad94b0d795c50836160781e63ee6bb752766aaf PCI: Pass type, width, and prefetchability for window alignment 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 Signed-off-by: Bjorn Helgaas Acked-by: Gavin Shan --- diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8df686c48bd..4ce83b26ae9 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -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;