[PATCH 1/3] ARM: Assume new page cache pages have dirty D-cache
Rabin Vincent
rabin at rab.in
Mon Jun 28 10:22:01 EDT 2010
On Fri, Jun 25, 2010 at 01:01:32PM +0100, Catalin Marinas wrote:
> @@ -508,6 +508,12 @@ void ___dma_page_dev_to_cpu(struct page *page, unsigned long off,
> outer_inv_range(paddr, paddr + size);
>
> dma_cache_maint_page(page, off, size, dir, dmac_unmap_area);
> +
> + /*
> + * Mark the D-cache clean for this page to avoid extra flushing.
> + */
> + if (dir != DMA_TO_DEVICE)
> + set_bit(PG_dcache_clean, &page->flags);
off + size does not necessarily cover the full page. We probably
shouldn't be setting it as clean unless it does?
Also, off + size can cover multiple physically contiguous pages, so
perhaps they too can be set as clean if they're fully covered.
Rabin
More information about the linux-arm-kernel
mailing list