linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] PCI: clip firmware assigned resources
@ 2015-01-15  4:31 Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 01/10] PCI: clip firmware assigned resource under parent bridge's Yinghai Lu
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Yinghai Lu

During the fix https://bugzilla.kernel.org/show_bug.cgi?id=85491,
Bjorn suggest that we should clip the resources instead of just
reject them.

We should only need first two for x86. others for related arches
to keep them consistent.

-v2: only handle bridge resource, and add pci_claim_bridge_resource
	in pci core code.

Thanks

Yinghai

Yinghai Lu (10):
  PCI: clip firmware assigned resource under parent bridge's
  PCI, x86: clip firmware assigned resource under parent bridge's
  PCI, alpha: clip firmware assigned resource under parent bridge's
  PCI, frv: clip firmware assigned resource under parent bridge's
  PCI, ia64: clip firmware assigned resource under parent bridge's
  PCI, microblaze: clip firmware assigned resource under parent bridge's
  PCI, mn10300: clip firmware assigned resource under parent bridge's
  PCI, parisc: clip firmware assigned resource under parent bridge's
  PCI, powerpc: clip firmware assigned resource under parent bridge's
  PCI, sparc: clip firmware assigned resource under parent bridge's

 arch/alpha/kernel/pci.c                 |  8 +++--
 arch/frv/mb93090-mb00/pci-frv.c         |  2 +-
 arch/ia64/pci/pci.c                     | 48 +++++++++++++---------------
 arch/microblaze/pci/pci-common.c        | 13 +++++++-
 arch/mn10300/unit-asb2305/pci-asb2305.c |  2 +-
 arch/mn10300/unit-asb2305/pci.c         | 47 +++++++++++++--------------
 arch/powerpc/kernel/pci-common.c        | 12 ++++++-
 arch/sparc/kernel/pci.c                 |  5 ++-
 arch/x86/pci/i386.c                     |  2 +-
 drivers/parisc/lba_pci.c                |  5 ++-
 drivers/pci/bus.c                       | 39 +++++++++++++++++++++++
 drivers/pci/pci.h                       |  1 +
 drivers/pci/setup-bus.c                 | 56 ++++++++++++++++++++++++++-------
 include/linux/pci.h                     |  1 +
 14 files changed, 165 insertions(+), 76 deletions(-)

-- 
1.8.4.5


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2 01/10] PCI: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 02/10] PCI, x86: " Yinghai Lu
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Yinghai Lu

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

This one is core part, arch changes will be in following patches.

-v2: add pci_claim_bridge_resource to core according to Bjorn.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
 drivers/pci/bus.c       | 39 ++++++++++++++++++++++++++++++++++
 drivers/pci/pci.h       |  1 +
 drivers/pci/setup-bus.c | 56 ++++++++++++++++++++++++++++++++++++++-----------
 include/linux/pci.h     |  1 +
 4 files changed, 85 insertions(+), 12 deletions(-)

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 73aef51..a1943c3 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -228,6 +228,45 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
 }
 EXPORT_SYMBOL(pci_bus_alloc_resource);
 
