diff options
Diffstat (limited to 'arch/parisc/kernel/pacache.S')
-rw-r--r-- | arch/parisc/kernel/pacache.S | 186 |
1 files changed, 97 insertions, 89 deletions
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 77e03bc0f935..9534ee17b9be 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -26,7 +26,7 @@ | |||
26 | * can be used. | 26 | * can be used. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifdef __LP64__ | 29 | #ifdef CONFIG_64BIT |
30 | #define ADDIB addib,* | 30 | #define ADDIB addib,* |
31 | #define CMPB cmpb,* | 31 | #define CMPB cmpb,* |
32 | #define ANDCM andcm,* | 32 | #define ANDCM andcm,* |
@@ -40,8 +40,10 @@ | |||
40 | .level 2.0 | 40 | .level 2.0 |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #include <asm/assembly.h> | 43 | #include <linux/config.h> |
44 | |||
44 | #include <asm/psw.h> | 45 | #include <asm/psw.h> |
46 | #include <asm/assembly.h> | ||
45 | #include <asm/pgtable.h> | 47 | #include <asm/pgtable.h> |
46 | #include <asm/cache.h> | 48 | #include <asm/cache.h> |
47 | 49 | ||
@@ -62,32 +64,23 @@ flush_tlb_all_local: | |||
62 | * to happen in real mode with all interruptions disabled. | 64 | * to happen in real mode with all interruptions disabled. |
63 | */ | 65 | */ |
64 | 66 | ||
65 | /* | 67 | /* pcxt_ssm_bug - relied upon translation! PA 2.0 Arch. F-4 and F-5 */ |
66 | * Once again, we do the rfi dance ... some day we need examine | 68 | rsm PSW_SM_I, %r19 /* save I-bit state */ |
67 | * all of our uses of this type of code and see what can be | 69 | load32 PA(1f), %r1 |
68 | * consolidated. | ||
69 | */ | ||
70 | |||
71 | rsm PSW_SM_I, %r19 /* relied upon translation! PA 2.0 Arch. F-5 */ | ||
72 | nop | 70 | nop |
73 | nop | 71 | nop |
74 | nop | 72 | nop |
75 | nop | 73 | nop |
76 | nop | 74 | nop |
77 | nop | 75 | |
78 | nop | 76 | rsm PSW_SM_Q, %r0 /* prep to load iia queue */ |
79 | |||
80 | rsm PSW_SM_Q, %r0 /* Turn off Q bit to load iia queue */ | ||
81 | ldil L%REAL_MODE_PSW, %r1 | ||
82 | ldo R%REAL_MODE_PSW(%r1), %r1 | ||
83 | mtctl %r1, %cr22 | ||
84 | mtctl %r0, %cr17 /* Clear IIASQ tail */ | 77 | mtctl %r0, %cr17 /* Clear IIASQ tail */ |
85 | mtctl %r0, %cr17 /* Clear IIASQ head */ | 78 | mtctl %r0, %cr17 /* Clear IIASQ head */ |
86 | ldil L%PA(1f), %r1 | ||
87 | ldo R%PA(1f)(%r1), %r1 | ||
88 | mtctl %r1, %cr18 /* IIAOQ head */ | 79 | mtctl %r1, %cr18 /* IIAOQ head */ |
89 | ldo 4(%r1), %r1 | 80 | ldo 4(%r1), %r1 |
90 | mtctl %r1, %cr18 /* IIAOQ tail */ | 81 | mtctl %r1, %cr18 /* IIAOQ tail */ |
82 | load32 REAL_MODE_PSW, %r1 | ||
83 | mtctl %r1, %ipsw | ||
91 | rfi | 84 | rfi |
92 | nop | 85 | nop |
93 | 86 | ||
@@ -178,29 +171,36 @@ fdtonemiddle: /* Loop if LOOP = 1 */ | |||
178 | ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ | 171 | ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ |
179 | add %r21, %r20, %r20 /* increment space */ | 172 | add %r21, %r20, %r20 /* increment space */ |
180 | 173 | ||
181 | fdtdone: | ||
182 | 174 | ||
183 | /* Switch back to virtual mode */ | 175 | fdtdone: |
176 | /* | ||
177 | * Switch back to virtual mode | ||
178 | */ | ||
179 | /* pcxt_ssm_bug */ | ||
180 | rsm PSW_SM_I, %r0 | ||
181 | load32 2f, %r1 | ||
182 | nop | ||
183 | nop | ||
184 | nop | ||
185 | nop | ||
186 | nop | ||
184 | 187 | ||
185 | rsm PSW_SM_Q, %r0 /* clear Q bit to load iia queue */ | 188 | rsm PSW_SM_Q, %r0 /* prep to load iia queue */ |
186 | ldil L%KERNEL_PSW, %r1 | ||
187 | ldo R%KERNEL_PSW(%r1), %r1 | ||
188 | or %r1, %r19, %r1 /* Set I bit if set on entry */ | ||
189 | mtctl %r1, %cr22 | ||
190 | mtctl %r0, %cr17 /* Clear IIASQ tail */ | 189 | mtctl %r0, %cr17 /* Clear IIASQ tail */ |
191 | mtctl %r0, %cr17 /* Clear IIASQ head */ | 190 | mtctl %r0, %cr17 /* Clear IIASQ head */ |
192 | ldil L%(2f), %r1 | ||
193 | ldo R%(2f)(%r1), %r1 | ||
194 | mtctl %r1, %cr18 /* IIAOQ head */ | 191 | mtctl %r1, %cr18 /* IIAOQ head */ |
195 | ldo 4(%r1), %r1 | 192 | ldo 4(%r1), %r1 |
196 | mtctl %r1, %cr18 /* IIAOQ tail */ | 193 | mtctl %r1, %cr18 /* IIAOQ tail */ |
194 | load32 KERNEL_PSW, %r1 | ||
195 | or %r1, %r19, %r1 /* I-bit to state on entry */ | ||
196 | mtctl %r1, %ipsw /* restore I-bit (entire PSW) */ | ||
197 | rfi | 197 | rfi |
198 | nop | 198 | nop |
199 | 199 | ||
200 | 2: bv %r0(%r2) | 200 | 2: bv %r0(%r2) |
201 | nop | 201 | nop |
202 | .exit | ||
203 | 202 | ||
203 | .exit | ||
204 | .procend | 204 | .procend |
205 | 205 | ||
206 | .export flush_instruction_cache_local,code | 206 | .export flush_instruction_cache_local,code |
@@ -227,7 +227,7 @@ flush_instruction_cache_local: | |||
227 | 227 | ||
228 | fimanyloop: /* Loop if LOOP >= 2 */ | 228 | fimanyloop: /* Loop if LOOP >= 2 */ |
229 | ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ | 229 | ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ |
230 | fice 0(%sr1, %arg0) | 230 | fice %r0(%sr1, %arg0) |
231 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ | 231 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ |
232 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ | 232 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ |
233 | ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ | 233 | ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ |
@@ -238,7 +238,7 @@ fioneloop: /* Loop if LOOP = 1 */ | |||
238 | 238 | ||
239 | fisync: | 239 | fisync: |
240 | sync | 240 | sync |
241 | mtsm %r22 | 241 | mtsm %r22 /* restore I-bit */ |
242 | bv %r0(%r2) | 242 | bv %r0(%r2) |
243 | nop | 243 | nop |
244 | .exit | 244 | .exit |
@@ -269,7 +269,7 @@ flush_data_cache_local: | |||
269 | 269 | ||
270 | fdmanyloop: /* Loop if LOOP >= 2 */ | 270 | fdmanyloop: /* Loop if LOOP >= 2 */ |
271 | ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ | 271 | ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ |
272 | fdce 0(%sr1, %arg0) | 272 | fdce %r0(%sr1, %arg0) |
273 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ | 273 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ |
274 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ | 274 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ |
275 | ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ | 275 | ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ |
@@ -281,7 +281,7 @@ fdoneloop: /* Loop if LOOP = 1 */ | |||
281 | fdsync: | 281 | fdsync: |
282 | syncdma | 282 | syncdma |
283 | sync | 283 | sync |
284 | mtsm %r22 | 284 | mtsm %r22 /* restore I-bit */ |
285 | bv %r0(%r2) | 285 | bv %r0(%r2) |
286 | nop | 286 | nop |
287 | .exit | 287 | .exit |
@@ -296,7 +296,7 @@ copy_user_page_asm: | |||
296 | .callinfo NO_CALLS | 296 | .callinfo NO_CALLS |
297 | .entry | 297 | .entry |
298 | 298 | ||
299 | #ifdef __LP64__ | 299 | #ifdef CONFIG_64BIT |
300 | /* PA8x00 CPUs can consume 2 loads or 1 store per cycle. | 300 | /* PA8x00 CPUs can consume 2 loads or 1 store per cycle. |
301 | * Unroll the loop by hand and arrange insn appropriately. | 301 | * Unroll the loop by hand and arrange insn appropriately. |
302 | * GCC probably can do this just as well. | 302 | * GCC probably can do this just as well. |
@@ -351,7 +351,11 @@ copy_user_page_asm: | |||
351 | std %r22, 120(%r26) | 351 | std %r22, 120(%r26) |
352 | ldo 128(%r26), %r26 | 352 | ldo 128(%r26), %r26 |
353 | 353 | ||
354 | ADDIB> -1, %r1, 1b /* bundle 10 */ | 354 | /* conditional branches nullify on forward taken branch, and on |
355 | * non-taken backward branch. Note that .+4 is a backwards branch. | ||
356 | * The ldd should only get executed if the branch is taken. | ||
357 | */ | ||
358 | ADDIB>,n -1, %r1, 1b /* bundle 10 */ | ||
355 | ldd 0(%r25), %r19 /* start next loads */ | 359 | ldd 0(%r25), %r19 /* start next loads */ |
356 | 360 | ||
357 | #else | 361 | #else |
@@ -363,10 +367,10 @@ copy_user_page_asm: | |||
363 | * the full 64 bit register values on interrupt, we can't | 367 | * the full 64 bit register values on interrupt, we can't |
364 | * use ldd/std on a 32 bit kernel. | 368 | * use ldd/std on a 32 bit kernel. |
365 | */ | 369 | */ |
370 | ldw 0(%r25), %r19 | ||
366 | ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ | 371 | ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ |
367 | 372 | ||
368 | 1: | 373 | 1: |
369 | ldw 0(%r25), %r19 | ||
370 | ldw 4(%r25), %r20 | 374 | ldw 4(%r25), %r20 |
371 | ldw 8(%r25), %r21 | 375 | ldw 8(%r25), %r21 |
372 | ldw 12(%r25), %r22 | 376 | ldw 12(%r25), %r22 |
@@ -396,11 +400,12 @@ copy_user_page_asm: | |||
396 | ldw 60(%r25), %r22 | 400 | ldw 60(%r25), %r22 |
397 | stw %r19, 48(%r26) | 401 | stw %r19, 48(%r26) |
398 | stw %r20, 52(%r26) | 402 | stw %r20, 52(%r26) |
403 | ldo 64(%r25), %r25 | ||
399 | stw %r21, 56(%r26) | 404 | stw %r21, 56(%r26) |
400 | stw %r22, 60(%r26) | 405 | stw %r22, 60(%r26) |
401 | ldo 64(%r26), %r26 | 406 | ldo 64(%r26), %r26 |
402 | ADDIB> -1, %r1, 1b | 407 | ADDIB>,n -1, %r1, 1b |
403 | ldo 64(%r25), %r25 | 408 | ldw 0(%r25), %r19 |
404 | #endif | 409 | #endif |
405 | bv %r0(%r2) | 410 | bv %r0(%r2) |
406 | nop | 411 | nop |
@@ -456,7 +461,7 @@ copy_user_page_asm: | |||
456 | sub %r25, %r1, %r23 /* move physical addr into non shadowed reg */ | 461 | sub %r25, %r1, %r23 /* move physical addr into non shadowed reg */ |
457 | 462 | ||
458 | ldil L%(TMPALIAS_MAP_START), %r28 | 463 | ldil L%(TMPALIAS_MAP_START), %r28 |
459 | #ifdef __LP64__ | 464 | #ifdef CONFIG_64BIT |
460 | extrd,u %r26,56,32, %r26 /* convert phys addr to tlb insert format */ | 465 | extrd,u %r26,56,32, %r26 /* convert phys addr to tlb insert format */ |
461 | extrd,u %r23,56,32, %r23 /* convert phys addr to tlb insert format */ | 466 | extrd,u %r23,56,32, %r23 /* convert phys addr to tlb insert format */ |
462 | depd %r24,63,22, %r28 /* Form aliased virtual address 'to' */ | 467 | depd %r24,63,22, %r28 /* Form aliased virtual address 'to' */ |
@@ -543,7 +548,7 @@ __clear_user_page_asm: | |||
543 | tophys_r1 %r26 | 548 | tophys_r1 %r26 |
544 | 549 | ||
545 | ldil L%(TMPALIAS_MAP_START), %r28 | 550 | ldil L%(TMPALIAS_MAP_START), %r28 |
546 | #ifdef __LP64__ | 551 | #ifdef CONFIG_64BIT |
547 | #if (TMPALIAS_MAP_START >= 0x80000000) | 552 | #if (TMPALIAS_MAP_START >= 0x80000000) |
548 | depdi 0, 31,32, %r28 /* clear any sign extension */ | 553 | depdi 0, 31,32, %r28 /* clear any sign extension */ |
549 | #endif | 554 | #endif |
@@ -560,7 +565,7 @@ __clear_user_page_asm: | |||
560 | 565 | ||
561 | pdtlb 0(%r28) | 566 | pdtlb 0(%r28) |
562 | 567 | ||
563 | #ifdef __LP64__ | 568 | #ifdef CONFIG_64BIT |
564 | ldi 32, %r1 /* PAGE_SIZE/128 == 32 */ | 569 | ldi 32, %r1 /* PAGE_SIZE/128 == 32 */ |
565 | 570 | ||
566 | /* PREFETCH (Write) has not (yet) been proven to help here */ | 571 | /* PREFETCH (Write) has not (yet) been proven to help here */ |
@@ -585,7 +590,7 @@ __clear_user_page_asm: | |||
585 | ADDIB> -1, %r1, 1b | 590 | ADDIB> -1, %r1, 1b |
586 | ldo 128(%r28), %r28 | 591 | ldo 128(%r28), %r28 |
587 | 592 | ||
588 | #else /* ! __LP64 */ | 593 | #else /* ! CONFIG_64BIT */ |
589 | 594 | ||
590 | ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ | 595 | ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ |
591 | 596 | ||
@@ -608,7 +613,7 @@ __clear_user_page_asm: | |||
608 | stw %r0, 60(%r28) | 613 | stw %r0, 60(%r28) |
609 | ADDIB> -1, %r1, 1b | 614 | ADDIB> -1, %r1, 1b |
610 | ldo 64(%r28), %r28 | 615 | ldo 64(%r28), %r28 |
611 | #endif /* __LP64 */ | 616 | #endif /* CONFIG_64BIT */ |
612 | 617 | ||
613 | bv %r0(%r2) | 618 | bv %r0(%r2) |
614 | nop | 619 | nop |
@@ -626,7 +631,7 @@ flush_kernel_dcache_page: | |||
626 | ldil L%dcache_stride, %r1 | 631 | ldil L%dcache_stride, %r1 |
627 | ldw R%dcache_stride(%r1), %r23 | 632 | ldw R%dcache_stride(%r1), %r23 |
628 | 633 | ||
629 | #ifdef __LP64__ | 634 | #ifdef CONFIG_64BIT |
630 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 | 635 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
631 | #else | 636 | #else |
632 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 | 637 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
@@ -670,7 +675,7 @@ flush_user_dcache_page: | |||
670 | ldil L%dcache_stride, %r1 | 675 | ldil L%dcache_stride, %r1 |
671 | ldw R%dcache_stride(%r1), %r23 | 676 | ldw R%dcache_stride(%r1), %r23 |
672 | 677 | ||
673 | #ifdef __LP64__ | 678 | #ifdef CONFIG_64BIT |
674 | depdi,z 1,63-PAGE_SHIFT,1, %r25 | 679 | depdi,z 1,63-PAGE_SHIFT,1, %r25 |
675 | #else | 680 | #else |
676 | depwi,z 1,31-PAGE_SHIFT,1, %r25 | 681 | depwi,z 1,31-PAGE_SHIFT,1, %r25 |
@@ -714,7 +719,7 @@ flush_user_icache_page: | |||
714 | ldil L%dcache_stride, %r1 | 719 | ldil L%dcache_stride, %r1 |
715 | ldw R%dcache_stride(%r1), %r23 | 720 | ldw R%dcache_stride(%r1), %r23 |
716 | 721 | ||
717 | #ifdef __LP64__ | 722 | #ifdef CONFIG_64BIT |
718 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 | 723 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
719 | #else | 724 | #else |
720 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 | 725 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
@@ -759,7 +764,7 @@ purge_kernel_dcache_page: | |||
759 | ldil L%dcache_stride, %r1 | 764 | ldil L%dcache_stride, %r1 |
760 | ldw R%dcache_stride(%r1), %r23 | 765 | ldw R%dcache_stride(%r1), %r23 |
761 | 766 | ||
762 | #ifdef __LP64__ | 767 | #ifdef CONFIG_64BIT |
763 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 | 768 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
764 | #else | 769 | #else |
765 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 | 770 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
@@ -807,7 +812,7 @@ flush_alias_page: | |||
807 | tophys_r1 %r26 | 812 | tophys_r1 %r26 |
808 | 813 | ||
809 | ldil L%(TMPALIAS_MAP_START), %r28 | 814 | ldil L%(TMPALIAS_MAP_START), %r28 |
810 | #ifdef __LP64__ | 815 | #ifdef CONFIG_64BIT |
811 | extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ | 816 | extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ |
812 | depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ | 817 | depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ |
813 | depdi 0, 63,12, %r28 /* Clear any offset bits */ | 818 | depdi 0, 63,12, %r28 /* Clear any offset bits */ |
@@ -824,7 +829,7 @@ flush_alias_page: | |||
824 | ldil L%dcache_stride, %r1 | 829 | ldil L%dcache_stride, %r1 |
825 | ldw R%dcache_stride(%r1), %r23 | 830 | ldw R%dcache_stride(%r1), %r23 |
826 | 831 | ||
827 | #ifdef __LP64__ | 832 | #ifdef CONFIG_64BIT |
828 | depdi,z 1, 63-PAGE_SHIFT,1, %r29 | 833 | depdi,z 1, 63-PAGE_SHIFT,1, %r29 |
829 | #else | 834 | #else |
830 | depwi,z 1, 31-PAGE_SHIFT,1, %r29 | 835 | depwi,z 1, 31-PAGE_SHIFT,1, %r29 |
@@ -935,7 +940,7 @@ flush_kernel_icache_page: | |||
935 | ldil L%icache_stride, %r1 | 940 | ldil L%icache_stride, %r1 |
936 | ldw R%icache_stride(%r1), %r23 | 941 | ldw R%icache_stride(%r1), %r23 |
937 | 942 | ||
938 | #ifdef __LP64__ | 943 | #ifdef CONFIG_64BIT |
939 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 | 944 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
940 | #else | 945 | #else |
941 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 | 946 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
@@ -944,23 +949,23 @@ flush_kernel_icache_page: | |||
944 | sub %r25, %r23, %r25 | 949 | sub %r25, %r23, %r25 |
945 | 950 | ||
946 | 951 | ||
947 | 1: fic,m %r23(%r26) | 952 | 1: fic,m %r23(%sr4, %r26) |
948 | fic,m %r23(%r26) | 953 | fic,m %r23(%sr4, %r26) |
949 | fic,m %r23(%r26) | 954 | fic,m %r23(%sr4, %r26) |
950 | fic,m %r23(%r26) | 955 | fic,m %r23(%sr4, %r26) |
951 | fic,m %r23(%r26) | 956 | fic,m %r23(%sr4, %r26) |
952 | fic,m %r23(%r26) | 957 | fic,m %r23(%sr4, %r26) |
953 | fic,m %r23(%r26) | 958 | fic,m %r23(%sr4, %r26) |
954 | fic,m %r23(%r26) | 959 | fic,m %r23(%sr4, %r26) |
955 | fic,m %r23(%r26) | 960 | fic,m %r23(%sr4, %r26) |
956 | fic,m %r23(%r26) | 961 | fic,m %r23(%sr4, %r26) |
957 | fic,m %r23(%r26) | 962 | fic,m %r23(%sr4, %r26) |
958 | fic,m %r23(%r26) | 963 | fic,m %r23(%sr4, %r26) |
959 | fic,m %r23(%r26) | 964 | fic,m %r23(%sr4, %r26) |
960 | fic,m %r23(%r26) | 965 | fic,m %r23(%sr4, %r26) |
961 | fic,m %r23(%r26) | 966 | fic,m %r23(%sr4, %r26) |
962 | CMPB<< %r26, %r25, 1b | 967 | CMPB<< %r26, %r25, 1b |
963 | fic,m %r23(%r26) | 968 | fic,m %r23(%sr4, %r26) |
964 | 969 | ||
965 | sync | 970 | sync |
966 | bv %r0(%r2) | 971 | bv %r0(%r2) |
@@ -982,17 +987,18 @@ flush_kernel_icache_range_asm: | |||
982 | ANDCM %r26, %r21, %r26 | 987 | ANDCM %r26, %r21, %r26 |
983 | 988 | ||
984 | 1: CMPB<<,n %r26, %r25, 1b | 989 | 1: CMPB<<,n %r26, %r25, 1b |
985 | fic,m %r23(%r26) | 990 | fic,m %r23(%sr4, %r26) |
986 | 991 | ||
987 | sync | 992 | sync |
988 | bv %r0(%r2) | 993 | bv %r0(%r2) |
989 | nop | 994 | nop |
990 | .exit | 995 | .exit |
991 | |||
992 | .procend | 996 | .procend |
993 | 997 | ||
994 | .align 128 | 998 | /* align should cover use of rfi in disable_sr_hashing_asm and |
995 | 999 | * srdis_done. | |
1000 | */ | ||
1001 | .align 256 | ||
996 | .export disable_sr_hashing_asm,code | 1002 | .export disable_sr_hashing_asm,code |
997 | 1003 | ||
998 | disable_sr_hashing_asm: | 1004 | disable_sr_hashing_asm: |
@@ -1000,28 +1006,26 @@ disable_sr_hashing_asm: | |||
1000 | .callinfo NO_CALLS | 1006 | .callinfo NO_CALLS |
1001 | .entry | 1007 | .entry |
1002 | 1008 | ||
1003 | /* Switch to real mode */ | 1009 | /* |
1004 | 1010 | * Switch to real mode | |
1005 | ssm 0, %r0 /* relied upon translation! */ | 1011 | */ |
1006 | nop | 1012 | /* pcxt_ssm_bug */ |
1007 | nop | 1013 | rsm PSW_SM_I, %r0 |
1014 | load32 PA(1f), %r1 | ||
1008 | nop | 1015 | nop |
1009 | nop | 1016 | nop |
1010 | nop | 1017 | nop |
1011 | nop | 1018 | nop |
1012 | nop | 1019 | nop |
1013 | 1020 | ||
1014 | rsm (PSW_SM_Q|PSW_SM_I), %r0 /* disable Q&I to load the iia queue */ | 1021 | rsm PSW_SM_Q, %r0 /* prep to load iia queue */ |
1015 | ldil L%REAL_MODE_PSW, %r1 | ||
1016 | ldo R%REAL_MODE_PSW(%r1), %r1 | ||
1017 | mtctl %r1, %cr22 | ||
1018 | mtctl %r0, %cr17 /* Clear IIASQ tail */ | 1022 | mtctl %r0, %cr17 /* Clear IIASQ tail */ |
1019 | mtctl %r0, %cr17 /* Clear IIASQ head */ | 1023 | mtctl %r0, %cr17 /* Clear IIASQ head */ |
1020 | ldil L%PA(1f), %r1 | ||
1021 | ldo R%PA(1f)(%r1), %r1 | ||
1022 | mtctl %r1, %cr18 /* IIAOQ head */ | 1024 | mtctl %r1, %cr18 /* IIAOQ head */ |
1023 | ldo 4(%r1), %r1 | 1025 | ldo 4(%r1), %r1 |
1024 | mtctl %r1, %cr18 /* IIAOQ tail */ | 1026 | mtctl %r1, %cr18 /* IIAOQ tail */ |
1027 | load32 REAL_MODE_PSW, %r1 | ||
1028 | mtctl %r1, %ipsw | ||
1025 | rfi | 1029 | rfi |
1026 | nop | 1030 | nop |
1027 | 1031 | ||
@@ -1053,27 +1057,31 @@ srdis_pcxl: | |||
1053 | 1057 | ||
1054 | srdis_pa20: | 1058 | srdis_pa20: |
1055 | 1059 | ||
1056 | /* Disable Space Register Hashing for PCXU,PCXU+,PCXW,PCXW+ */ | 1060 | /* Disable Space Register Hashing for PCXU,PCXU+,PCXW,PCXW+,PCXW2 */ |
1057 | 1061 | ||
1058 | .word 0x144008bc /* mfdiag %dr2, %r28 */ | 1062 | .word 0x144008bc /* mfdiag %dr2, %r28 */ |
1059 | depdi 0, 54,1, %r28 /* clear DIAG_SPHASH_ENAB (bit 54) */ | 1063 | depdi 0, 54,1, %r28 /* clear DIAG_SPHASH_ENAB (bit 54) */ |
1060 | .word 0x145c1840 /* mtdiag %r28, %dr2 */ | 1064 | .word 0x145c1840 /* mtdiag %r28, %dr2 */ |
1061 | 1065 | ||
1062 | srdis_done: | ||
1063 | 1066 | ||
1067 | srdis_done: | ||
1064 | /* Switch back to virtual mode */ | 1068 | /* Switch back to virtual mode */ |
1069 | rsm PSW_SM_I, %r0 /* prep to load iia queue */ | ||
1070 | load32 2f, %r1 | ||
1071 | nop | ||
1072 | nop | ||
1073 | nop | ||
1074 | nop | ||
1075 | nop | ||
1065 | 1076 | ||
1066 | rsm PSW_SM_Q, %r0 /* clear Q bit to load iia queue */ | 1077 | rsm PSW_SM_Q, %r0 /* prep to load iia queue */ |
1067 | ldil L%KERNEL_PSW, %r1 | ||
1068 | ldo R%KERNEL_PSW(%r1), %r1 | ||
1069 | mtctl %r1, %cr22 | ||
1070 | mtctl %r0, %cr17 /* Clear IIASQ tail */ | 1078 | mtctl %r0, %cr17 /* Clear IIASQ tail */ |
1071 | mtctl %r0, %cr17 /* Clear IIASQ head */ | 1079 | mtctl %r0, %cr17 /* Clear IIASQ head */ |
1072 | ldil L%(2f), %r1 | ||
1073 | ldo R%(2f)(%r1), %r1 | ||
1074 | mtctl %r1, %cr18 /* IIAOQ head */ | 1080 | mtctl %r1, %cr18 /* IIAOQ head */ |
1075 | ldo 4(%r1), %r1 | 1081 | ldo 4(%r1), %r1 |
1076 | mtctl %r1, %cr18 /* IIAOQ tail */ | 1082 | mtctl %r1, %cr18 /* IIAOQ tail */ |
1083 | load32 KERNEL_PSW, %r1 | ||
1084 | mtctl %r1, %ipsw | ||
1077 | rfi | 1085 | rfi |
1078 | nop | 1086 | nop |
1079 | 1087 | ||