flush_icache_range(9)
π flush_icache_range(9) π
okay so first things first, bestie β this page lives in the Kernel API Manual, and the star of the show is flush_icache_range(9). yes we're in kernel land today, put your big-girl hat on π
β¨ NAME β¨
flush_icache_range β write any modified data cache blocks out to memory and invalidate the corresponding blocks in the instruction cache
like, the whole serve: push your dirty data-cache blocks out to memory, then yeet the matching instruction-cache blocks so nobody's running stale code. iconic behaviour honestly π
π¦ SYNOPSIS π¦
void flush_icache_range (unsigned long start , unsigned long stop );
that's it. that's the whole signature. void return, so nothing comes back at you β it just does the thing β¨
πΈ ARGUMENTS πΈ
startβ the start address. where the vibes begin π«Άstopβ the stop address, and it's exclusive (so it's not included, don't come for me, that's just how it is)
π₯ DESCRIPTION π₯
so here's the tea β β generic code will call this after writing memory, before executing from it.
read that again. after writing. before executing. it's giving "clean up your room before your mum sees it" energy. you write the bytes, you flush the caches so the instruction side actually sees them, then you jump in and run it. no cap, that ordering is the entire point π
β οΈ bestie this is a "do it in the right order or have a bad time" situation β the manpage is very clear that this is what generic code does: call it after writing memory, before executing from it. don't freelance π
π§ SEE ALSO π§
- Kernel file
./arch/powerpc/mm/cacheflush.c flush_coherent_icache(9)invalidate_icache_range(9)flush_dcache_icache_phys(9)__flush_dcache_icache(9)
all the cache-flushing besties in one place, we love a supportive friend group π
and that's the page, periodt π this one's from ./arch/powerpc/mm in the Kernel API Manual, dated October 2026 β go flush responsibly, mwah ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms