Subject: Re: [PATCH] export m8xx_cpm_hostalloc

From: Andreas Oberritter <[email-masked]>
Date: Sat, 24 Jul 2004 15:04:06 +0200

Am Fr, den 23.07.2004 schrieb Matt Porter um 17:38:
> On Fri, Jul 23, 2004 at 10:41:36AM -0400, Dan Malek wrote:
> >
> > On Jul 23, 2004, at 10:02 AM, Tom Rini wrote:
> >
> > > Must the driver use hostalloc?  I didn't think that i2c was called so
> > > early that kmalloc/bootmem_alloc() (or so) couldn't be used.
> >
> >
> > Should use ...consistent_alloc()
>
> That doesn't exist in 2.6. Use dma_alloc_coherent().

Thanks, that works, but requires the attached patch. Please apply.

Regards,
Andreas
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/07/24 14:59:23+02:00 [email-masked]
#   export __dma_alloc_coherent and __dma_free_coherent (required for CONFIG_NOT_COHERENT_CACHE)
#
# arch/ppc/kernel/dma-mapping.c
#   2004/07/24 14:59:03+02:00 [email-masked] +2 -1
#   export __dma_alloc_coherent and __dma_free_coherent (required for CONFIG_NOT_COHERENT_CACHE)
#
diff -Nru a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c
--- a/arch/ppc/kernel/dma-mapping.c	2004-07-24 15:00:12 +02:00
+++ b/arch/ppc/kernel/dma-mapping.c	2004-07-24 15:00:12 +02:00
@@ -254,6 +254,7 @@
  no_page:
 	return NULL;
 }
+EXPORT_SYMBOL(__dma_alloc_coherent);

 /*
  * free a page as defined by the above mapping.
@@ -317,7 +318,7 @@
 	       __func__, vaddr);
 	dump_stack();
 }
-EXPORT_SYMBOL(dma_free_coherent);
+EXPORT_SYMBOL(__dma_free_coherent);

 /*
  * Initialise the consistent memory allocation.