[kernel] r7637 - in dists/trunk/linux-2.6/debian: . patches/bugfix/sparc patches/series

Jurij Smakov jurij-guest at costa.debian.org
Sat Oct 21 23:16:47 UTC 2006


Author: jurij-guest
Date: Sat Oct 21 23:16:47 2006
New Revision: 7637

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/sparc/
   dists/trunk/linux-2.6/debian/patches/bugfix/sparc/sunblade-clock-hang.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/4

Log:
[sparc] Add bugfix/sparc/sunblade-clock-hang.patch, fixing the
boot-time crash during clock probing on SunBlade 100/150 due to
incorrect mapping of PCI resources. (closes: #392078). Patch has been 
pushed to stable.
Ref: http://marc.theaimsgroup.com/?t=116036108600001&r=1&w=2



Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	(original)
+++ dists/trunk/linux-2.6/debian/changelog	Sat Oct 21 23:16:47 2006
@@ -7,10 +7,13 @@
   [ Jurij Smakov ]
   * [sparc] Remove sparc64-atyfb-xl-gr.patch, it does more harm than
     good in 2.6.18.
+  * [sparc] Add bugfix/sparc/sunblade-clock-hang.patch, fixing the
+    boot-time crash during clock probing on SunBlade 100/150 due to
+    incorrect mapping of PCI resources. (closes: #392078)
 
  -- Norbert Tretkowski <nobse at debian.org>  Sat, 21 Oct 2006 18:52:12 +0200
 
-linux-2.6 (2.6.18-3) unstable; urgency=low
+linux-2.6 (2.6.18-3) unstable; urgency=low 
 
   [ Bastian Blank ]
   * Fix home of patch apply script.
@@ -19,8 +22,8 @@
   * Add AHCI suspend support.
   * Add patch to support bindmount without nodev on vserver.
   * Update fedora xen patch to changeset 36252.
-
-  [ Steve Langasek ]
+ 
+   [ Steve Langasek ]
   * [alpha] restore alpha-prctl.patch, which keeps disappearing every time
     there's a kernel upgrade :/
 
@@ -112,7 +115,7 @@
   * Fix oops when removing suspended serial port.
   * Check if DLC is still attached to the TTY.
   * Add fedora backport of i965 DRM support.
-
+ 
   [ Martin Michlmayr ]
   * [mips] Apply some patches from linux-mips' linux-2.6.18-stable GIT tree:
     - The o32 fstatat syscall behaves differently on 32 and 64 bit kernels
@@ -124,7 +127,7 @@
     - Do not use -msym32 option for modules
     - Fix O32 personality(2) call with 0xffffffff argument
     - Use compat_sys_mount
-
+ 
   [ dann frazier ]
   * [ia64]: Fix booting on HP cell systems, thanks to Troy Heber
     - Enable CONFIG_HUGETLBFS
@@ -140,7 +143,7 @@
   * [powerpc] Added AMD74xx driver module to the powerpc64 flavour
     (Closes: #391861).
 
-  [ Kyle McMartin ]
+   [ Kyle McMartin ]
   * [hppa] Force CROSS_COMPILE=hppa64-linux-gnu- (closes: #389296)
 
  -- Bastian Blank <waldi at debian.org>  Sat, 21 Oct 2006 15:59:43 +0200

Added: dists/trunk/linux-2.6/debian/patches/bugfix/sparc/sunblade-clock-hang.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/sparc/sunblade-clock-hang.patch	Sat Oct 21 23:16:47 2006
@@ -0,0 +1,135 @@
+[SPARC64]: Fix PCI memory space root resource on Hummingbird.
+
+For Hummingbird PCI controllers, we should create the root
+PCI memory space resource as the full 4GB area, and then
+allocate the IOMMU DMA translation window out of there.
+
+The old code just assumed that the IOMMU DMA translation base
+to the top of the 4GB area was unusable.  This is not true on
+many systems such as SB100 and SB150, where the IOMMU DMA
+translation window sits at 0xc0000000->0xdfffffff.
+
+So what would happen is that any device mapped by the firmware
+at the top section 0xe0000000->0xffffffff would get remapped
+by Linux somewhere else leading to all kinds of problems and
+boot failures.
+
+While we're here, report more cases of OBP resource assignment
+conflicts.  The only truly valid ones are ROM resource conflicts.
+
+Signed-off-by: David S. Miller <davem at davemloft.net>
+
+diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
+index 7a59cc7..827ae30 100644
+--- a/arch/sparc64/kernel/pci_common.c
++++ b/arch/sparc64/kernel/pci_common.c
+@@ -330,19 +330,6 @@ #endif
+ 	return res;
+ }
+ 
+-static int __init pdev_resource_collisions_expected(struct pci_dev *pdev)
+-{
+-	if (pdev->vendor != PCI_VENDOR_ID_SUN)
+-		return 0;
+-
+-	if (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS ||
+-	    pdev->device == PCI_DEVICE_ID_SUN_RIO_1394 ||
+-	    pdev->device == PCI_DEVICE_ID_SUN_RIO_USB)
+-		return 1;
+-
+-	return 0;
+-}
+-
+ static void __init pdev_record_assignments(struct pci_pbm_info *pbm,
+ 					   struct pci_dev *pdev)
+ {
+@@ -400,19 +387,23 @@ static void __init pdev_record_assignmen
+ 		pbm->parent->resource_adjust(pdev, res, root);
+ 
+ 		if (request_resource(root, res) < 0) {
++			int rnum;
++
+ 			/* OK, there is some conflict.  But this is fine
+ 			 * since we'll reassign it in the fixup pass.
+ 			 *
+-			 * We notify the user that OBP made an error if it
+-			 * is a case we don't expect.
++			 * Do not print the warning for ROM resources
++			 * as such a conflict is quite common and
++			 * harmless as the ROM bar is disabled.
+ 			 */
+-			if (!pdev_resource_collisions_expected(pdev)) {
+-				printk(KERN_ERR "PCI: Address space collision on region %ld "
++			rnum = (res - &pdev->resource[0]);
++			if (rnum != PCI_ROM_RESOURCE)
++				printk(KERN_ERR "PCI: Resource collision, "
++				       "region %d "
+ 				       "[%016lx:%016lx] of device %s\n",
+-				       (res - &pdev->resource[0]),
++				       rnum,
+ 				       res->start, res->end,
+ 				       pci_name(pdev));
+-			}
+ 		}
+ 	}
+ }
+diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
+index 4589185..f04c6d2 100644
+--- a/arch/sparc64/kernel/pci_sabre.c
++++ b/arch/sparc64/kernel/pci_sabre.c
+@@ -1196,7 +1196,7 @@ static void pbm_register_toplevel_resour
+ 					    &pbm->mem_space);
+ }
+ 
+-static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 dma_begin)
++static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 dma_start, u32 dma_end)
+ {
+ 	struct pci_pbm_info *pbm;
+ 	struct device_node *node;
+@@ -1261,6 +1261,8 @@ static void sabre_pbm_init(struct pci_co
+ 		node = node->sibling;
+ 	}
+ 	if (simbas_found == 0) {
++		struct resource *rp;
++
+ 		/* No APBs underneath, probably this is a hummingbird
+ 		 * system.
+ 		 */
+@@ -1302,8 +1304,10 @@ static void sabre_pbm_init(struct pci_co
+ 		pbm->io_space.end   = pbm->io_space.start + (1UL << 24) - 1UL;
+ 		pbm->io_space.flags = IORESOURCE_IO;
+ 
+-		pbm->mem_space.start = p->pbm_A.controller_regs + SABRE_MEMSPACE;
+-		pbm->mem_space.end   = pbm->mem_space.start + (unsigned long)dma_begin - 1UL;
++		pbm->mem_space.start =
++			(p->pbm_A.controller_regs + SABRE_MEMSPACE);
++		pbm->mem_space.end =
++			(pbm->mem_space.start + ((1UL << 32UL) - 1UL));
+ 		pbm->mem_space.flags = IORESOURCE_MEM;
+ 
+ 		if (request_resource(&ioport_resource, &pbm->io_space) < 0) {
+@@ -1315,6 +1319,17 @@ static void sabre_pbm_init(struct pci_co
+ 			prom_halt();
+ 		}
+ 
++		rp = kmalloc(sizeof(*rp), GFP_KERNEL);
++		if (!rp) {
++			prom_printf("Cannot allocate IOMMU resource.\n");
++			prom_halt();
++		}
++		rp->name = "IOMMU";
++		rp->start = pbm->mem_space.start + (unsigned long) dma_start;
++		rp->end = pbm->mem_space.start + (unsigned long) dma_end - 1UL;
++		rp->flags = IORESOURCE_BUSY;
++		request_resource(&pbm->mem_space, rp);
++
+ 		pci_register_legacy_regions(&pbm->io_space,
+ 					    &pbm->mem_space);
+ 	}
+@@ -1450,5 +1465,5 @@ void sabre_init(struct device_node *dp, 
+ 	/*
+ 	 * Look for APB underneath.
+ 	 */
+-	sabre_pbm_init(p, dp, vdma[0]);
++	sabre_pbm_init(p, dp, vdma[0], vdma[0] + vdma[1]);
+ }

Modified: dists/trunk/linux-2.6/debian/patches/series/4
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/4	(original)
+++ dists/trunk/linux-2.6/debian/patches/series/4	Sat Oct 21 23:16:47 2006
@@ -1 +1,2 @@
 - sparc64-atyfb-xl-gr.patch
++ bugfix/sparc/sunblade-clock-hang.patch



More information about the Kernel-svn-changes mailing list