提交 89156c10 编写于 作者: J James Clarke 提交者: Greg Kroah-Hartman

sparc64: Fix regression in non-hypervisor TLB flush xcall

commit d3c976c14ad8af421134c428b0a89ff8dd3bd8f8 upstream.

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: a74ad5e6 ("sparc64: Handle extremely large kernel TLB range flushes more gracefully.")
Reported-by: NMeelis Roos <mroos@linux.ee>
Tested-by: NMeelis Roos <mroos@linux.ee>
Signed-off-by: NJames Clarke <jrtc27@jrtc27.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e109a984
...@@ -587,7 +587,7 @@ xcall_flush_tlb_kernel_range: /* 44 insns */ ...@@ -587,7 +587,7 @@ xcall_flush_tlb_kernel_range: /* 44 insns */
sub %g7, %g1, %g3 sub %g7, %g1, %g3
srlx %g3, 18, %g2 srlx %g3, 18, %g2
brnz,pn %g2, 2f brnz,pn %g2, 2f
add %g2, 1, %g2 sethi %hi(PAGE_SIZE), %g2
sub %g3, %g2, %g3 sub %g3, %g2, %g3
or %g1, 0x20, %g1 ! Nucleus or %g1, 0x20, %g1 ! Nucleus
1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP 1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP
...@@ -751,7 +751,7 @@ __cheetah_xcall_flush_tlb_kernel_range: /* 44 insns */ ...@@ -751,7 +751,7 @@ __cheetah_xcall_flush_tlb_kernel_range: /* 44 insns */
sub %g7, %g1, %g3 sub %g7, %g1, %g3
srlx %g3, 18, %g2 srlx %g3, 18, %g2
brnz,pn %g2, 2f brnz,pn %g2, 2f
add %g2, 1, %g2 sethi %hi(PAGE_SIZE), %g2
sub %g3, %g2, %g3 sub %g3, %g2, %g3
or %g1, 0x20, %g1 ! Nucleus or %g1, 0x20, %g1 ! Nucleus
1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP 1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册