diff options
Diffstat (limited to 'arch/parisc/kernel/pacache.S')
-rw-r--r-- | arch/parisc/kernel/pacache.S | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 5901092e0196..e3246a5ca74f 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -37,8 +37,9 @@ | |||
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/cache.h> | 38 | #include <asm/cache.h> |
39 | #include <linux/linkage.h> | 39 | #include <linux/linkage.h> |
40 | #include <linux/init.h> | ||
40 | 41 | ||
41 | .text | 42 | __HEAD |
42 | .align 128 | 43 | .align 128 |
43 | 44 | ||
44 | ENTRY(flush_tlb_all_local) | 45 | ENTRY(flush_tlb_all_local) |
@@ -85,7 +86,7 @@ ENTRY(flush_tlb_all_local) | |||
85 | LDREG ITLB_OFF_COUNT(%r1), %arg2 | 86 | LDREG ITLB_OFF_COUNT(%r1), %arg2 |
86 | LDREG ITLB_LOOP(%r1), %arg3 | 87 | LDREG ITLB_LOOP(%r1), %arg3 |
87 | 88 | ||
88 | ADDIB= -1, %arg3, fitoneloop /* Preadjust and test */ | 89 | addib,COND(=) -1, %arg3, fitoneloop /* Preadjust and test */ |
89 | movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ | 90 | movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ |
90 | copy %arg0, %r28 /* Init base addr */ | 91 | copy %arg0, %r28 /* Init base addr */ |
91 | 92 | ||
@@ -95,14 +96,14 @@ fitmanyloop: /* Loop if LOOP >= 2 */ | |||
95 | copy %arg2, %r29 /* Init middle loop count */ | 96 | copy %arg2, %r29 /* Init middle loop count */ |
96 | 97 | ||
97 | fitmanymiddle: /* Loop if LOOP >= 2 */ | 98 | fitmanymiddle: /* Loop if LOOP >= 2 */ |
98 | ADDIB> -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ | 99 | addib,COND(>) -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ |
99 | pitlbe 0(%sr1, %r28) | 100 | pitlbe 0(%sr1, %r28) |
100 | pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ | 101 | pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ |
101 | ADDIB> -1, %r29, fitmanymiddle /* Middle loop decr */ | 102 | addib,COND(>) -1, %r29, fitmanymiddle /* Middle loop decr */ |
102 | copy %arg3, %r31 /* Re-init inner loop count */ | 103 | copy %arg3, %r31 /* Re-init inner loop count */ |
103 | 104 | ||
104 | movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ | 105 | movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ |
105 | ADDIB<=,n -1, %r22, fitdone /* Outer loop count decr */ | 106 | addib,COND(<=),n -1, %r22, fitdone /* Outer loop count decr */ |
106 | 107 | ||
107 | fitoneloop: /* Loop if LOOP = 1 */ | 108 | fitoneloop: /* Loop if LOOP = 1 */ |
108 | mtsp %r20, %sr1 | 109 | mtsp %r20, %sr1 |
@@ -110,10 +111,10 @@ fitoneloop: /* Loop if LOOP = 1 */ | |||
110 | copy %arg2, %r29 /* init middle loop count */ | 111 | copy %arg2, %r29 /* init middle loop count */ |
111 | 112 | ||
112 | fitonemiddle: /* Loop if LOOP = 1 */ | 113 | fitonemiddle: /* Loop if LOOP = 1 */ |
113 | ADDIB> -1, %r29, fitonemiddle /* Middle loop count decr */ | 114 | addib,COND(>) -1, %r29, fitonemiddle /* Middle loop count decr */ |
114 | pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ | 115 | pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ |
115 | 116 | ||
116 | ADDIB> -1, %r22, fitoneloop /* Outer loop count decr */ | 117 | addib,COND(>) -1, %r22, fitoneloop /* Outer loop count decr */ |
117 | add %r21, %r20, %r20 /* increment space */ | 118 | add %r21, %r20, %r20 /* increment space */ |
118 | 119 | ||
119 | fitdone: | 120 | fitdone: |
@@ -128,7 +129,7 @@ fitdone: | |||
128 | LDREG DTLB_OFF_COUNT(%r1), %arg2 | 129 | LDREG DTLB_OFF_COUNT(%r1), %arg2 |
129 | LDREG DTLB_LOOP(%r1), %arg3 | 130 | LDREG DTLB_LOOP(%r1), %arg3 |
130 | 131 | ||
131 | ADDIB= -1, %arg3, fdtoneloop /* Preadjust and test */ | 132 | addib,COND(=) -1, %arg3, fdtoneloop /* Preadjust and test */ |
132 | movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ | 133 | movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ |
133 | copy %arg0, %r28 /* Init base addr */ | 134 | copy %arg0, %r28 /* Init base addr */ |
134 | 135 | ||
@@ -138,14 +139,14 @@ fdtmanyloop: /* Loop if LOOP >= 2 */ | |||
138 | copy %arg2, %r29 /* Init middle loop count */ | 139 | copy %arg2, %r29 /* Init middle loop count */ |
139 | 140 | ||
140 | fdtmanymiddle: /* Loop if LOOP >= 2 */ | 141 | fdtmanymiddle: /* Loop if LOOP >= 2 */ |
141 | ADDIB> -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ | 142 | addib,COND(>) -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ |
142 | pdtlbe 0(%sr1, %r28) | 143 | pdtlbe 0(%sr1, %r28) |
143 | pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ | 144 | pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ |
144 | ADDIB> -1, %r29, fdtmanymiddle /* Middle loop decr */ | 145 | addib,COND(>) -1, %r29, fdtmanymiddle /* Middle loop decr */ |
145 | copy %arg3, %r31 /* Re-init inner loop count */ | 146 | copy %arg3, %r31 /* Re-init inner loop count */ |
146 | 147 | ||
147 | movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ | 148 | movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ |
148 | ADDIB<=,n -1, %r22,fdtdone /* Outer loop count decr */ | 149 | addib,COND(<=),n -1, %r22,fdtdone /* Outer loop count decr */ |
149 | 150 | ||
150 | fdtoneloop: /* Loop if LOOP = 1 */ | 151 | fdtoneloop: /* Loop if LOOP = 1 */ |
151 | mtsp %r20, %sr1 | 152 | mtsp %r20, %sr1 |
@@ -153,10 +154,10 @@ fdtoneloop: /* Loop if LOOP = 1 */ | |||
153 | copy %arg2, %r29 /* init middle loop count */ | 154 | copy %arg2, %r29 /* init middle loop count */ |
154 | 155 | ||
155 | fdtonemiddle: /* Loop if LOOP = 1 */ | 156 | fdtonemiddle: /* Loop if LOOP = 1 */ |
156 | ADDIB> -1, %r29, fdtonemiddle /* Middle loop count decr */ | 157 | addib,COND(>) -1, %r29, fdtonemiddle /* Middle loop count decr */ |
157 | pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ | 158 | pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ |
158 | 159 | ||
159 | ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ | 160 | addib,COND(>) -1, %r22, fdtoneloop /* Outer loop count decr */ |
160 | add %r21, %r20, %r20 /* increment space */ | 161 | add %r21, %r20, %r20 /* increment space */ |
161 | 162 | ||
162 | 163 | ||
@@ -209,18 +210,18 @@ ENTRY(flush_instruction_cache_local) | |||
209 | LDREG ICACHE_COUNT(%r1), %arg2 | 210 | LDREG ICACHE_COUNT(%r1), %arg2 |
210 | LDREG ICACHE_LOOP(%r1), %arg3 | 211 | LDREG ICACHE_LOOP(%r1), %arg3 |
211 | rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ | 212 | rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ |
212 | ADDIB= -1, %arg3, fioneloop /* Preadjust and test */ | 213 | addib,COND(=) -1, %arg3, fioneloop /* Preadjust and test */ |
213 | movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ | 214 | movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ |
214 | 215 | ||
215 | fimanyloop: /* Loop if LOOP >= 2 */ | 216 | fimanyloop: /* Loop if LOOP >= 2 */ |
216 | ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ | 217 | addib,COND(>) -1, %r31, fimanyloop /* Adjusted inner loop decr */ |
217 | fice %r0(%sr1, %arg0) | 218 | fice %r0(%sr1, %arg0) |
218 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ | 219 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ |
219 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ | 220 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ |
220 | ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ | 221 | addib,COND(<=),n -1, %arg2, fisync /* Outer loop decr */ |
221 | 222 | ||
222 | fioneloop: /* Loop if LOOP = 1 */ | 223 | fioneloop: /* Loop if LOOP = 1 */ |
223 | ADDIB> -1, %arg2, fioneloop /* Outer loop count decr */ | 224 | addib,COND(>) -1, %arg2, fioneloop /* Outer loop count decr */ |
224 | fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ | 225 | fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ |
225 | 226 | ||
226 | fisync: | 227 | fisync: |
@@ -250,18 +251,18 @@ ENTRY(flush_data_cache_local) | |||
250 | LDREG DCACHE_COUNT(%r1), %arg2 | 251 | LDREG DCACHE_COUNT(%r1), %arg2 |
251 | LDREG DCACHE_LOOP(%r1), %arg3 | 252 | LDREG DCACHE_LOOP(%r1), %arg3 |
252 | rsm PSW_SM_I, %r22 | 253 | rsm PSW_SM_I, %r22 |
253 | ADDIB= -1, %arg3, fdoneloop /* Preadjust and test */ | 254 | addib,COND(=) -1, %arg3, fdoneloop /* Preadjust and test */ |
254 | movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ | 255 | movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ |
255 | 256 | ||
256 | fdmanyloop: /* Loop if LOOP >= 2 */ | 257 | fdmanyloop: /* Loop if LOOP >= 2 */ |
257 | ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ | 258 | addib,COND(>) -1, %r31, fdmanyloop /* Adjusted inner loop decr */ |
258 | fdce %r0(%sr1, %arg0) | 259 | fdce %r0(%sr1, %arg0) |
259 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ | 260 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ |
260 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ | 261 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ |
261 | ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ | 262 | addib,COND(<=),n -1, %arg2, fdsync /* Outer loop decr */ |
262 | 263 | ||
263 | fdoneloop: /* Loop if LOOP = 1 */ | 264 | fdoneloop: /* Loop if LOOP = 1 */ |
264 | ADDIB> -1, %arg2, fdoneloop /* Outer loop count decr */ | 265 | addib,COND(>) -1, %arg2, fdoneloop /* Outer loop count decr */ |
265 | fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ | 266 | fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ |
266 | 267 | ||
267 | fdsync: | 268 | fdsync: |
@@ -342,7 +343,7 @@ ENTRY(copy_user_page_asm) | |||
342 | * non-taken backward branch. Note that .+4 is a backwards branch. | 343 | * non-taken backward branch. Note that .+4 is a backwards branch. |
343 | * The ldd should only get executed if the branch is taken. | 344 | * The ldd should only get executed if the branch is taken. |
344 | */ | 345 | */ |
345 | ADDIB>,n -1, %r1, 1b /* bundle 10 */ | 346 | addib,COND(>),n -1, %r1, 1b /* bundle 10 */ |
346 | ldd 0(%r25), %r19 /* start next loads */ | 347 | ldd 0(%r25), %r19 /* start next loads */ |
347 | 348 | ||
348 | #else | 349 | #else |
@@ -391,7 +392,7 @@ ENTRY(copy_user_page_asm) | |||
391 | stw %r21, 56(%r26) | 392 | stw %r21, 56(%r26) |
392 | stw %r22, 60(%r26) | 393 | stw %r22, 60(%r26) |
393 | ldo 64(%r26), %r26 | 394 | ldo 64(%r26), %r26 |
394 | ADDIB>,n -1, %r1, 1b | 395 | addib,COND(>),n -1, %r1, 1b |
395 | ldw 0(%r25), %r19 | 396 | ldw 0(%r25), %r19 |
396 | #endif | 397 | #endif |
397 | bv %r0(%r2) | 398 | bv %r0(%r2) |
@@ -515,7 +516,7 @@ ENTRY(copy_user_page_asm) | |||
515 | stw %r21, 56(%r28) | 516 | stw %r21, 56(%r28) |
516 | stw %r22, 60(%r28) | 517 | stw %r22, 60(%r28) |
517 | ldo 64(%r28), %r28 | 518 | ldo 64(%r28), %r28 |
518 | ADDIB> -1, %r1,1b | 519 | addib,COND(>) -1, %r1,1b |
519 | ldo 64(%r29), %r29 | 520 | ldo 64(%r29), %r29 |
520 | 521 | ||
521 | bv %r0(%r2) | 522 | bv %r0(%r2) |
@@ -574,7 +575,7 @@ ENTRY(__clear_user_page_asm) | |||
574 | std %r0, 104(%r28) | 575 | std %r0, 104(%r28) |
575 | std %r0, 112(%r28) | 576 | std %r0, 112(%r28) |
576 | std %r0, 120(%r28) | 577 | std %r0, 120(%r28) |
577 | ADDIB> -1, %r1, 1b | 578 | addib,COND(>) -1, %r1, 1b |
578 | ldo 128(%r28), %r28 | 579 | ldo 128(%r28), %r28 |
579 | 580 | ||
580 | #else /* ! CONFIG_64BIT */ | 581 | #else /* ! CONFIG_64BIT */ |
@@ -597,7 +598,7 @@ ENTRY(__clear_user_page_asm) | |||
597 | stw %r0, 52(%r28) | 598 | stw %r0, 52(%r28) |
598 | stw %r0, 56(%r28) | 599 | stw %r0, 56(%r28) |
599 | stw %r0, 60(%r28) | 600 | stw %r0, 60(%r28) |
600 | ADDIB> -1, %r1, 1b | 601 | addib,COND(>) -1, %r1, 1b |
601 | ldo 64(%r28), %r28 | 602 | ldo 64(%r28), %r28 |
602 | #endif /* CONFIG_64BIT */ | 603 | #endif /* CONFIG_64BIT */ |
603 | 604 | ||
@@ -640,7 +641,7 @@ ENTRY(flush_kernel_dcache_page_asm) | |||
640 | fdc,m %r23(%r26) | 641 | fdc,m %r23(%r26) |
641 | fdc,m %r23(%r26) | 642 | fdc,m %r23(%r26) |
642 | fdc,m %r23(%r26) | 643 | fdc,m %r23(%r26) |
643 | CMPB<< %r26, %r25,1b | 644 | cmpb,COND(<<) %r26, %r25,1b |
644 | fdc,m %r23(%r26) | 645 | fdc,m %r23(%r26) |
645 | 646 | ||
646 | sync | 647 | sync |
@@ -683,7 +684,7 @@ ENTRY(flush_user_dcache_page) | |||
683 | fdc,m %r23(%sr3, %r26) | 684 | fdc,m %r23(%sr3, %r26) |
684 | fdc,m %r23(%sr3, %r26) | 685 | fdc,m %r23(%sr3, %r26) |
685 | fdc,m %r23(%sr3, %r26) | 686 | fdc,m %r23(%sr3, %r26) |
686 | CMPB<< %r26, %r25,1b | 687 | cmpb,COND(<<) %r26, %r25,1b |
687 | fdc,m %r23(%sr3, %r26) | 688 | fdc,m %r23(%sr3, %r26) |
688 | 689 | ||
689 | sync | 690 | sync |
@@ -726,7 +727,7 @@ ENTRY(flush_user_icache_page) | |||
726 | fic,m %r23(%sr3, %r26) | 727 | fic,m %r23(%sr3, %r26) |
727 | fic,m %r23(%sr3, %r26) | 728 | fic,m %r23(%sr3, %r26) |
728 | fic,m %r23(%sr3, %r26) | 729 | fic,m %r23(%sr3, %r26) |
729 | CMPB<< %r26, %r25,1b | 730 | cmpb,COND(<<) %r26, %r25,1b |
730 | fic,m %r23(%sr3, %r26) | 731 | fic,m %r23(%sr3, %r26) |
731 | 732 | ||
732 | sync | 733 | sync |
@@ -769,7 +770,7 @@ ENTRY(purge_kernel_dcache_page) | |||
769 | pdc,m %r23(%r26) | 770 | pdc,m %r23(%r26) |
770 | pdc,m %r23(%r26) | 771 | pdc,m %r23(%r26) |
771 | pdc,m %r23(%r26) | 772 | pdc,m %r23(%r26) |
772 | CMPB<< %r26, %r25, 1b | 773 | cmpb,COND(<<) %r26, %r25, 1b |
773 | pdc,m %r23(%r26) | 774 | pdc,m %r23(%r26) |
774 | 775 | ||
775 | sync | 776 | sync |
@@ -833,7 +834,7 @@ ENTRY(flush_alias_page) | |||
833 | fdc,m %r23(%r28) | 834 | fdc,m %r23(%r28) |
834 | fdc,m %r23(%r28) | 835 | fdc,m %r23(%r28) |
835 | fdc,m %r23(%r28) | 836 | fdc,m %r23(%r28) |
836 | CMPB<< %r28, %r29, 1b | 837 | cmpb,COND(<<) %r28, %r29, 1b |
837 | fdc,m %r23(%r28) | 838 | fdc,m %r23(%r28) |
838 | 839 | ||
839 | sync | 840 | sync |
@@ -856,7 +857,7 @@ flush_user_dcache_range_asm: | |||
856 | ldo -1(%r23), %r21 | 857 | ldo -1(%r23), %r21 |
857 | ANDCM %r26, %r21, %r26 | 858 | ANDCM %r26, %r21, %r26 |
858 | 859 | ||
859 | 1: CMPB<<,n %r26, %r25, 1b | 860 | 1: cmpb,COND(<<),n %r26, %r25, 1b |
860 | fdc,m %r23(%sr3, %r26) | 861 | fdc,m %r23(%sr3, %r26) |
861 | 862 | ||
862 | sync | 863 | sync |
@@ -877,7 +878,7 @@ ENTRY(flush_kernel_dcache_range_asm) | |||
877 | ldo -1(%r23), %r21 | 878 | ldo -1(%r23), %r21 |
878 | ANDCM %r26, %r21, %r26 | 879 | ANDCM %r26, %r21, %r26 |
879 | 880 | ||
880 | 1: CMPB<<,n %r26, %r25,1b | 881 | 1: cmpb,COND(<<),n %r26, %r25,1b |
881 | fdc,m %r23(%r26) | 882 | fdc,m %r23(%r26) |
882 | 883 | ||
883 | sync | 884 | sync |
@@ -899,7 +900,7 @@ ENTRY(flush_user_icache_range_asm) | |||
899 | ldo -1(%r23), %r21 | 900 | ldo -1(%r23), %r21 |
900 | ANDCM %r26, %r21, %r26 | 901 | ANDCM %r26, %r21, %r26 |
901 | 902 | ||
902 | 1: CMPB<<,n %r26, %r25,1b | 903 | 1: cmpb,COND(<<),n %r26, %r25,1b |
903 | fic,m %r23(%sr3, %r26) | 904 | fic,m %r23(%sr3, %r26) |
904 | 905 | ||
905 | sync | 906 | sync |
@@ -942,7 +943,7 @@ ENTRY(flush_kernel_icache_page) | |||
942 | fic,m %r23(%sr4, %r26) | 943 | fic,m %r23(%sr4, %r26) |
943 | fic,m %r23(%sr4, %r26) | 944 | fic,m %r23(%sr4, %r26) |
944 | fic,m %r23(%sr4, %r26) | 945 | fic,m %r23(%sr4, %r26) |
945 | CMPB<< %r26, %r25, 1b | 946 | cmpb,COND(<<) %r26, %r25, 1b |
946 | fic,m %r23(%sr4, %r26) | 947 | fic,m %r23(%sr4, %r26) |
947 | 948 | ||
948 | sync | 949 | sync |
@@ -963,7 +964,7 @@ ENTRY(flush_kernel_icache_range_asm) | |||
963 | ldo -1(%r23), %r21 | 964 | ldo -1(%r23), %r21 |
964 | ANDCM %r26, %r21, %r26 | 965 | ANDCM %r26, %r21, %r26 |
965 | 966 | ||
966 | 1: CMPB<<,n %r26, %r25, 1b | 967 | 1: cmpb,COND(<<),n %r26, %r25, 1b |
967 | fic,m %r23(%sr4, %r26) | 968 | fic,m %r23(%sr4, %r26) |
968 | 969 | ||
969 | sync | 970 | sync |