+bool pci_bus_clip_resource(struct pci_dev *dev, int idx)
+{
+	struct pci_bus *bus = dev->bus;
+	struct resource *res = &dev->resource[idx];
+	struct resource orig_res = *res;
+	struct resource *r;
+	int i;
+
+	pci_bus_for_each_resource(bus, r, i) {
+		resource_size_t start, end;
+
+		if (!r)
+			continue;
+
+		if (resource_type(res) != resource_type(r))
+			continue;
+
+		start = max(r->start, res->start);
+		end = min(r->end, res->end);
+
+		/* no overlap ? */
+		if (start > end)
+			continue;
+
+		if (res->start == start && res->end == end)
+			return false;
+
+		/* changed */
+		res->start = start;
+		res->end = end;
+		dev_printk(KERN_DEBUG, &dev->dev, "%pR ==> %pR\n",
+				 &orig_res, res);
+
+		return true;
+	}
+
+	return false;
+}
+
 void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { }
 
 /**
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 8aff29a..d54632a 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -208,6 +208,7 @@ void __pci_bus_size_bridges(struct pci_bus *bus,
 void __pci_bus_assign_resources(const struct pci_bus *bus,
 				struct list_head *realloc_head,
 				struct list_head *fail_head);
+bool pci_bus_clip_resource(struct pci_dev *dev, int idx);
 
 /**
  * pci_ari_enabled - query ARI forwarding status
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 0482235..0b1b9ea 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -530,9 +530,8 @@ EXPORT_SYMBOL(pci_setup_cardbus);
    config space writes, so it's quite possible that an I/O window of
    the bridge will have some undesirable address (e.g. 0) after the
    first write. Ditto 64-bit prefetchable MMIO.  */
-static void pci_setup_bridge_io(struct pci_bus *bus)
+static void pci_setup_bridge_io(struct pci_dev *bridge)
 {
-	struct pci_dev *bridge = bus->self;
 	struct resource *res;
 	struct pci_bus_region region;
 	unsigned long io_mask;
@@ -545,7 +544,7 @@ static void pci_setup_bridge_io(struct pci_bus *bus)
 		io_mask = PCI_IO_1K_RANGE_MASK;
 
 	/* Set up the top and bottom of the PCI I/O segment for this bus. */
-	res = bus->resource[0];
+	res = &bridge->resource[PCI_BRIDGE_RESOURCES];
 	pcibios_resource_to_bus(bridge->bus, &region, res);
 	if (res->flags & IORESOURCE_IO) {
 		pci_read_config_word(bridge, PCI_IO_BASE, &l);
@@ -568,15 +567,14 @@ static void pci_setup_bridge_io(struct pci_bus *bus)
 	pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, io_upper16);
 }
 
-static void pci_setup_bridge_mmio(struct pci_bus *bus)
+static void pci_setup_bridge_mmio(struct pci_dev *bridge)
 {
-	struct pci_dev *bridge = bus->self;
 	struct resource *res;
 	struct pci_bus_region region;
 	u32 l;
 
 	/* Set up the top and bottom of the PCI Memory segment for this bus. */
-	res = bus->resource[1];
+	res = &bridge->resource[PCI_BRIDGE_RESOURCES + 1];
 	pcibios_resource_to_bus(bridge->bus, &region, res);
 	if (res->flags & IORESOURCE_MEM) {
 		l = (region.start >> 16) & 0xfff0;
@@ -588,9 +586,8 @@ static void pci_setup_bridge_mmio(struct pci_bus *bus)
 	pci_write_config_dword(bridge, PCI_MEMORY_BASE, l);
 }
 
-static void pci_setup_bridge_mmio_pref(struct pci_bus *bus)
+static void pci_setup_bridge_mmio_pref(struct pci_dev *bridge)
 {
-	struct pci_dev *bridge = bus->self;
 	struct resource *res;
 	struct pci_bus_region region;
 	u32 l, bu, lu;
@@ -602,7 +599,7 @@ static void pci_setup_bridge_mmio_pref(struct pci_bus *bus)
 
 	/* Set up PREF base/limit. */
 	bu = lu = 0;
-	res = bus->resource[2];
+	res = &bridge->resource[PCI_BRIDGE_RESOURCES + 2];
 	pcibios_resource_to_bus(bridge->bus, &region, res);
 	if (res->flags & IORESOURCE_PREFETCH) {
 		l = (region.start >> 16) & 0xfff0;
@@ -630,13 +627,13 @@ static void __pci_setup_bridge(struct pci_bus *bus, unsigned long type)
 		 &bus->busn_res);
 
 	if (type & IORESOURCE_IO)
-		pci_setup_bridge_io(bus);
+		pci_setup_bridge_io(bridge);
 
 	if (type & IORESOURCE_MEM)
-		pci_setup_bridge_mmio(bus);
+		pci_setup_bridge_mmio(bridge);
 
 	if (type & IORESOURCE_PREFETCH)
-		pci_setup_bridge_mmio_pref(bus);
+		pci_setup_bridge_mmio_pref(bridge);
 
 	pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl);
 }
@@ -649,6 +646,41 @@ void pci_setup_bridge(struct pci_bus *bus)
 	__pci_setup_bridge(bus, type);
 }
 
+
+int pci_claim_bridge_resource(struct pci_dev *bridge, int i)
+{
+	if (i < PCI_BRIDGE_RESOURCES || i > PCI_BRIDGE_RESOURCE_END)
+		return 0;
+
+	if (pci_claim_resource(bridge, i) == 0)
+		return 0;	/* claimed the window */
+
+	if ((bridge->class >> 8) != PCI_CLASS_BRIDGE_PCI)
+		return 0;
+
+	if (!pci_bus_clip_resource(bridge, i))
+		return -EINVAL;	/* clipping didn't change anything */
+
+	switch (i - PCI_BRIDGE_RESOURCES) {
+	case 0:
+		pci_setup_bridge_io(bridge);
+		break;
+	case 1:
+		pci_setup_bridge_mmio(bridge);
+		break;
+	case 2:
+		pci_setup_bridge_mmio_pref(bridge);
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	if (pci_claim_resource(bridge, i) == 0)
+		return 0;         /* claimed a smaller window */
+
+	return -EINVAL;
+}
+
 /* Check whether the bridge supports optional I/O and
    prefetchable memory ranges. If not, the respective
    base/limit registers must be read-only and read as 0. */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 360a966..8e84393 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1065,6 +1065,7 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx);
 void pci_bus_assign_resources(const struct pci_bus *bus);
 void pci_bus_size_bridges(struct pci_bus *bus);
 int pci_claim_resource(struct pci_dev *, int);
+int pci_claim_bridge_resource(struct pci_dev *bridge, int i);
 void pci_assign_unassigned_resources(void);
 void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
 void pci_assign_unassigned_bus_resources(struct pci_bus *bus);
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 02/10] PCI, x86: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 01/10] PCI: clip firmware assigned resource under parent bridge's Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 03/10] PCI, alpha: " Yinghai Lu
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, x86

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Tested-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
---
 arch/x86/pci/i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 9b18ef3..349c0d3 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -216,7 +216,7 @@ static void pcibios_allocate_bridge_resources(struct pci_dev *dev)
 			continue;
 		if (r->parent)	/* Already allocated */
 			continue;
