]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Move the testing of CPU_FTR_COHERENT_ICACHE into __flush_icache_range
authorKevin Hao <haokexin@gmail.com>
Tue, 6 Aug 2013 10:23:30 +0000 (18:23 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Aug 2013 04:56:06 +0000 (14:56 +1000)
commit5a1bdefc0247e8bb463ba267e565f6a6297b7b67
tree7db47abfcb4fd1ed18fc8942aeffed6ce176e0e5
parent8d435f9e7b9b57aa68a7f160a25a3076599a0336
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>
arch/powerpc/include/asm/cacheflush.h
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/misc_64.S