rpms/kernel/F-8 linux-2.6-pci-remove-default-pci-rom-allocation.patch, NONE, 1.1 linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch, NONE, 1.1 kernel.spec, 1.407, 1.408

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Mar 27 23:21:50 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9649

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-pci-remove-default-pci-rom-allocation.patch 
	linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch 
Log Message:
* Thu Mar 27 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-62
- Fix broken PCI resource allocation.


linux-2.6-pci-remove-default-pci-rom-allocation.patch:

--- NEW FILE linux-2.6-pci-remove-default-pci-rom-allocation.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f8daccaa05c14e5643bdd4faf5aed9cc8e6f11e
Commit:     9f8daccaa05c14e5643bdd4faf5aed9cc8e6f11e
Parent:     bca25bafbb390eeec376ac994954b99489d198ec
Author:     Gary Hade <garyhade at us.ibm.com>
AuthorDate: Wed Jan 30 13:31:59 2008 +0100
Committer:  Ingo Molnar <mingo at elte.hu>
CommitDate: Wed Jan 30 13:31:59 2008 +0100

    PCI: remove default PCI expansion ROM memory allocation
    
    increasing number of PCI slots in large multi-node systems.  The kernel
    currently attempts by default to allocate memory for all PCI expansion
    ROMs so there has also been an increasing number of PCI memory
    allocation failures seen on these systems.  This occurs because the BIOS
    either (1) provides insufficient PCI memory resource for all the
    expansion ROMs or (2) provides adequate PCI memory resource for
    expansion ROMs but provides the space in kernel unexpected BIOS assigned
    P2P non-prefetch windows.
    
    The resulting PCI memory allocation failures may be benign when related
    to memory requests for expansion ROMs themselves but in some cases they
    can occur when attempting to allocate space for more critical BARs.
    This can happen when a successful expansion ROM allocation request
    consumes memory resource that was intended for a non-ROM BAR.  We have
    seen this happen during PCI hotplug of an adapter that contains a P2P
    bridge where successful memory allocation for an expansion ROM BAR on
    device behind the bridge consumed memory that was intended for a non-ROM
    BAR on the P2P bridge.  In all cases the allocation failure messages can
    be very confusing for users.
    
    This patch addresses the issue by changing the kernel default behavior
    so that expansion ROM memory allocations are no longer attempted by
    default when the BIOS has not assigned a specific address range to the
    expansion ROM BAR.  This was done by changing the 'pci=rom' boot option
    behavior for BIOS unassigned expansion ROMs to actually match it's
    current kernel-parameters.txt description which already implies "off" by
    default. Behavior for BIOS assigned expansion ROMs implemented in
    pcibios_assign_resources() [arch/x86/pci/i386.c] is unchanged.
    
    Signed-off-by: Gary Hade <garyhade at us.ibm.com>
    Cc: Greg KH <greg at kroah.com>
    Cc: Jan Beulich <jbeulich at novell.com>
    Acked-by: "Jun'ichi Nomura" <j-nomura at ce.jp.nec.com>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: Ingo Molnar <mingo at elte.hu>
    Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
---
 arch/x86/pci/common.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 8627463..52deabc 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -109,6 +109,19 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b)
 	}
 }
 
