]> Pileus Git - ~andy/linux/commitdiff
ARM: kernel: update __cpu_disable to use cache LoUIS maintenance API
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 7 Sep 2012 05:39:15 +0000 (11:09 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 25 Sep 2012 10:20:26 +0000 (11:20 +0100)
When a CPU is hotplugged out caches that reside in its power domain
lose their contents and so must be cleaned to the next memory level.

Currently, __cpu_disable calls flush_cache_all() that for new generation
processor like A15/A7 ends up cleaning and invalidating all cache levels
up to Level of Coherency, which includes the unified L2.

This ends up being a waste of cycles since the L2 cache contents are not
lost on power down.

This patch updates __cpu_disable to use the new LoUIS API cache operations.

Acked-by: Nicolas Pitre <nico@linaro.org>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/kernel/smp.c

index ebd8ad274d76bb82488240e9543d7a1d99b5c674..199558b9462ebae1ba397d11f15412d68129f294 100644 (file)
@@ -134,8 +134,11 @@ int __cpu_disable(void)
        /*
         * Flush user cache and TLB mappings, and then remove this CPU
         * from the vm mask set of all processes.
+        *
+        * Caches are flushed to the Level of Unification Inner Shareable
+        * to write-back dirty lines to unified caches shared by all CPUs.
         */
-       flush_cache_all();
+       flush_cache_louis();
        local_flush_tlb_all();
 
        clear_tasks_mm_cpumask(cpu);