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

powerpc/32s: In add_hash_page(), calculate VSID later

VSID is only for create_hpte(). When _PAGE_HASHPTE is
already set, add_hash_page() bails out without calling
create_hpte() and doesn't need the value of VSID.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/3907199974c89b85a3441cf3f528751173b7649c.1606247495.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
fec6166b c5ccb4e7

+6 -6
+6 -6
arch/powerpc/mm/book3s32/hash_low.S
··· 182 182 mflr r0 183 183 stw r0,4(r1) 184 184 185 - /* Convert context and va to VSID */ 186 - mulli r3,r3,897*16 /* multiply context by context skew */ 187 - rlwinm r0,r4,4,28,31 /* get ESID (top 4 bits of va) */ 188 - mulli r0,r0,0x111 /* multiply by ESID skew */ 189 - add r3,r3,r0 /* note create_hpte trims to 24 bits */ 190 - 191 185 #ifdef CONFIG_SMP 192 186 lwz r8,TASK_CPU(r2) /* to go in mmu_hash_lock */ 193 187 oris r8,r8,12 ··· 244 250 ori r5,r6,_PAGE_HASHPTE 245 251 stwcx. r5,0,r8 246 252 bne- 1b 253 + 254 + /* Convert context and va to VSID */ 255 + mulli r3,r3,897*16 /* multiply context by context skew */ 256 + rlwinm r0,r4,4,28,31 /* get ESID (top 4 bits of va) */ 257 + mulli r0,r0,0x111 /* multiply by ESID skew */ 258 + add r3,r3,r0 /* note create_hpte trims to 24 bits */ 247 259 248 260 bl create_hpte 249 261