Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mm: Use 32bit array for slb cache

With larger vsid we need to track more bits of ESID in slb cache
for slb invalidate.

Reviewed-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Aneesh Kumar K.V and committed by
Benjamin Herrenschmidt
735cafc3 ac8dc282

+5 -5
+1 -1
arch/powerpc/include/asm/paca.h
··· 100 100 /* SLB related definitions */ 101 101 u16 vmalloc_sllp; 102 102 u16 slb_cache_ptr; 103 - u16 slb_cache[SLB_CACHE_ENTRIES]; 103 + u32 slb_cache[SLB_CACHE_ENTRIES]; 104 104 #endif /* CONFIG_PPC_STD_MMU_64 */ 105 105 106 106 #ifdef CONFIG_PPC_BOOK3E
+4 -4
arch/powerpc/mm/slb_low.S
··· 270 270 bge 1f 271 271 272 272 /* still room in the slb cache */ 273 - sldi r11,r3,1 /* r11 = offset * sizeof(u16) */ 274 - rldicl r10,r10,36,28 /* get low 16 bits of the ESID */ 275 - add r11,r11,r13 /* r11 = (u16 *)paca + offset */ 276 - sth r10,PACASLBCACHE(r11) /* paca->slb_cache[offset] = esid */ 273 + sldi r11,r3,2 /* r11 = offset * sizeof(u32) */ 274 + srdi r10,r10,28 /* get the 36 bits of the ESID */ 275 + add r11,r11,r13 /* r11 = (u32 *)paca + offset */ 276 + stw r10,PACASLBCACHE(r11) /* paca->slb_cache[offset] = esid */ 277 277 addi r3,r3,1 /* offset++ */ 278 278 b 2f 279 279 1: /* offset >= SLB_CACHE_ENTRIES */