Commit 1e4e3efe authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 93d2490b
...@@ -122,10 +122,13 @@ static inline void __tlbie(unsigned long va, int large) ...@@ -122,10 +122,13 @@ static inline void __tlbie(unsigned long va, int large)
/* clear top 16 bits, non SLS segment */ /* clear top 16 bits, non SLS segment */
va &= ~(0xffffULL << 48); va &= ~(0xffffULL << 48);
if (large) if (large) {
va &= HPAGE_MASK;
asm volatile("tlbie %0,1" : : "r"(va) : "memory"); asm volatile("tlbie %0,1" : : "r"(va) : "memory");
else } else {
va &= PAGE_MASK;
asm volatile("tlbie %0,0" : : "r"(va) : "memory"); asm volatile("tlbie %0,0" : : "r"(va) : "memory");
}
} }
static inline void tlbie(unsigned long va, int large) static inline void tlbie(unsigned long va, int large)
...@@ -139,6 +142,7 @@ static inline void __tlbiel(unsigned long va) ...@@ -139,6 +142,7 @@ static inline void __tlbiel(unsigned long va)
{ {
/* clear top 16 bits, non SLS segment */ /* clear top 16 bits, non SLS segment */
va &= ~(0xffffULL << 48); va &= ~(0xffffULL << 48);
va &= PAGE_MASK;
/* /*
* Thanks to Alan Modra we are now able to use machine specific * Thanks to Alan Modra we are now able to use machine specific
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment