[regression] in linux-next: sh_mobile_ceu_camera broken by "ARM: Prohibit ioremap() on kernel managed RAM"

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Aug 18 17:47:37 EDT 2010


On Wed, Aug 18, 2010 at 10:31:10PM +0200, Guennadi Liakhovetski wrote:
> I assume, you mean adding a new flag to skip ioremap(). But then we have 
> to pass the virtual address to the function. Its prototype is
> 
> int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
> 				dma_addr_t device_addr, size_t size, int flags);
> 
> bus_addr is unused in this case, but I don't think abusing it to pass a 
> "void *" would be an acceptable solution - apart from all the ugly 
> type-casting, if we ever get 64-bit virtual addresses on ARM with 32-bit 
> DMA addresses, we've got a problem. Or is this never going to happen? Or 
> whould I rather add a new function?

Oh, and if it's going to be used as per your previous message,
how about:

int dma_preallocate_coherent_memory(struct device *dev, size_t size);

so that it contains the dma_alloc_coherent() logic itself too?



More information about the linux-arm-kernel mailing list