<div dir="ltr"><div><div><div><div>Hi,<br><br></div>i was reading trough arch/powerpc/kernel/misc32.S looking at the icbi and iccci instructions, from whats on print in <a href="http://s.eeweb.com/members/kvks_kumar/answers/1356585717-PPC440_UM2013.pdf">http://s.eeweb.com/members/kvks_kumar/answers/1356585717-PPC440_UM2013.pdf</a> (page 272) iccci should be used once in the power-on / reset routine, and as far as flush_icache_range goes presumably before icbi is called?<br>
</div><br></div>So should not flush_icache_range go<br></div>#ifdef CONFIG_44x<br><div>iccci 0, r0<br></div><div>#endif<br></div><div>icbi 0,r6<br><br>arch/powerpc/kernel/misc32.S:<br><div><div>/*<br> * Write any modified data cache blocks out to memory<br>
* and invalidate the corresponding instruction cache blocks.<br> * This is a no-op on the 601.<br> *<br> * flush_icache_range(unsigned long start, unsigned long stop)<br> */<br>_KPROBE(__flush_icache_range)<br>BEGIN_FTR_SECTION<br>
blr /* for 601, do nothing */<br>END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)<br> li r5,L1_CACHE_BYTES-1<br> andc r3,r3,r5<br> subf r4,r3,r4<br> add r4,r4,r5<br> srwi. r4,r4,L1_CACHE_SHIFT<br>
beqlr<br> mtctr r4<br> mr r6,r3<br>1: dcbst 0,r3<br> addi r3,r3,L1_CACHE_BYTES<br> bdnz 1b<br> sync /* wait for dcbst's to get to ram */<br>#ifndef CONFIG_44x<br> mtctr r4<br>
2: icbi 0,r6<br> addi r6,r6,L1_CACHE_BYTES<br> bdnz 2b<br>#else<br> /* Flash invalidate on 44x because we are passed kmapped addresses and<br> this doesn't work for userspace pages due to the virtually tagged<br>
icache. Sigh. */<br> iccci 0, r0<br>#endif<br> sync /* additional sync needed on g4 */<br> isync<br> blr<br><br><br></div><div>Best regards<br></div><div>-Mike<br></div></div></div></div>