aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@bell.net>2016-12-06 22:02:01 -0500
committerHelge Deller <deller@gmx.de>2016-12-07 03:01:21 -0500
commitfebe42964fe182281859b3d43d844bb25ca49367 (patch)
tree5747f9ba180c5b7f530d0b0ad5b8d3a945004177
parentc78e710c1c9fbeff43dddc0aa3d0ff458e70b0cc (diff)
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>
-rw-r--r--arch/parisc/kernel/pacache.S22
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S
index 1b39a2acaadf..adf7187f8951 100644
--- a/arch/parisc/kernel/pacache.S
+++ b/arch/parisc/kernel/pacache.S
@@ -892,19 +892,10 @@ ENTRY_CFI(flush_dcache_page_asm)
892 fdc,m r31(%r28) 892 fdc,m r31(%r28)
893 fdc,m r31(%r28) 893 fdc,m r31(%r28)
894 fdc,m r31(%r28) 894 fdc,m r31(%r28)
895 cmpb,COND(<<) %r28, %r25,1b 895 cmpb,COND(<<) %r28, %r25,1b
896 fdc,m r31(%r28) 896 fdc,m r31(%r28)
897 897
898 sync 898 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
908 bv %r0(%r2) 899 bv %r0(%r2)
909 nop 900 nop
910 .exit 901 .exit
@@ -979,17 +970,6 @@ ENTRY_CFI(flush_icache_page_asm)
979 fic,m %r31(%sr4,%r28) 970 fic,m %r31(%sr4,%r28)
980 971
981 sync 972 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
993 bv %r0(%r2) 973 bv %r0(%r2)
994 nop 974 nop
995 .exit 975 .exit