[PATCH] ppc64: mask lower bits in tlbie
Anton Blanchard
anton at samba.org
Wed Jan 26 00:59:30 EST 2005
Hi,
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.
Anton
Signed-off-by: Anton Blanchard <anton at samba.org>
diff -puN include/asm-ppc64/mmu.h~fix_tlbie include/asm-ppc64/mmu.h
--- gr_work/include/asm-ppc64/mmu.h~fix_tlbie 2005-01-12 22:54:35.098404315 -0600
+++ gr_work-anton/include/asm-ppc64/mmu.h 2005-01-12 22:54:35.107402890 -0600
@@ -122,10 +122,13 @@ static inline void __tlbie(unsigned long
/* 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 lon
{
/* 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
_
More information about the Linuxppc64-dev
mailing list