diff options
author | Kevin Hao <haokexin@gmail.com> | 2013-08-06 12:23:30 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-14 06:56:06 +0200 |
commit | abb29c3bb13c7b747fae18b9c63b660529ccc612 (patch) | |
tree | 7db47abfcb4fd1ed18fc8942aeffed6ce176e0e5 /arch/powerpc/include/asm/cacheflush.h | |
parent | powerpc: Stop using non-architected shared_proc field in lppaca (diff) | |
download | linux-abb29c3bb13c7b747fae18b9c63b660529ccc612.tar.xz linux-abb29c3bb13c7b747fae18b9c63b660529ccc612.zip |
powerpc: Move the testing of CPU_FTR_COHERENT_ICACHE into __flush_icache_range
In function flush_icache_range(), we use cpu_has_feature() to test
the feature bit of CPU_FTR_COHERENT_ICACHE. But this seems not optimal
for two reasons:
a) For ppc32, the function __flush_icache_range() already do this
check with the macro END_FTR_SECTION_IFSET.
b) Compare with the cpu_has_feature(), the method of using macro
END_FTR_SECTION_IFSET will not introduce any runtime overhead.
[And while at it, add the missing required isync] -- BenH
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/cacheflush.h')
-rw-r--r-- | arch/powerpc/include/asm/cacheflush.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/cacheflush.h b/arch/powerpc/include/asm/cacheflush.h index b843e35122e8..60b620d64ac9 100644 --- a/arch/powerpc/include/asm/cacheflush.h +++ b/arch/powerpc/include/asm/cacheflush.h @@ -35,8 +35,7 @@ extern void __flush_disable_L1(void); extern void __flush_icache_range(unsigned long, unsigned long); static inline void flush_icache_range(unsigned long start, unsigned long stop) { - if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) - __flush_icache_range(start, stop); + __flush_icache_range(start, stop); } extern void flush_icache_user_range(struct vm_area_struct *vma, |