+static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
+{
+	struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE];
+
+	if (rom_r->parent)
+		return;
+	if (rom_r->start)
+		/* we deal with BIOS assigned ROM later */
+		return;
+	if (!(pci_probe & PCI_ASSIGN_ROMS))
+		rom_r->start = rom_r->end = rom_r->flags = 0;
+}
+
 /*
  *  Called after each bus is probed, but before its children
  *  are examined.
@@ -116,8 +129,12 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b)
 
 void __devinit  pcibios_fixup_bus(struct pci_bus *b)
 {
+	struct pci_dev *dev;
+
 	pcibios_fixup_ghosts(b);
 	pci_read_bridge_bases(b);
+	list_for_each_entry(dev, &b->devices, bus_list)
+		pcibios_fixup_device_resources(dev);
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch:

--- NEW FILE linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=12c22d6ef299ccf0955e5756eb57d90d7577ac68
Commit:     12c22d6ef299ccf0955e5756eb57d90d7577ac68
Parent:     05dda977f2574c3341abef9b74c27d2b362e1e3a
Author:     Linus Torvalds <torvalds at linux-foundation.org>
AuthorDate: Wed Mar 26 11:22:40 2008 -0700
Committer:  Linus Torvalds <torvalds at linux-foundation.org>
CommitDate: Wed Mar 26 11:22:40 2008 -0700

    Revert "PCI: remove transparent bridge sizing"
    
    This reverts commit 8fa5913d54f3b1e09948e6a0db34da887e05ff1f, which
    caused various interesting problems for people, including wrong resource
    allocations.  See for example bugzilla entry "2.6.25-rc2: ohci1394
    problem (MMIO broken)" at
    
    	http://bugzilla.kernel.org/show_bug.cgi?id=10080
    
    And Gary Hade says:
    
     "The same change had also exposed an issue reported by Paul Martin that
      has been causing an Oops while hotplugging ThinkPads to a ThinkPad
      Dock II.  See
    
    	http://lkml.org/lkml/2008/2/19/405
    	http://bugzilla.kernel.org/show_bug.cgi?id=9961
    
      I have a fix for the ThinkPad docking Oops but if the issue being
      discussed here is caused by the transparent bridge sizing removal
      change I totally agree that it should be reverted."
    
      The transparent bridge sizing removal change was motivated by
      insufficient PCI memory resource for a transparent bridge window that
      was being created as a result of expansion ROM(s) being included in
      the transparent bridge sizing calculations.
    
      A later "PCI: Remove default PCI expansion ROM memory allocation"
      change ( re: http://lkml.org/lkml/2007/12/11/361 ) removes the
      expansion ROM(s) from the transparent bridge sizing calculations which
      actually resolves the original issue in a different manner.  So, even
      if the "PCI: remove transparent bridge sizing" is not problematic it
      is no longer needed anyway."
    
    Identified-by: Ivan Kokshaysky <ink at jurassic.park.msu.ru>
    Tested-by: Thomas Meyer <thomas at m3y3r.de>
    Acked-by: Gary Hade <garyhade at us.ibm.com>
    Acked-by: Ingo Molnar <mingo at elte.hu>
    Cc: Stefan Richter <stefanr at s5r6.in-berlin.de>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 drivers/pci/setup-bus.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 125e7b7..f7cb8e0 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -486,12 +486,7 @@ void __ref pci_bus_size_bridges(struct pci_bus *bus)
 		break;
 
 	case PCI_CLASS_BRIDGE_PCI:
-		/* don't size subtractive decoding (transparent)
-		 * PCI-to-PCI bridges */
-		if (bus->self->transparent)
-			break;
 		pci_bridge_check_ranges(bus);
-		/* fall through */
 	default:
 		pbus_size_io(bus);
 		/* If the bridge supports prefetchable range, size it
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.407
retrieving revision 1.408
diff -u -r1.407 -r1.408
--- kernel.spec	27 Mar 2008 20:55:07 -0000	1.407
+++ kernel.spec	27 Mar 2008 23:20:51 -0000	1.408
@@ -629,6 +629,8 @@
 Patch370: linux-2.6-crash-driver.patch
 
 Patch380: linux-2.6-pci-keep-SMBus-hidden-on-nx6110.patch
+Patch381: linux-2.6-pci-remove-default-pci-rom-allocation.patch
+Patch382: linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch
 
 Patch400: linux-2.6-scsi-cpqarray-set-master.patch
 Patch402: linux-2.6-scsi-mpt-vmware-fix.patch
@@ -1182,7 +1184,12 @@
 #
 # driver core
 #
+# unhiding this smbus breaks acpi thermal zones
 ApplyPatch linux-2.6-pci-keep-SMBus-hidden-on-nx6110.patch
+# fix pci resource allocation broken in 2.6.24
+ApplyPatch linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch
+# make "pci=rom" work as documented: don't assign addresses to every rom by default
+ApplyPatch linux-2.6-pci-remove-default-pci-rom-allocation.patch
 
 #
 # SCSI Bits.
@@ -1985,6 +1992,9 @@
 
 
 %changelog
+* Thu Mar 27 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-62
+- Fix broken PCI resource allocation.
+
 * Thu Mar 27 2008 Dave Jones <davej at redhat.com>
 - Backport lots of MTRR fixes from 2.6.25.
   Amongst others, this fixes bz 438960




More information about the fedora-extras-commits mailing list