1 From febe42964fe182281859b3d43d844bb25ca49367 Mon Sep 17 00:00:00 2001
2 From: John David Anglin <dave.anglin@bell.net>
3 Date: Tue, 6 Dec 2016 22:02:01 -0500
4 Subject: parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm
6 From: John David Anglin <dave.anglin@bell.net>
8 commit febe42964fe182281859b3d43d844bb25ca49367 upstream.
10 We have four routines in pacache.S that use temporary alias pages:
11 copy_user_page_asm(), clear_user_page_asm(), flush_dcache_page_asm() and
12 flush_icache_page_asm(). copy_user_page_asm() and clear_user_page_asm()
13 don't purge the TLB entry used for the operation.
14 flush_dcache_page_asm() and flush_icache_page_asm do purge the entry.
16 Presumably, this was thought to optimize TLB use. However, the
17 operation is quite heavy weight on PA 1.X processors as we need to take
18 the TLB lock and a TLB broadcast is sent to all processors.
20 This patch removes the purges from flush_dcache_page_asm() and
21 flush_icache_page_asm.
23 Signed-off-by: John David Anglin <dave.anglin@bell.net>
24 Signed-off-by: Helge Deller <deller@gmx.de>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28 arch/parisc/kernel/pacache.S | 22 +---------------------
29 1 file changed, 1 insertion(+), 21 deletions(-)
31 --- a/arch/parisc/kernel/pacache.S
32 +++ b/arch/parisc/kernel/pacache.S
33 @@ -886,19 +886,10 @@ ENTRY(flush_dcache_page_asm)
37 - cmpb,COND(<<) %r28, %r25,1b
38 + cmpb,COND(<<) %r28, %r25,1b
46 - tlb_lock %r20,%r21,%r22
48 - tlb_unlock %r20,%r21,%r22
54 @@ -973,17 +964,6 @@ ENTRY(flush_icache_page_asm)
61 - pitlb,l %r0(%sr4,%r25)
63 - tlb_lock %r20,%r21,%r22
65 - pitlb %r0(%sr4,%r25)
66 - tlb_unlock %r20,%r21,%r22