Skip to content

Commit d3c976c

Browse files
jrtc27davem330
authored andcommitted
sparc64: Fix regression in non-hypervisor TLB flush xcall
Previously, %g2 would end up with the value PAGE_SIZE, but after the commit mentioned below it ends up with the value 1 due to being reused for a different purpose. We need it to be PAGE_SIZE as we use it to step through pages in our demap loop, otherwise we set different flags in the low 12 bits of the address written to, thereby doing things other than a nucleus page flush. Fixes: a74ad5e ("sparc64: Handle extremely large kernel TLB range flushes more gracefully.") Reported-by: Meelis Roos <mroos@linux.ee> Tested-by: Meelis Roos <mroos@linux.ee> Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f2c7c76 commit d3c976c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/sparc/mm/ultra.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ xcall_flush_tlb_kernel_range: /* 44 insns */
587587
sub %g7, %g1, %g3
588588
srlx %g3, 18, %g2
589589
brnz,pn %g2, 2f
590-
add %g2, 1, %g2
590+
sethi %hi(PAGE_SIZE), %g2
591591
sub %g3, %g2, %g3
592592
or %g1, 0x20, %g1 ! Nucleus
593593
1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP
@@ -751,7 +751,7 @@ __cheetah_xcall_flush_tlb_kernel_range: /* 44 insns */
751751
sub %g7, %g1, %g3
752752
srlx %g3, 18, %g2
753753
brnz,pn %g2, 2f
754-
add %g2, 1, %g2
754+
sethi %hi(PAGE_SIZE), %g2
755755
sub %g3, %g2, %g3
756756
or %g1, 0x20, %g1 ! Nucleus
757757
1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP

0 commit comments

Comments
 (0)