[RFC PATCH] ARMv7: Use lazy cache flushing if hardware broadcasts cache operations

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Nov 5 10:05:29 EST 2009


On Thu, Nov 05, 2009 at 01:31:00PM +0000, Catalin Marinas wrote:
> -#ifndef CONFIG_SMP
> -	if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
> +	if (!cache_ops_need_broadcast() &&
> +	    test_and_clear_bit(PG_dcache_dirty, &page->flags))

We really don't need the additional check here - there's only one
place where PG_dcache_dirty gets set, and that's flush_dcache_page().
If we avoid setting the bit for hardware which doesn't broadcast,
we won't call __flush_dcache_page().



More information about the linux-arm-kernel mailing list