Discussion about iopa()
Kumar Gala
galak at kernel.crashing.org
Sat Feb 10 10:43:49 EST 2007
On Feb 9, 2007, at 5:33 PM, Timur Tabi wrote:
> Kumar Gala wrote:
>
>> We should fix it so the driver just has to do dma_alloc_coherent,
>> dma_free_coherent, and dma_map_*/dma_unmap_*
>
> Ok, I'm getting confused now. The driver currently uses ioremap
> (). You're saying that it should use the dma_xxx functions
> instead, but not until those functions support MURAM? When that
> happens, won't that make ioremap() obsolete?
ioremap() is for IO space not normal memory or things that behave
like normal memory (MURAM, on chip SRAM, etc). ioremap will always
be needed to ensure proper non-cachable/guarded access to registers
on devices, etc... The problem is that we don't have a mechanism
between kmalloc/vmalloc (for system memory) and ioremap (for devices)
to handle other memories in the system. So we end up with a
specialized allocator (rheap + muram wrappers) to deal with it.
So, I'd rather mapping also be specialized for MURAM. I don't see
any benefit in making mapping behave the same while not addressing
the other functionality (allocation, deallocation, etc.)
- k
More information about the Linuxppc-dev
mailing list