]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
63b3efc424cee2c466b15127847078dbe3d91e16
[thirdparty/kernel/stable-queue.git] /
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
5
6 From: John David Anglin <dave.anglin@bell.net>
7
8 commit febe42964fe182281859b3d43d844bb25ca49367 upstream.
9
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.
15
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.
19
20 This patch removes the purges from flush_dcache_page_asm() and
21 flush_icache_page_asm.
22
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>
26
27 ---
28 arch/parisc/kernel/pacache.S | 22 +---------------------
29 1 file changed, 1 insertion(+), 21 deletions(-)
30
31 --- a/arch/parisc/kernel/pacache.S
32 +++ b/arch/parisc/kernel/pacache.S
33 @@ -886,19 +886,10 @@ ENTRY(flush_dcache_page_asm)
34 fdc,m r31(%r28)
35 fdc,m r31(%r28)
36 fdc,m r31(%r28)
37 - cmpb,COND(<<) %r28, %r25,1b
38 + cmpb,COND(<<) %r28, %r25,1b
39 fdc,m r31(%r28)
40
41 sync
42 -
43 -#ifdef CONFIG_PA20
44 - pdtlb,l %r0(%r25)
45 -#else
46 - tlb_lock %r20,%r21,%r22
47 - pdtlb %r0(%r25)
48 - tlb_unlock %r20,%r21,%r22
49 -#endif
50 -
51 bv %r0(%r2)
52 nop
53 .exit
54 @@ -973,17 +964,6 @@ ENTRY(flush_icache_page_asm)
55 fic,m %r31(%sr4,%r28)
56
57 sync
58 -
59 -#ifdef CONFIG_PA20
60 - pdtlb,l %r0(%r28)
61 - pitlb,l %r0(%sr4,%r25)
62 -#else
63 - tlb_lock %r20,%r21,%r22
64 - pdtlb %r0(%r28)
65 - pitlb %r0(%sr4,%r25)
66 - tlb_unlock %r20,%r21,%r22
67 -#endif
68 -
69 bv %r0(%r2)
70 nop
71 .exit