diff options
author | Will Deacon <will.deacon@arm.com> | 2012-12-19 09:01:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-12-20 05:41:56 -0500 |
commit | d056a699dd3d9366dd3b4d9996e7848209199cda (patch) | |
tree | 158528d22412216c33487e57d40f76d64884a8be /arch/arm/mm/cache-v7.S | |
parent | 7bf9b7bef881aac820bf1f2e9951a17b09bd7e04 (diff) |
ARM: 7606/1: cache: flush to LoUU instead of LoUIS on uniprocessor CPUs
flush_cache_louis flushes the D-side caches to the point of unification
inner-shareable. On uniprocessor CPUs, this is defined as zero and
therefore no flushing will take place. Rather than invent a new interface
for UP systems, instead use our SMP_ON_UP patching code to read the
LoUU from the CLIDR instead.
Cc: <stable@vger.kernel.org>
Cc: Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/cache-v7.S')
-rw-r--r-- | arch/arm/mm/cache-v7.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index cd956647c21a..7539ec275065 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -44,8 +44,10 @@ ENDPROC(v7_flush_icache_all) | |||
44 | ENTRY(v7_flush_dcache_louis) | 44 | ENTRY(v7_flush_dcache_louis) |
45 | dmb @ ensure ordering with previous memory accesses | 45 | dmb @ ensure ordering with previous memory accesses |
46 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr | 46 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr |
47 | ands r3, r0, #0xe00000 @ extract LoUIS from clidr | 47 | ALT_SMP(ands r3, r0, #(7 << 21)) @ extract LoUIS from clidr |
48 | mov r3, r3, lsr #20 @ r3 = LoUIS * 2 | 48 | ALT_UP(ands r3, r0, #(7 << 27)) @ extract LoUU from clidr |
49 | ALT_SMP(mov r3, r3, lsr #20) @ r3 = LoUIS * 2 | ||
50 | ALT_UP(mov r3, r3, lsr #26) @ r3 = LoUU * 2 | ||
49 | moveq pc, lr @ return if level == 0 | 51 | moveq pc, lr @ return if level == 0 |
50 | mov r10, #0 @ r10 (starting level) = 0 | 52 | mov r10, #0 @ r10 (starting level) = 0 |
51 | b flush_levels @ start flushing cache levels | 53 | b flush_levels @ start flushing cache levels |