Skip to content

Commit febe429

Browse files
danglin44hdeller
authored andcommitted
parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm
We have four routines in pacache.S that use temporary alias pages: copy_user_page_asm(), clear_user_page_asm(), flush_dcache_page_asm() and flush_icache_page_asm(). copy_user_page_asm() and clear_user_page_asm() don't purge the TLB entry used for the operation. flush_dcache_page_asm() and flush_icache_page_asm do purge the entry. Presumably, this was thought to optimize TLB use. However, the operation is quite heavy weight on PA 1.X processors as we need to take the TLB lock and a TLB broadcast is sent to all processors. This patch removes the purges from flush_dcache_page_asm() and flush_icache_page_asm. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: <stable@vger.kernel.org> # v3.16+ Signed-off-by: Helge Deller <deller@gmx.de>
1 parent c78e710 commit febe429

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

arch/parisc/kernel/pacache.S

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -892,19 +892,10 @@ ENTRY_CFI(flush_dcache_page_asm)
892892
fdc,m r31(%r28)
893893
fdc,m r31(%r28)
894894
fdc,m r31(%r28)
895-
cmpb,COND(<<) %r28, %r25,1b
895+
cmpb,COND(<<) %r28, %r25,1b
896896
fdc,m r31(%r28)
897897

898898
sync
899-
900-
#ifdef CONFIG_PA20
901-
pdtlb,l %r0(%r25)
902-
#else
903-
tlb_lock %r20,%r21,%r22
904-
pdtlb %r0(%r25)
905-
tlb_unlock %r20,%r21,%r22
906-
#endif
907-
908899
bv %r0(%r2)
909900
nop
910901
.exit
@@ -979,17 +970,6 @@ ENTRY_CFI(flush_icache_page_asm)
979970
fic,m %r31(%sr4,%r28)
980971

981972
sync
982-
983-
#ifdef CONFIG_PA20
984-
pdtlb,l %r0(%r28)
985-
pitlb,l %r0(%sr4,%r25)
986-
#else
987-
tlb_lock %r20,%r21,%r22
988-
pdtlb %r0(%r28)
989-
pitlb %r0(%sr4,%r25)
990-
tlb_unlock %r20,%r21,%r22
991-
#endif
992-
993973
bv %r0(%r2)
994974
nop
995975
.exit

0 commit comments

Comments
 (0)