diff options
| author | Anton Blanchard <anton@samba.org> | 2005-02-01 16:38:11 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-02-01 16:38:11 -0800 |
| commit | 1e4e3efeffd6aa07789093d6d40053dcaa981116 (patch) | |
| tree | e964eea69116c1a37fd132729cfe89108ceebd31 /include | |
| parent | 93d2490bebcb6981f196cd84568c7e28b1a21ac0 (diff) | |
[PATCH] ppc64: mask lower bits in tlbie
We werent masking the lower bits of the VA in a tlbie(l) instruction.
While most CPUs ignore this we should play it safe and follow the spec.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/mmu.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index daebba6b7a17..188987e9d9d4 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h @@ -122,10 +122,13 @@ static inline void __tlbie(unsigned long va, int large) /* clear top 16 bits, non SLS segment */ va &= ~(0xffffULL << 48); - if (large) + if (large) { + va &= HPAGE_MASK; asm volatile("tlbie %0,1" : : "r"(va) : "memory"); - else + } else { + va &= PAGE_MASK; asm volatile("tlbie %0,0" : : "r"(va) : "memory"); + } } static inline void tlbie(unsigned long va, int large) @@ -139,6 +142,7 @@ static inline void __tlbiel(unsigned long va) { /* clear top 16 bits, non SLS segment */ va &= ~(0xffffULL << 48); + va &= PAGE_MASK; /* * Thanks to Alan Modra we are now able to use machine specific |
