flush_icache_range in the sticore driver
Hi all,
flush_icache_range is supposed to flush the instruction cache, which is something no driver should be doing. It was added in commit 03b18f1b2afe ("[PARISC] Clean up sti_flush") but the explanation in there looks odd.
Can someone shed a light what flushes this tries to flush and why it can't be done behind a proper API?
Quoted 9 lines · Christoph Hellwig
Hi all,
flush_icache_rangeis supposed to flush the instruction cache, which is something no driver should be doing. It was added in commit03b18f1b2afe("[PARISC] Clean upsti_flush") but the explanation in there looks odd.Can someone shed a light what flushes this tries to flush and why it can't be done behind a proper API?
What's wrong with the explanation:
"sti_flush is supposed to flush the caches so we can execute the STI rom we copied to memory."
Which is in that commit?
The STI driver is taking the executable STI ROM code, which is in a very slow to access part of the system and copying it to RAM so it can be executed. After the driver has done the copy it needs to flush the icache just in case there's anything stale in there before executing the newly copied code.
If you grep the drive for sti_call, you'll see all the points we call into the copied rom code.
James