-		if (!r->start || pci_claim_resource(dev, idx) < 0) {
+		if (!r->start || pci_claim_bridge_resource(dev, idx) < 0) {
 			/*
 			 * Something is wrong with the region.
 			 * Invalidate the resource to prevent
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 03/10] PCI, alpha: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 01/10] PCI: clip firmware assigned resource under parent bridge's Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 02/10] PCI, x86: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 04/10] PCI, frv: " Yinghai Lu
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
---
 arch/alpha/kernel/pci.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 076c35c..98a1525 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -285,8 +285,12 @@ pcibios_claim_one_bus(struct pci_bus *b)
 			if (r->parent || !r->start || !r->flags)
 				continue;
 			if (pci_has_flag(PCI_PROBE_ONLY) ||
-			    (r->flags & IORESOURCE_PCI_FIXED))
-				pci_claim_resource(dev, i);
+			    (r->flags & IORESOURCE_PCI_FIXED)) {
+				if (pci_claim_resource(dev, i) == 0)
+					continue;
+
+				pci_claim_bridge_resource(dev, i);
+			}
 		}
 	}
 
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 04/10] PCI, frv: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (2 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 03/10] PCI, alpha: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:51   ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 05/10] PCI, ia64: " Yinghai Lu
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, David Howells, Paul Gortmaker

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/frv/mb93090-mb00/pci-frv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
index 67b1d16..9e49c3e 100644
--- a/arch/frv/mb93090-mb00/pci-frv.c
+++ b/arch/frv/mb93090-mb00/pci-frv.c
@@ -94,7 +94,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
 				r = &dev->resource[idx];
 				if (!r->start)
 					continue;
-				pci_claim_resource(dev, idx);
+				pci_claim_bridge_resource(dev, idx)
 			}
 		}
 		pcibios_allocate_bus_resources(&bus->children);
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 05/10] PCI, ia64: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (3 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 04/10] PCI, frv: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 06/10] PCI, microblaze: " Yinghai Lu
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, Tony Luck, Fenghua Yu,
	Rafael J. Wysocki, linux-ia64

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: linux-ia64@vger.kernel.org
---
 arch/ia64/pci/pci.c | 48 +++++++++++++++++++++---------------------------
 1 file changed, 21 insertions(+), 27 deletions(-)

diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 291a582..900cc93 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -487,45 +487,39 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
 	return 0;
 }
 
-static int is_valid_resource(struct pci_dev *dev, int idx)
+void pcibios_fixup_device_resources(struct pci_dev *dev)
 {
-	unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
-	struct resource *devr = &dev->resource[idx], *busr;
+	int idx;
 
 	if (!dev->bus)
-		return 0;
-
-	pci_bus_for_each_resource(dev->bus, busr, i) {
-		if (!busr || ((busr->flags ^ devr->flags) & type_mask))
-			continue;
-		if ((devr->start) && (devr->start >= busr->start) &&
-				(devr->end <= busr->end))
-			return 1;
-	}
-	return 0;
-}
+		return;
 
-static void pcibios_fixup_resources(struct pci_dev *dev, int start, int limit)
-{
-	int i;
+	for (idx = 0; idx < PCI_BRIDGE_RESOURCES; idx++) {
+		struct resource *r = &dev->resource[idx];
 
-	for (i = start; i < limit; i++) {
-		if (!dev->resource[i].flags)
+		if (!r->flags || r->parent || !r->start)
 			continue;
-		if ((is_valid_resource(dev, i)))
-			pci_claim_resource(dev, i);
-	}
-}
 
-void pcibios_fixup_device_resources(struct pci_dev *dev)
-{
-	pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES);
+		pci_claim_resource(dev, idx);
+	}
 }
 EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources);
 
 static void pcibios_fixup_bridge_resources(struct pci_dev *dev)
 {
-	pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES);
+	int idx;
+
+	if (!dev->bus)
+		return;
+
+	for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
+		struct resource *r = &dev->resource[idx];
+
+		if (!r->flags || r->parent || !r->start)
+			continue;
+
+		pci_claim_bridge_resource(dev, idx);
+	}
 }
 
 /*
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 06/10] PCI, microblaze: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (4 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 05/10] PCI, ia64: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 07/10] PCI, mn10300: " Yinghai Lu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, Michal Simek,
	Benjamin Herrenschmidt, Sebastian Ott

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
---
 arch/microblaze/pci/pci-common.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index b30e41c..48528fb 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -1026,6 +1026,8 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus)
 			 pr, (pr && pr->name) ? pr->name : "nil");
 
 		if (pr && !(pr->flags & IORESOURCE_UNSET)) {
+			struct pci_dev *dev = bus->self;
+
 			if (request_resource(pr, res) == 0)
 				continue;
 			/*
@@ -1035,6 +1037,12 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus)
 			 */
 			if (reparent_resources(pr, res) == 0)
 				continue;
+
+			if (dev && i < PCI_BRIDGE_RESOURCE_NUM &&
+			    pci_claim_bridge_resource(dev,
+						 i + PCI_BRIDGE_RESOURCES) == 0)
+				continue;
+
 		}
 		pr_warn("PCI: Cannot allocate resource region ");
 		pr_cont("%d of PCI bridge %d, will remap\n", i, bus->number);
@@ -1227,7 +1235,10 @@ void pcibios_claim_one_bus(struct pci_bus *bus)
 				 (unsigned long long)r->end,
 				 (unsigned int)r->flags);
 
