diff options
Diffstat (limited to 'arch/parisc/kernel/entry.S')
-rw-r--r-- | arch/parisc/kernel/entry.S | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 7c95d7663c29..d9e53cf0372b 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -502,18 +502,20 @@ | |||
502 | * all ILP32 processes and all the kernel for machines with | 502 | * all ILP32 processes and all the kernel for machines with |
503 | * under 4GB of memory) */ | 503 | * under 4GB of memory) */ |
504 | .macro L3_ptep pgd,pte,index,va,fault | 504 | .macro L3_ptep pgd,pte,index,va,fault |
505 | #if PT_NLEVELS == 3 /* we might have a 2-Level scheme, e.g. with 16kb page size */ | ||
505 | extrd,u \va,63-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index | 506 | extrd,u \va,63-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index |
506 | copy %r0,\pte | 507 | copy %r0,\pte |
507 | extrd,u,*= \va,31,32,%r0 | 508 | extrd,u,*= \va,63-ASM_PGDIR_SHIFT,64-ASM_PGDIR_SHIFT,%r0 |
508 | ldw,s \index(\pgd),\pgd | 509 | ldw,s \index(\pgd),\pgd |
509 | extrd,u,*= \va,31,32,%r0 | 510 | extrd,u,*= \va,63-ASM_PGDIR_SHIFT,64-ASM_PGDIR_SHIFT,%r0 |
510 | bb,>=,n \pgd,_PxD_PRESENT_BIT,\fault | 511 | bb,>=,n \pgd,_PxD_PRESENT_BIT,\fault |
511 | extrd,u,*= \va,31,32,%r0 | 512 | extrd,u,*= \va,63-ASM_PGDIR_SHIFT,64-ASM_PGDIR_SHIFT,%r0 |
512 | shld \pgd,PxD_VALUE_SHIFT,\index | 513 | shld \pgd,PxD_VALUE_SHIFT,\index |
513 | extrd,u,*= \va,31,32,%r0 | 514 | extrd,u,*= \va,63-ASM_PGDIR_SHIFT,64-ASM_PGDIR_SHIFT,%r0 |
514 | copy \index,\pgd | 515 | copy \index,\pgd |
515 | extrd,u,*<> \va,31,32,%r0 | 516 | extrd,u,*<> \va,63-ASM_PGDIR_SHIFT,64-ASM_PGDIR_SHIFT,%r0 |
516 | ldo ASM_PGD_PMD_OFFSET(\pgd),\pgd | 517 | ldo ASM_PGD_PMD_OFFSET(\pgd),\pgd |
518 | #endif | ||
517 | L2_ptep \pgd,\pte,\index,\va,\fault | 519 | L2_ptep \pgd,\pte,\index,\va,\fault |
518 | .endm | 520 | .endm |
519 | 521 | ||
@@ -563,10 +565,18 @@ | |||
563 | extrd,u,*= \pte,_PAGE_GATEWAY_BIT+32,1,%r0 | 565 | extrd,u,*= \pte,_PAGE_GATEWAY_BIT+32,1,%r0 |
564 | depd %r0,11,2,\prot /* If Gateway, Set PL2 to 0 */ | 566 | depd %r0,11,2,\prot /* If Gateway, Set PL2 to 0 */ |
565 | 567 | ||
566 | /* Get rid of prot bits and convert to page addr for iitlbt and idtlbt */ | 568 | /* Enforce uncacheable pages. |
569 | * This should ONLY be use for MMIO on PA 2.0 machines. | ||
570 | * Memory/DMA is cache coherent on all PA2.0 machines we support | ||
571 | * (that means T-class is NOT supported) and the memory controllers | ||
572 | * on most of those machines only handles cache transactions. | ||
573 | */ | ||
574 | extrd,u,*= \pte,_PAGE_NO_CACHE_BIT+32,1,%r0 | ||
575 | depi 1,12,1,\prot | ||
567 | 576 | ||
568 | depd %r0,63,PAGE_SHIFT,\pte | 577 | /* Drop prot bits and convert to page addr for iitlbt and idtlbt */ |
569 | extrd,s \pte,(63-PAGE_SHIFT)+(63-58),64-PAGE_SHIFT,\pte | 578 | extrd,u \pte,(63-ASM_PFN_PTE_SHIFT)+(63-58),64-PAGE_SHIFT,\pte |
579 | depdi _PAGE_SIZE_ENCODING_DEFAULT,63,63-58,\pte | ||
570 | .endm | 580 | .endm |
571 | 581 | ||
572 | /* Identical macro to make_insert_tlb above, except it | 582 | /* Identical macro to make_insert_tlb above, except it |
@@ -584,9 +594,8 @@ | |||
584 | 594 | ||
585 | /* Get rid of prot bits and convert to page addr for iitlba */ | 595 | /* Get rid of prot bits and convert to page addr for iitlba */ |
586 | 596 | ||
587 | depi 0,31,PAGE_SHIFT,\pte | 597 | depi _PAGE_SIZE_ENCODING_DEFAULT,31,ASM_PFN_PTE_SHIFT,\pte |
588 | extru \pte,24,25,\pte | 598 | extru \pte,24,25,\pte |
589 | |||
590 | .endm | 599 | .endm |
591 | 600 | ||
592 | /* This is for ILP32 PA2.0 only. The TLB insertion needs | 601 | /* This is for ILP32 PA2.0 only. The TLB insertion needs |
@@ -1201,10 +1210,9 @@ intr_save: | |||
1201 | */ | 1210 | */ |
1202 | 1211 | ||
1203 | /* adjust isr/ior. */ | 1212 | /* adjust isr/ior. */ |
1204 | 1213 | extrd,u %r16,63,SPACEID_SHIFT,%r1 /* get high bits from isr for ior */ | |
1205 | extrd,u %r16,63,7,%r1 /* get high bits from isr for ior */ | 1214 | depd %r1,31,SPACEID_SHIFT,%r17 /* deposit them into ior */ |
1206 | depd %r1,31,7,%r17 /* deposit them into ior */ | 1215 | depdi 0,63,SPACEID_SHIFT,%r16 /* clear them from isr */ |
1207 | depdi 0,63,7,%r16 /* clear them from isr */ | ||
1208 | #endif | 1216 | #endif |
1209 | STREG %r16, PT_ISR(%r29) | 1217 | STREG %r16, PT_ISR(%r29) |
1210 | STREG %r17, PT_IOR(%r29) | 1218 | STREG %r17, PT_IOR(%r29) |