diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2005-09-06 00:59:47 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-06 02:57:46 -0400 |
commit | 14b34661615ec036ab4c91637913706e4caccc93 (patch) | |
tree | 98915b1889422383a85186d8455ecca69fa2327b /arch/ppc64/mm/slb.c | |
parent | 0fdf0b8634055b016f7b93cfcdea2eb9091f0271 (diff) |
[PATCH] Invert sense of SLB class bit
Currently, we set the class bit in kernel SLB entries, and clear it on
user SLB entries. On POWER5, ERAT entries created in real mode have
the class bit clear. So to avoid flushing kernel ERAT entries on each
context switch, this patch inverts our usage of the class bit, setting
it on user SLB entries and clearing it on kernel SLB entries.
Booted on POWER5 and G5.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/mm/slb.c')
-rw-r--r-- | arch/ppc64/mm/slb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ppc64/mm/slb.c b/arch/ppc64/mm/slb.c index 244150a0bc18..0473953f6a37 100644 --- a/arch/ppc64/mm/slb.c +++ b/arch/ppc64/mm/slb.c | |||
@@ -87,8 +87,8 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) | |||
87 | int i; | 87 | int i; |
88 | asm volatile("isync" : : : "memory"); | 88 | asm volatile("isync" : : : "memory"); |
89 | for (i = 0; i < offset; i++) { | 89 | for (i = 0; i < offset; i++) { |
90 | esid_data = (unsigned long)get_paca()->slb_cache[i] | 90 | esid_data = ((unsigned long)get_paca()->slb_cache[i] |
91 | << SID_SHIFT; | 91 | << SID_SHIFT) | SLBIE_C; |
92 | asm volatile("slbie %0" : : "r" (esid_data)); | 92 | asm volatile("slbie %0" : : "r" (esid_data)); |
93 | } | 93 | } |
94 | asm volatile("isync" : : : "memory"); | 94 | asm volatile("isync" : : : "memory"); |