Re: [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area

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

 



From: Kristoffer Glembo <kristoffer@xxxxxxxxxxx>
Date: Mon, 16 Nov 2009 10:51:07 +0100

> @@ -524,7 +536,16 @@ static dma_addr_t pci32_map_page(struct device *dev, struct page *page,
>  				 struct dma_attrs *attrs)
>  {
>  	/* IIep is write-through, not flushing. */
> -	return page_to_phys(page) + offset;
> +	return virt_to_phys(page_address(page)) + offset;
> +}

What's wrong with page_to_phys()?

page_to_phys() is what must be used, because it is legal to DMA to or
from a highmem page, and for those page_address(page) does not
necessaily evaluate fully.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux