[patch 2/2] arm: Implement l2x0 cache disable functions
Catalin Marinas
catalin.marinas at arm.com
Mon Jul 5 06:54:39 EDT 2010
On Mon, 2010-07-05 at 10:25 +0100, Thomas Gleixner wrote:
> --- linux-2.6.orig/arch/arm/mm/cache-l2x0.c
> +++ linux-2.6/arch/arm/mm/cache-l2x0.c
> @@ -103,7 +103,19 @@ static void l2x0_cache_sync(void)
> spin_unlock_irqrestore(&l2x0_lock, flags);
> }
>
> -static inline void l2x0_inv_all(void)
> +static void l2x0_flush_all(void)
> +{
> + unsigned long flags;
> +
> + /* clean all ways */
> + spin_lock_irqsave(&l2x0_lock, flags);
> + writel(l2x0_way_mask, l2x0_base + L2X0_CLEAN_WAY);
> + cache_wait(l2x0_base + L2X0_CLEAN_WAY, l2x0_way_mask);
> + cache_sync();
> + spin_unlock_irqrestore(&l2x0_lock, flags);
> +}
Since it only does cleaning, we should probably call it l2x0_clean_all
(the same for the outer_cache_fns entry). I think on ARM we
traditionally referred to flush as clean+invalidate.
--
Catalin
More information about the linux-arm-kernel
mailing list