diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-10-31 01:42:19 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2007-11-01 08:15:30 -0400 |
commit | b98ac05d5e460301fbea24cceed0f2a601c82e22 (patch) | |
tree | 2e556ad28a007d13339300fbbd4942d0ec9f023c /arch/ppc/mm | |
parent | e701d269aa28996f3502780951fe1b12d5d66b49 (diff) |
[POWERPC] 4xx: Deal with 44x virtually tagged icache
The 44x family has an interesting "feature" which is a virtually
tagged instruction cache (yuck !). So far, we haven't dealt with
it properly, which means we've been mostly lucky or people didn't
report the problems, unless people have been running custom patches
in their distro...
This is an attempt at fixing it properly. I chose to do it by
setting a global flag whenever we change a PTE that was previously
marked executable, and flush the entire instruction cache upon
return to user space when that happens.
This is a bit heavy handed, but it's hard to do more fine grained
flushes as the icbi instruction, on those processor, for some very
strange reasons (since the cache is virtually mapped) still requires
a valid TLB entry for reading in the target address space, which
isn't something I want to deal with.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/ppc/mm')
-rw-r--r-- | arch/ppc/mm/44x_mmu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c index 0a0a0487b334..6536a25cfcb8 100644 --- a/arch/ppc/mm/44x_mmu.c +++ b/arch/ppc/mm/44x_mmu.c | |||
@@ -61,6 +61,7 @@ extern char etext[], _stext[]; | |||
61 | */ | 61 | */ |
62 | unsigned int tlb_44x_index = 0; | 62 | unsigned int tlb_44x_index = 0; |
63 | unsigned int tlb_44x_hwater = 62; | 63 | unsigned int tlb_44x_hwater = 62; |
64 | int icache_44x_need_flush; | ||
64 | 65 | ||
65 | /* | 66 | /* |
66 | * "Pins" a 256MB TLB entry in AS0 for kernel lowmem | 67 | * "Pins" a 256MB TLB entry in AS0 for kernel lowmem |