Re: [PATCH] ARM: allow, but warn, when issuing ioremap() on RAM

From: Russell King - ARM Linux
Date: Sat Oct 09 2010 - 08:06:14 EST


On Sat, Oct 09, 2010 at 01:44:44PM +0200, Uwe Kleine-König wrote:
> Hello,
>
> On Sat, Oct 09, 2010 at 01:11:26PM +0200, Arnd Bergmann wrote:
> > When you say that "many drivers broken", can you list the ones you know
> > about? It would probably help resolve this the right way.
> I know about the camera stuff on mx3/pcm037. See
> pcm037_camera_alloc_dma in arch/arm/mach-mx3/mach-pcm037.c.

dma_alloc_coherent, stuffing that into dma_declare_coherent_memory,
which then ioremaps the memory obtained from dma_alloc_coherent, and
is then handed out via a subsequent dma_alloc_coherent call.

So what we end up with is the kernel mapping (normal memory, cacheable),
the DMA coherent mapping (normal memory, non-cacheable) but with the
same shared-ness as the kernel mapping, and finally the ioremap mapping
(device, shared). So three aliasing mappings all with different
attributes.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/