Skip to content

Commit

Permalink
powerpc32: small optimisation in flush_icache_range()
Browse files Browse the repository at this point in the history
Inlining of _dcache_range() functions has shown that the compiler
does the same thing a bit better with one insn less

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
  • Loading branch information
Christophe Leroy authored and Scott Wood committed Mar 11, 2016
1 parent 8478d7f commit 716fa91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,9 @@ BEGIN_FTR_SECTION
PURGE_PREFETCHED_INS
blr /* for 601, do nothing */
END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
li r5,L1_CACHE_BYTES-1
andc r3,r3,r5
rlwinm r3,r3,0,0,31 - L1_CACHE_SHIFT
subf r4,r3,r4
add r4,r4,r5
addi r4,r4,L1_CACHE_BYTES - 1
srwi. r4,r4,L1_CACHE_SHIFT
beqlr
mtctr r4
Expand Down

0 comments on commit 716fa91

Please sign in to comment.