rpms/kernel/F-10 linux-2.6-ppc64-vs-broadcom-lmb-no-init-1.patch, NONE, 1.1.2.1 linux-2.6-ppc64-vs-broadcom-lmb-no-init-2.patch, NONE, 1.1.2.1 linux-2.6-ppc64-vs-broadcom.patch, NONE, 1.1.2.2 kernel.spec, 1.1206.2.88, 1.1206.2.89

Chuck Ebbert cebbert at fedoraproject.org
Mon Sep 7 23:21:56 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7911

Modified Files:
      Tag: private-fedora-10-2_6_27
	kernel.spec 
Added Files:
      Tag: private-fedora-10-2_6_27
	linux-2.6-ppc64-vs-broadcom-lmb-no-init-1.patch 
	linux-2.6-ppc64-vs-broadcom-lmb-no-init-2.patch 
	linux-2.6-ppc64-vs-broadcom.patch 
Log Message:
Backport fix for b43 on ppc64 to 2.6.27 (#514787)

linux-2.6-ppc64-vs-broadcom-lmb-no-init-1.patch:
 lmb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-ppc64-vs-broadcom-lmb-no-init-1.patch ---
From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Date: Thu, 27 Aug 2009 07:20:30 +0000 (+1000)
Subject: lmb: Remove __init from lmb_end_of_DRAM()
X-Git-Tag: v2.6.31-rc8~5
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=4f8ee2c9cc0e885d2bb50ef26db66150ab25213e

lmb: Remove __init from lmb_end_of_DRAM()

We call lmb_end_of_DRAM() to test whether a DMA mask is ok on a machine
without IOMMU, but this function is marked as __init.

I don't think there's a clean way to get the top of RAM max_pfn doesn't
appear to include highmem or I missed (or we have a bug :-) so for now,
let's just avoid having a broken 2.6.31 by making this function
non-__init and we can revisit later.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

diff --git a/lib/lmb.c b/lib/lmb.c
index e4a6482..0343c05 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -429,7 +429,7 @@ u64 __init lmb_phys_mem_size(void)
 	return lmb.memory.size;
 }
 
-u64 __init lmb_end_of_DRAM(void)
+u64 lmb_end_of_DRAM(void)
 {
 	int idx = lmb.memory.cnt - 1;
 

linux-2.6-ppc64-vs-broadcom-lmb-no-init-2.patch:
 lmb.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-ppc64-vs-broadcom-lmb-no-init-2.patch ---
From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Date: Mon, 31 Aug 2009 03:48:16 +0000 (+1000)
Subject: lmb: Also remove __init from lmb_end_of_RAM() declaration in lmb.h
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=1a37f184fa7824982a5f434c06981ec46a66cef7

lmb: Also remove __init from lmb_end_of_RAM() declaration in lmb.h

My previous patch (commit 4f8ee2c9cc: "lmb: Remove __init from
lmb_end_of_DRAM()") removed __init in lmb.c but missed the fact that it
was also marked as such in the .h

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

diff --git a/include/linux/lmb.h b/include/linux/lmb.h
index c46c895..2442e3f 100644
--- a/include/linux/lmb.h
+++ b/include/linux/lmb.h
@@ -51,7 +51,7 @@ extern u64 __init lmb_alloc_base(u64 size,
 extern u64 __init __lmb_alloc_base(u64 size,
 		u64 align, u64 max_addr);
 extern u64 __init lmb_phys_mem_size(void);
-extern u64 __init lmb_end_of_DRAM(void);
+extern u64 lmb_end_of_DRAM(void);
 extern void __init lmb_enforce_memory_limit(u64 memory_limit);
 extern int __init lmb_is_reserved(u64 addr);
 extern int lmb_find(struct lmb_property *res);

linux-2.6-ppc64-vs-broadcom.patch:
 dma_64.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- NEW FILE linux-2.6-ppc64-vs-broadcom.patch ---
>From b2f2e8fee3d62f621e795f25b2fc0f51bbdb4af9 Mon Sep 17 00:00:00 2001
From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Date: Mon, 10 Aug 2009 16:36:38 +1000
Subject: [PATCH] powerpc/dma: pci_set_dma_mask() shouldn't fail if mask fits in RAM

[ <cebbert at redhat.com> : backport to 2.6.27 ]

On an iMac G5, the b43 driver is failing to initialise because trying to
set the dma mask to 30-bit fails. Even though there's only 512MiB of RAM
in the machine anyway:
	https://bugzilla.redhat.com/show_bug.cgi?id=514787

We should probably let it succeed if the available RAM in the system
doesn't exceed the requested limit.

Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 arch/powerpc/kernel/dma_64.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 20a60d6..ccf129d 100644
--- a/arch/powerpc/kernel/dma_64.c
+++ b/arch/powerpc/kernel/dma_64.c
@@ -7,6 +7,7 @@
 
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
+#include <linux/lmb.h>
 #include <asm/bug.h>
 #include <asm/iommu.h>
 #include <asm/abs_addr.h>
@@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg,
 
 static int dma_direct_dma_supported(struct device *dev, u64 mask)
 {
-	/* Could be improved to check for memory though it better be
-	 * done via some global so platforms can set the limit in case
+	/* Could be improved so platforms can set the limit in case
 	 * they have limited DMA windows
 	 */
-	return mask >= DMA_32BIT_MASK;
+	return mask >= (lmb_end_of_DRAM() - 1);
 }
 
 struct dma_mapping_ops dma_direct_ops = {
-- 
1.6.2.5



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1206.2.88
retrieving revision 1.1206.2.89
diff -u -p -r1.1206.2.88 -r1.1206.2.89
--- kernel.spec	6 Sep 2009 04:59:29 -0000	1.1206.2.88
+++ kernel.spec	7 Sep 2009 23:21:55 -0000	1.1206.2.89
@@ -786,6 +786,11 @@ Patch14001: linux-2.6-nfsd-report-short-
 Patch14010: linux-2.6-slub-fix-destroy-by-rcu.patch
 Patch14011: linux-2.6-ocfs2-handle-len-0.patch
 
+# send for -stable
+Patch15000: linux-2.6-ppc64-vs-broadcom.patch
+Patch15001: linux-2.6-ppc64-vs-broadcom-lmb-no-init-1.patch
+Patch15002: linux-2.6-ppc64-vs-broadcom-lmb-no-init-2.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1421,6 +1426,11 @@ ApplyPatch linux-2.6-nfsd-report-short-w
 ApplyPatch linux-2.6-slub-fix-destroy-by-rcu.patch
 ApplyPatch linux-2.6-ocfs2-handle-len-0.patch
 
+# send for -stable:
+ApplyPatch linux-2.6-ppc64-vs-broadcom.patch
+ApplyPatch linux-2.6-ppc64-vs-broadcom-lmb-no-init-1.patch
+ApplyPatch linux-2.6-ppc64-vs-broadcom-lmb-no-init-2.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -1996,6 +2006,9 @@ fi
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Mon Sep 07 2009  Chuck Ebbert <cebbert at redhat.com>  2.6.27.32-170.2.89.rc1
+- Backport fix for b43 on ppc64 to 2.6.27 (#514787)
+
 * Sun Sep 06 2009  Chuck Ebbert <cebbert at redhat.com>  2.6.27.32-170.2.88.rc1
 - Add patches requested for the next stable release:
    linux-2.6-slub-fix-destroy-by-rcu.patch (fixes bug in 2.6.27.29)




More information about the fedora-extras-commits mailing list