-			pci_claim_resource(dev, i);
+			if (pci_claim_resource(dev, i) == 0)
+				continue;
+
+			pci_claim_bridge_resource(dev, i);
 		}
 	}
 
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 07/10] PCI, mn10300: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (5 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 06/10] PCI, microblaze: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 08/10] PCI, parisc: " Yinghai Lu
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, David Howells,
	Koichi Yasutake, linux-am33-list

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: linux-am33-list@redhat.com
---
 arch/mn10300/unit-asb2305/pci-asb2305.c |  2 +-
 arch/mn10300/unit-asb2305/pci.c         | 47 +++++++++++++++------------------
 2 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.c b/arch/mn10300/unit-asb2305/pci-asb2305.c
index febb9cd..b5b036f 100644
--- a/arch/mn10300/unit-asb2305/pci-asb2305.c
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.c
@@ -106,7 +106,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
 				if (!r->flags)
 					continue;
 				if (!r->start ||
-				    pci_claim_resource(dev, idx) < 0) {
+				    pci_claim_bridge_resource(dev, idx) < 0) {
 					printk(KERN_ERR "PCI:"
 					       " Cannot allocate resource"
 					       " region %d of bridge %s\n",
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c
index 6b4339f..471ff39 100644
--- a/arch/mn10300/unit-asb2305/pci.c
+++ b/arch/mn10300/unit-asb2305/pci.c
@@ -281,42 +281,37 @@ static int __init pci_check_direct(void)
 	return -ENODEV;
 }
 
-static int is_valid_resource(struct pci_dev *dev, int idx)
+static void pcibios_fixup_device_resources(struct pci_dev *dev)
 {
-	unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
-	struct resource *devr = &dev->resource[idx], *busr;
-
-	if (dev->bus) {
-		pci_bus_for_each_resource(dev->bus, busr, i) {
-			if (!busr || (busr->flags ^ devr->flags) & type_mask)
-				continue;
-
-			if (devr->start &&
-			    devr->start >= busr->start &&
-			    devr->end <= busr->end)
-				return 1;
-		}
-	}
+	int idx;
 
-	return 0;
+	if (!dev->bus)
+		return;
+
+	for (idx = 0; idx < PCI_BRIDGE_RESOURCES; idx++) {
+		struct resource *r = &dev->resource[idx];
+
+		if (!r->flags || r->parent || !r->start)
+			continue;
+
+		pci_claim_resource(dev, idx);
+	}
 }
 
-static void pcibios_fixup_device_resources(struct pci_dev *dev)
+static void pcibios_fixup_bridge_resources(struct pci_dev *dev)
 {
-	int limit, i;
+	int idx;
 
-	if (dev->bus->number != 0)
+	if (!dev->bus)
 		return;
 
-	limit = (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) ?
-		PCI_BRIDGE_RESOURCES : PCI_NUM_RESOURCES;
+	for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
+		struct resource *r = &dev->resource[idx];
 
-	for (i = 0; i < limit; i++) {
-		if (!dev->resource[i].flags)
+		if (!r->flags || r->parent || !r->start)
 			continue;
 
-		if (is_valid_resource(dev, i))
-			pci_claim_resource(dev, i);
+		pci_claim_bridge_resource(dev, idx);
 	}
 }
 
@@ -330,7 +325,7 @@ void pcibios_fixup_bus(struct pci_bus *bus)
 
 	if (bus->self) {
 		pci_read_bridge_bases(bus);
-		pcibios_fixup_device_resources(bus->self);
+		pcibios_fixup_bridge_resources(bus->self);
 	}
 
 	list_for_each_entry(dev, &bus->devices, bus_list)
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 08/10] PCI, parisc: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (6 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 07/10] PCI, mn10300: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 09/10] PCI, powerpc: " Yinghai Lu
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, James E.J. Bottomley,
	Helge Deller, linux-parisc

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
---
 drivers/parisc/lba_pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index 37e71ff..dceb9dd 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -694,9 +694,8 @@ lba_fixup_bus(struct pci_bus *bus)
 		int i;
 		/* PCI-PCI Bridge */
 		pci_read_bridge_bases(bus);
