powerpc: Fix __flush_icache_range on 44x
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>
Wed, 19 Aug 2009 04:27:53 +0000 (04:27 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 27 Aug 2009 03:12:52 +0000 (13:12 +1000)
commit14d757520a08d09745c3b18bb34addd9bef56e2d
treeb75c1f6d29cb0439bef6fdf8bf2332987e573083
parentea3cc330ac0cd521ff07c7cd432a1848c19a7e92
powerpc: Fix __flush_icache_range on 44x

The ptrace POKETEXT interface allows a process to modify the text pages of
a child process being ptraced, usually to insert breakpoints via trap
instructions.  The kernel eventually calls copy_to_user_page, which in turn
calls __flush_icache_range to invalidate the icache lines for the child
process.

However, this function does not work on 44x due to the icache being virtually
indexed.  This was noticed by a breakpoint being triggered after it had been
cleared by ltrace on a 440EPx board.  The convenient solution is to do a
flash invalidate of the icache in the __flush_icache_range function.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/misc_32.S
This page took 0.024267 seconds and 5 git commands to generate.