rpms/kernel/devel kernel.spec, 1.827, 1.828 linux-2.6-compile-fixes.patch, 1.173, 1.174

Dave Jones (davej) fedora-extras-commits at redhat.com
Thu Jul 31 19:48:11 UTC 2008


Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18257

Modified Files:
	kernel.spec linux-2.6-compile-fixes.patch 
Log Message:
Fix PPC64 build.


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.827
retrieving revision 1.828
diff -u -r1.827 -r1.828
--- kernel.spec	31 Jul 2008 12:26:55 -0000	1.827
+++ kernel.spec	31 Jul 2008 19:47:40 -0000	1.828
@@ -1711,6 +1711,9 @@
 
 %changelog
 * Thu Jul 31 2008 Dave Jones <davej at redhat.com>
+- Fix PPC64 build.
+
+* Thu Jul 31 2008 Dave Jones <davej at redhat.com>
 - 2.6.27-rc1-git2
 
 * Wed Jul 30 2008 Dave Jones <davej at redhat.com>

linux-2.6-compile-fixes.patch:

Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-compile-fixes.patch,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -r1.173 -r1.174
--- linux-2.6-compile-fixes.patch	30 Jul 2008 21:39:43 -0000	1.173
+++ linux-2.6-compile-fixes.patch	31 Jul 2008 19:47:40 -0000	1.174
@@ -5,3 +5,136 @@
 # to do a compile to figure out what your diff is fixing. Thanks.
 #
 
+On Tue, 29 Jul 2008 13:56:52 +1000
+Stephen Rothwell <sfr at canb.auug.org.au> wrote:
+
+> Hi, 
+> 
+> On Tue, 29 Jul 2008 10:46:31 +0900 FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> wrote:
+> >
+> > > So, I assume a patch created on July 25 is not destined for 2.6.27,
+> > 
+> > Hmm, seems that they will go into 2.6.27:
+> > 
+> > http://marc.info/?l=linux-kernel&m=121729275722287&w=2
+> > 
+> > 
+> > > right?  Especially since it breaks another architecture build and has
+> > > only made it to linux-next on July 29 ... and needs more work given the
+> > > comments already on this patch.
+> > 
+> > It doesn't break another architecture build since only x86 IOMMUs use
+> > the helper function. But as I pointed out, it doesn't work for some
+> > architectures.
+> 
+> Um, did you see the linux-next build report I posted (possibly not):
+> 
+> arch/powerpc/kernel/iommu.c:56: error: static declaration of 'iommu_num_pages' follows non-static declaration
+> include/linux/iommu-helper.h:11: error: previous declaration of 'iommu_num_pages' was here
+> 
+> This is now a build of 2.6.27-rc1 for powerpc64 ppc64_defconfig ...
+
+Ah, really sorry. Yeah, it breaks POWER and SPARC builds.
+
+
+> So we have a patch first posted to lkml on July 25 first hits linux-next
+> on July 29 and is no in Linus' tree on July 29.  A grep would have found
+> the problem.
+> 
+> More care required ...
+
+Agreed... As I said before, this is not urgent at all so we didn't
+need to rush.
+
+
+A fix has already been posted?
+
+==
+From: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
+Subject: [PATCH] move iommu_num_pages helper to x86
+
+This IOMMU helper function doesn't work for some architectures:
+
+http://marc.info/?l=linux-kernel&m=121699304403202&w=2
+
+It also breaks POWER and SPARC builds:
+
+http://marc.info/?l=linux-kernel&m=121730388001890&w=2
+
+Currently, only x86 IOMMUs use this so let's move it to x86 for
+now.
+
+Reported-by: Stephen Rothwell <sfr at canb.auug.org.au>
+Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
+---
+ arch/x86/kernel/pci-dma.c    |    8 ++++++++
+ include/asm-x86/iommu.h      |    2 ++
+ include/linux/iommu-helper.h |    1 -
+ lib/iommu-helper.c           |    8 --------
+ 4 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
+index 8dbffb8..87d4d69 100644
+--- a/arch/x86/kernel/pci-dma.c
++++ b/arch/x86/kernel/pci-dma.c
+@@ -123,6 +123,14 @@ void __init pci_iommu_alloc(void)
+ 
+ 	pci_swiotlb_init();
+ }
++
++unsigned long iommu_num_pages(unsigned long addr, unsigned long len)
++{
++	unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE);
++
++	return size >> PAGE_SHIFT;
++}
++EXPORT_SYMBOL(iommu_num_pages);
+ #endif
+ 
+ /*
+diff --git a/include/asm-x86/iommu.h b/include/asm-x86/iommu.h
+index ecc8061..5f888cc 100644
+--- a/include/asm-x86/iommu.h
++++ b/include/asm-x86/iommu.h
+@@ -7,6 +7,8 @@ extern struct dma_mapping_ops nommu_dma_ops;
+ extern int force_iommu, no_iommu;
+ extern int iommu_detected;
+ 
++extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);
++
+ #ifdef CONFIG_GART_IOMMU
+ extern int gart_iommu_aperture;
+ extern int gart_iommu_aperture_allowed;
+diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
+index f8598f5..c975caf 100644
+--- a/include/linux/iommu-helper.h
++++ b/include/linux/iommu-helper.h
+@@ -8,4 +8,3 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
+ 				      unsigned long align_mask);
+ extern void iommu_area_free(unsigned long *map, unsigned long start,
+ 			    unsigned int nr);
+-extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);
+diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
+index 889ddce..a3b8d4c 100644
+--- a/lib/iommu-helper.c
++++ b/lib/iommu-helper.c
+@@ -80,11 +80,3 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr)
+ 	}
+ }
+ EXPORT_SYMBOL(iommu_area_free);
+-
+-unsigned long iommu_num_pages(unsigned long addr, unsigned long len)
+-{
+-	unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE);
+-
+-	return size >> PAGE_SHIFT;
+-}
+-EXPORT_SYMBOL(iommu_num_pages);
+-- 
+1.5.5.GIT
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at  http://www.tux.org/lkml/
\ No newline at end of file




More information about the fedora-extras-commits mailing list