Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

parisc: Also flush data TLB in flush_icache_page_asm

This is the second issue I noticed in reviewing the parisc TLB code.

The fic instruction may use either the instruction or data TLB in
flushing the instruction cache. Thus, on machines with a split TLB, we
should also flush the data TLB after setting up the temporary alias
registers.

Although this has no functional impact, I changed the pdtlb and pitlb
instructions to consistently use the index register %r0. These
instructions do not support integer displacements.

Tested on rp3440 and c8000.

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>

authored by

John David Anglin and committed by
Helge Deller
5035b230 c0452fb9

+22 -15
+22 -15
arch/parisc/kernel/pacache.S
··· 96 96 97 97 fitmanymiddle: /* Loop if LOOP >= 2 */ 98 98 addib,COND(>) -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ 99 - pitlbe 0(%sr1, %r28) 99 + pitlbe %r0(%sr1, %r28) 100 100 pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ 101 101 addib,COND(>) -1, %r29, fitmanymiddle /* Middle loop decr */ 102 102 copy %arg3, %r31 /* Re-init inner loop count */ ··· 139 139 140 140 fdtmanymiddle: /* Loop if LOOP >= 2 */ 141 141 addib,COND(>) -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ 142 - pdtlbe 0(%sr1, %r28) 142 + pdtlbe %r0(%sr1, %r28) 143 143 pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ 144 144 addib,COND(>) -1, %r29, fdtmanymiddle /* Middle loop decr */ 145 145 copy %arg3, %r31 /* Re-init inner loop count */ ··· 626 626 /* Purge any old translations */ 627 627 628 628 #ifdef CONFIG_PA20 629 - pdtlb,l 0(%r28) 630 - pdtlb,l 0(%r29) 629 + pdtlb,l %r0(%r28) 630 + pdtlb,l %r0(%r29) 631 631 #else 632 632 tlb_lock %r20,%r21,%r22 633 - pdtlb 0(%r28) 634 - pdtlb 0(%r29) 633 + pdtlb %r0(%r28) 634 + pdtlb %r0(%r29) 635 635 tlb_unlock %r20,%r21,%r22 636 636 #endif 637 637 ··· 774 774 /* Purge any old translation */ 775 775 776 776 #ifdef CONFIG_PA20 777 - pdtlb,l 0(%r28) 777 + pdtlb,l %r0(%r28) 778 778 #else 779 779 tlb_lock %r20,%r21,%r22 780 - pdtlb 0(%r28) 780 + pdtlb %r0(%r28) 781 781 tlb_unlock %r20,%r21,%r22 782 782 #endif 783 783 ··· 858 858 /* Purge any old translation */ 859 859 860 860 #ifdef CONFIG_PA20 861 - pdtlb,l 0(%r28) 861 + pdtlb,l %r0(%r28) 862 862 #else 863 863 tlb_lock %r20,%r21,%r22 864 - pdtlb 0(%r28) 864 + pdtlb %r0(%r28) 865 865 tlb_unlock %r20,%r21,%r22 866 866 #endif 867 867 ··· 898 898 sync 899 899 900 900 #ifdef CONFIG_PA20 901 - pdtlb,l 0(%r25) 901 + pdtlb,l %r0(%r25) 902 902 #else 903 903 tlb_lock %r20,%r21,%r22 904 - pdtlb 0(%r25) 904 + pdtlb %r0(%r25) 905 905 tlb_unlock %r20,%r21,%r22 906 906 #endif 907 907 ··· 931 931 depwi 0, 31,PAGE_SHIFT, %r28 /* Clear any offset bits */ 932 932 #endif 933 933 934 - /* Purge any old translation */ 934 + /* Purge any old translation. Note that the FIC instruction 935 + * may use either the instruction or data TLB. Given that we 936 + * have a flat address space, it's not clear which TLB will be 937 + * used. So, we purge both entries. */ 935 938 936 939 #ifdef CONFIG_PA20 940 + pdtlb,l %r0(%r28) 937 941 pitlb,l %r0(%sr4,%r28) 938 942 #else 939 943 tlb_lock %r20,%r21,%r22 940 - pitlb (%sr4,%r28) 944 + pdtlb %r0(%r28) 945 + pitlb %r0(%sr4,%r28) 941 946 tlb_unlock %r20,%r21,%r22 942 947 #endif 943 948 ··· 981 976 sync 982 977 983 978 #ifdef CONFIG_PA20 979 + pdtlb,l %r0(%r28) 984 980 pitlb,l %r0(%sr4,%r25) 985 981 #else 986 982 tlb_lock %r20,%r21,%r22 987 - pitlb (%sr4,%r25) 983 + pdtlb %r0(%r28) 984 + pitlb %r0(%sr4,%r25) 988 985 tlb_unlock %r20,%r21,%r22 989 986 #endif 990 987