Commit ac8dc282 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Benjamin Herrenschmidt

powerpc/mm: Use the required number of VSID bits in slbmte

ASM_VSID_SCRAMBLE can leave non-zero bits in the high 28 bits of the result
for 256MB segment (40 bits for 1T segment). Properly mask them before using
the values in slbmte
Reviewed-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 7aa0727f
...@@ -223,7 +223,11 @@ _GLOBAL(slb_allocate_user) ...@@ -223,7 +223,11 @@ _GLOBAL(slb_allocate_user)
*/ */
slb_finish_load: slb_finish_load:
ASM_VSID_SCRAMBLE(r10,r9,256M) ASM_VSID_SCRAMBLE(r10,r9,256M)
rldimi r11,r10,SLB_VSID_SHIFT,16 /* combine VSID and flags */ /*
* bits above VSID_BITS_256M need to be ignored from r10
* also combine VSID and flags
*/
rldimi r11,r10,SLB_VSID_SHIFT,(64 - (SLB_VSID_SHIFT + VSID_BITS_256M))
/* r3 = EA, r11 = VSID data */ /* r3 = EA, r11 = VSID data */
/* /*
...@@ -287,7 +291,11 @@ _GLOBAL(slb_compare_rr_to_size) ...@@ -287,7 +291,11 @@ _GLOBAL(slb_compare_rr_to_size)
slb_finish_load_1T: slb_finish_load_1T:
srdi r10,r10,40-28 /* get 1T ESID */ srdi r10,r10,40-28 /* get 1T ESID */
ASM_VSID_SCRAMBLE(r10,r9,1T) ASM_VSID_SCRAMBLE(r10,r9,1T)
rldimi r11,r10,SLB_VSID_SHIFT_1T,16 /* combine VSID and flags */ /*
* bits above VSID_BITS_1T need to be ignored from r10
* also combine VSID and flags
*/
rldimi r11,r10,SLB_VSID_SHIFT_1T,(64 - (SLB_VSID_SHIFT_1T + VSID_BITS_1T))
li r10,MMU_SEGSIZE_1T li r10,MMU_SEGSIZE_1T
rldimi r11,r10,SLB_VSID_SSIZE_SHIFT,0 /* insert segment size */ rldimi r11,r10,SLB_VSID_SSIZE_SHIFT,0 /* insert segment size */
......
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