-		for (i = PCI_BRIDGE_RESOURCES; i < PCI_NUM_RESOURCES; i++) {
-			pci_claim_resource(bus->self, i);
-		}
+		for (i = PCI_BRIDGE_RESOURCES; i < PCI_NUM_RESOURCES; i++)
+			pci_claim_bridge_resource(bus->self, i);
 	} else {
 		/* Host-PCI Bridge */
 		int err;
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 09/10] PCI, powerpc: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (7 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 08/10] PCI, parisc: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-15  4:31 ` [PATCH v2 10/10] PCI, sparc: " Yinghai Lu
  2015-01-15 22:24 ` [PATCH v2 00/10] PCI: clip firmware assigned resources Bjorn Helgaas
  10 siblings, 0 replies; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, Gavin Shan, Anton Blanchard,
	Sebastian Ott, Wei Yang, Andrew Murray, linuxppc-dev

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: Andrew Murray <amurray@embedded-bits.co.uk>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/kernel/pci-common.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 37d512d..2a525c9 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1184,6 +1184,8 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus)
 			 pr, (pr && pr->name) ? pr->name : "nil");
 
 		if (pr && !(pr->flags & IORESOURCE_UNSET)) {
+			struct pci_dev *dev = bus->self;
+
 			if (request_resource(pr, res) == 0)
 				continue;
 			/*
@@ -1193,6 +1195,11 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus)
 			 */
 			if (reparent_resources(pr, res) == 0)
 				continue;
+
+			if (dev && i < PCI_BRIDGE_RESOURCE_NUM &&
+			    pci_claim_bridge_resource(dev,
+						i + PCI_BRIDGE_RESOURCES) == 0)
+				continue;
 		}
 		pr_warning("PCI: Cannot allocate resource region "
 			   "%d of PCI bridge %d, will remap\n", i, bus->number);
@@ -1401,7 +1408,10 @@ void pcibios_claim_one_bus(struct pci_bus *bus)
 				 (unsigned long long)r->end,
 				 (unsigned int)r->flags);
 
-			pci_claim_resource(dev, i);
+			if (pci_claim_resource(dev, i) == 0)
+				continue;
+
+			pci_claim_bridge_resource(dev, i);
 		}
 	}
 
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 10/10] PCI, sparc: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (8 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 09/10] PCI, powerpc: " Yinghai Lu
@ 2015-01-15  4:31 ` Yinghai Lu
  2015-01-16  0:14   ` David Miller
  2015-01-15 22:24 ` [PATCH v2 00/10] PCI: clip firmware assigned resources Bjorn Helgaas
  10 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:31 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Yinghai Lu, David S. Miller,
	Paul Gortmaker, Yijing Wang, Sam Ravnborg, sparclinux

Some bios put range that is not fully coverred by root bus resources.
Try to clip them and update them in pci bridge bars.

We'd like to fix other arches instead of just x86.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik <kordikmarek@gmail.com>
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Yijing Wang <wangyijing@huawei.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/kernel/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index b36365f..9ce5afe 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -639,7 +639,10 @@ static void pci_claim_bus_resources(struct pci_bus *bus)
 				       (unsigned long long)r->end,
 				       (unsigned int)r->flags);
 
-			pci_claim_resource(dev, i);
+			if (pci_claim_resource(dev, i) == 0)
+				continue;
+
+			pci_claim_bridge_resource(dev, i);
 		}
 	}
 
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 04/10] PCI, frv: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 ` [PATCH v2 04/10] PCI, frv: " Yinghai Lu
@ 2015-01-15  4:51   ` Yinghai Lu
  2015-01-15 16:19     ` Bjorn Helgaas
  0 siblings, 1 reply; 15+ messages in thread
From: Yinghai Lu @ 2015-01-15  4:51 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Linux Kernel Mailing List, Yinghai Lu, David Howells,
	Paul Gortmaker

On Wed, Jan 14, 2015 at 8:31 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> Some bios put range that is not fully coverred by root bus resources.
> Try to clip them and update them in pci bridge bars.
>
> We'd like to fix other arches instead of just x86.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
> Reported-by: Marek Kordik <kordikmarek@gmail.com>
> Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  arch/frv/mb93090-mb00/pci-frv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
> index 67b1d16..9e49c3e 100644
> --- a/arch/frv/mb93090-mb00/pci-frv.c
> +++ b/arch/frv/mb93090-mb00/pci-frv.c
> @@ -94,7 +94,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
>                                 r = &dev->resource[idx];
>                                 if (!r->start)
>                                         continue;
> -                               pci_claim_resource(dev, idx);
> +                               pci_claim_bridge_resource(dev, idx)

miss ; here.

Please let me know if you can fix it manually.

Sorry about that.

Thanks

Yinghai

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 04/10] PCI, frv: clip firmware assigned resource under parent bridge's
  2015-01-15  4:51   ` Yinghai Lu
@ 2015-01-15 16:19     ` Bjorn Helgaas
  0 siblings, 0 replies; 15+ messages in thread
From: Bjorn Helgaas @ 2015-01-15 16:19 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: linux-pci, Linux Kernel Mailing List, David Howells, Paul Gortmaker

On Wed, Jan 14, 2015 at 08:51:22PM -0800, Yinghai Lu wrote:
> On Wed, Jan 14, 2015 at 8:31 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> > Some bios put range that is not fully coverred by root bus resources.
> > Try to clip them and update them in pci bridge bars.
> >
> > We'd like to fix other arches instead of just x86.
> >
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
> > Reported-by: Marek Kordik <kordikmarek@gmail.com>
> > Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > Cc: David Howells <dhowells@redhat.com>
> > Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> > ---
> >  arch/frv/mb93090-mb00/pci-frv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
> > index 67b1d16..9e49c3e 100644
> > --- a/arch/frv/mb93090-mb00/pci-frv.c
> > +++ b/arch/frv/mb93090-mb00/pci-frv.c
> > @@ -94,7 +94,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
> >                                 r = &dev->resource[idx];
> >                                 if (!r->start)
> >                                         continue;
> > -                               pci_claim_resource(dev, idx);
> > +                               pci_claim_bridge_resource(dev, idx)
> 
> miss ; here.
> 
> Please let me know if you can fix it manually.

Fixed, thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 00/10] PCI: clip firmware assigned resources
  2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
                   ` (9 preceding siblings ...)
  2015-01-15  4:31 ` [PATCH v2 10/10] PCI, sparc: " Yinghai Lu
