Re: [PATCH 6/8] MIPS: Convert DMA to use dma-mapping-common.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 1, 2010 at 1:27 PM, David Daney <ddaney@xxxxxxxxxxxxxxxxxx> wrote:
> diff --git a/arch/mips/include/asm/mach-generic/dma-coherence.h b/arch/mips/include/asm/mach-generic/dma-coherence.h
> index 8da9807..8259966 100644
> --- a/arch/mips/include/asm/mach-generic/dma-coherence.h
> +++ b/arch/mips/include/asm/mach-generic/dma-coherence.h
> @@ -17,12 +17,6 @@ static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr,
> Â Â Â Âreturn virt_to_phys(addr);
> Â}
>
> -static inline dma_addr_t plat_map_dma_mem_page(struct device *dev,
> - Â Â Â struct page *page)
> -{
> - Â Â Â return page_to_phys(page);
> -}
> -

I was attempting to rebase the HIGHMEM DMA patch against mips-queue,
and ran into a problem with this change:

mips_dma_map_sg() and mips_dma_map_page() now assume that it is
possible to convert any "struct page" to a VA, then convert that VA to
a PA.  This is not necessarily true for HIGHMEM pages (it is perfectly
valid for page_address(page) == NULL).  For cases where we are passed
a "struct page" instead of a VA, it is desirable to be able to call
plat_map_dma_mem_page() directly on the struct page.

Since this function is not implemented as a trivial page_to_phys()
wrapper on all MIPS platforms, I believe it would need to be
reinstated in order to support direct page->PA translation.



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux