linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: don't update bridge resource flags according to children
@ 2014-04-30  1:11 Yinghai Lu
  0 siblings, 0 replies; only message in thread
From: Yinghai Lu @ 2014-04-30  1:11 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Benjamin Herrenschmidt, Wei Yang, Gavin Shan, Jack Morgenstein,
	amirv, Or Gerlitz, eugenia, Guo Chao, talal, linux-pci,
	Yinghai Lu

After
	PCI: Try best to allocate pref mmio 64bit above 4g
We don't need to check if children support 64bit, and update
bridge resource flags anymore.
As the new code check size and assign according exact type.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/pci/setup-bus.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Index: linux-2.6/drivers/pci/setup-bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/setup-bus.c
+++ linux-2.6/drivers/pci/setup-bus.c
@@ -926,7 +926,6 @@ static int pbus_size_mem(struct pci_bus
 	int order, max_order;
 	struct resource *b_res = find_free_bus_resource(bus,
 					 mask | IORESOURCE_PREFETCH, type);
-	unsigned int mem64_mask = 0;
 	resource_size_t children_add_size = 0;
 
 	if (!b_res)
@@ -936,9 +935,6 @@ static int pbus_size_mem(struct pci_bus
 	max_order = 0;
 	size = 0;
 
-	mem64_mask = b_res->flags & IORESOURCE_MEM_64;
-	b_res->flags &= ~IORESOURCE_MEM_64;
-
 	list_for_each_entry(dev, &bus->devices, bus_list) {
 		int i;
 
@@ -980,7 +976,6 @@ static int pbus_size_mem(struct pci_bus
 				aligns[order] += align;
 			if (order > max_order)
 				max_order = order;
-			mem64_mask &= r->flags & IORESOURCE_MEM_64;
 
 			if (realloc_head)
 				children_add_size += get_res_add_size(realloc_head, r);
@@ -1005,7 +1000,7 @@ static int pbus_size_mem(struct pci_bus
 	}
 	b_res->start = min_align;
 	b_res->end = size0 + min_align - 1;
-	b_res->flags |= IORESOURCE_STARTALIGN | mem64_mask;
+	b_res->flags |= IORESOURCE_STARTALIGN;
 	if (size1 > size0 && realloc_head) {
 		add_to_list(realloc_head, bus->self, b_res, size1-size0, min_align);
 		dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window "

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-30  1:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30  1:11 [PATCH] PCI: don't update bridge resource flags according to children Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).