@ 2015-01-15 22:24 ` Bjorn Helgaas
  10 siblings, 0 replies; 15+ messages in thread
From: Bjorn Helgaas @ 2015-01-15 22:24 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: linux-pci, linux-kernel

On Wed, Jan 14, 2015 at 08:31:27PM -0800, Yinghai Lu wrote:
> During the fix https://bugzilla.kernel.org/show_bug.cgi?id=85491,
> Bjorn suggest that we should clip the resources instead of just
> reject them.
> 
> We should only need first two for x86. others for related arches
> to keep them consistent.
> 
> -v2: only handle bridge resource, and add pci_claim_bridge_resource
> 	in pci core code.
> 
> Thanks
> 
> Yinghai
> 
> Yinghai Lu (10):
>   PCI: clip firmware assigned resource under parent bridge's
>   PCI, x86: clip firmware assigned resource under parent bridge's
>   PCI, alpha: clip firmware assigned resource under parent bridge's
>   PCI, frv: clip firmware assigned resource under parent bridge's
>   PCI, ia64: clip firmware assigned resource under parent bridge's
>   PCI, microblaze: clip firmware assigned resource under parent bridge's
>   PCI, mn10300: clip firmware assigned resource under parent bridge's
>   PCI, parisc: clip firmware assigned resource under parent bridge's
>   PCI, powerpc: clip firmware assigned resource under parent bridge's
>   PCI, sparc: clip firmware assigned resource under parent bridge's
> 
>  arch/alpha/kernel/pci.c                 |  8 +++--
>  arch/frv/mb93090-mb00/pci-frv.c         |  2 +-
>  arch/ia64/pci/pci.c                     | 48 +++++++++++++---------------
>  arch/microblaze/pci/pci-common.c        | 13 +++++++-
>  arch/mn10300/unit-asb2305/pci-asb2305.c |  2 +-
>  arch/mn10300/unit-asb2305/pci.c         | 47 +++++++++++++--------------
>  arch/powerpc/kernel/pci-common.c        | 12 ++++++-
>  arch/sparc/kernel/pci.c                 |  5 ++-
>  arch/x86/pci/i386.c                     |  2 +-
>  drivers/parisc/lba_pci.c                |  5 ++-
>  drivers/pci/bus.c                       | 39 +++++++++++++++++++++++
>  drivers/pci/pci.h                       |  1 +
>  drivers/pci/setup-bus.c                 | 56 ++++++++++++++++++++++++++-------
>  include/linux/pci.h                     |  1 +
>  14 files changed, 165 insertions(+), 76 deletions(-)

Applied to for-linus for v3.19, thanks.  This is significantly different
from v1, so I didn't add acks and testing info from Helge and Wei.

Bjorn

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 10/10] PCI, sparc: clip firmware assigned resource under parent bridge's
  2015-01-15  4:31 ` [PATCH v2 10/10] PCI, sparc: " Yinghai Lu
@ 2015-01-16  0:14   ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2015-01-16  0:14 UTC (permalink / raw)
  To: yinghai
  Cc: bhelgaas, linux-pci, linux-kernel, paul.gortmaker, wangyijing,
	sam, sparclinux

From: Yinghai Lu <yinghai@kernel.org>
Date: Wed, 14 Jan 2015 20:31:37 -0800

> Some bios put range that is not fully coverred by root bus resources.
> Try to clip them and update them in pci bridge bars.
> 
> We'd like to fix other arches instead of just x86.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
> Reported-by: Marek Kordik <kordikmarek@gmail.com>
> Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-01-16  0:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-15  4:31 [PATCH v2 00/10] PCI: clip firmware assigned resources Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 01/10] PCI: clip firmware assigned resource under parent bridge's Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 02/10] PCI, x86: " Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 03/10] PCI, alpha: " Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 04/10] PCI, frv: " Yinghai Lu
2015-01-15  4:51   ` Yinghai Lu
2015-01-15 16:19     ` Bjorn Helgaas
2015-01-15  4:31 ` [PATCH v2 05/10] PCI, ia64: " Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 06/10] PCI, microblaze: " Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 07/10] PCI, mn10300: " Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 08/10] PCI, parisc: " Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 09/10] PCI, powerpc: " Yinghai Lu
2015-01-15  4:31 ` [PATCH v2 10/10] PCI, sparc: " Yinghai Lu
2015-01-16  0:14   ` David Miller
2015-01-15 22:24 ` [PATCH v2 00/10] PCI: clip firmware assigned resources Bjorn Helgaas

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).