[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110428131928.GL17290@n2100.arm.linux.org.uk>
Date: Thu, 28 Apr 2011 14:19:28 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Arnd Bergmann <arnd@...db.de>
Cc: Joerg Roedel <joro@...tes.org>, linaro-mm-sig@...ts.linaro.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC] ARM DMA mapping TODO, v1
On Thu, Apr 28, 2011 at 03:02:16PM +0200, Arnd Bergmann wrote:
> I think the misunderstanding is that you are saying we need the flag
> in dma_map_ops because you prefer to keep the cache management outside
> of the individual dma_map_ops implementations.
>
> What I guess Jörg is thinking of is to have the generic IOMMU version
> of dma_map_ops call into the architecture specific code to manage the
> caches on architectures that need it. That implementation would of
> course not require the flag in dma_map_ops because the architecture
> specific callback would use other ways (hardcoded for an architecture,
> or looking at the individual device) to determine if this is ever needed.
>
> That is also what I had in mind earlier, but you argued against it
> on the base that putting the logic into the common code would lead
> to a higher risk of people accidentally breaking it when they only
> care about coherent architectures.
You still need this same cache handling code even when you don't have
an iommu. I don't see the point in having a dma_ops level of indirection
followed by a separate iommu_ops level of indirection - it seems to me to
be a waste of code and CPU time, and I don't see why its even necessary
when there's a much simpler way to deal with it (as I illustrated).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists