diff options
Diffstat (limited to 'arch/parisc/kernel/head.S')
-rw-r--r-- | arch/parisc/kernel/head.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 0b47afc20690..3e79e62f7b0b 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -76,16 +76,16 @@ $bss_loop: | |||
76 | mtctl %r4,%cr24 /* Initialize kernel root pointer */ | 76 | mtctl %r4,%cr24 /* Initialize kernel root pointer */ |
77 | mtctl %r4,%cr25 /* Initialize user root pointer */ | 77 | mtctl %r4,%cr25 /* Initialize user root pointer */ |
78 | 78 | ||
79 | #ifdef CONFIG_64BIT | 79 | #if PT_NLEVELS == 3 |
80 | /* Set pmd in pgd */ | 80 | /* Set pmd in pgd */ |
81 | load32 PA(pmd0),%r5 | 81 | load32 PA(pmd0),%r5 |
82 | shrd %r5,PxD_VALUE_SHIFT,%r3 | 82 | shrd %r5,PxD_VALUE_SHIFT,%r3 |
83 | ldo (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3 | 83 | ldo (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3 |
84 | stw %r3,ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4) | 84 | stw %r3,ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4) |
85 | ldo ASM_PMD_ENTRY*ASM_PMD_ENTRY_SIZE(%r5),%r4 | 85 | ldo ASM_PMD_ENTRY*ASM_PMD_ENTRY_SIZE(%r5),%r4 |
86 | #else | 86 | #else |
87 | /* 2-level page table, so pmd == pgd */ | 87 | /* 2-level page table, so pmd == pgd */ |
88 | ldo ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4),%r4 | 88 | ldo ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4),%r4 |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | /* Fill in pmd with enough pte directories */ | 91 | /* Fill in pmd with enough pte directories */ |
@@ -99,7 +99,7 @@ $bss_loop: | |||
99 | stw %r3,0(%r4) | 99 | stw %r3,0(%r4) |
100 | ldo (ASM_PAGE_SIZE >> PxD_VALUE_SHIFT)(%r3),%r3 | 100 | ldo (ASM_PAGE_SIZE >> PxD_VALUE_SHIFT)(%r3),%r3 |
101 | addib,> -1,%r1,1b | 101 | addib,> -1,%r1,1b |
102 | #ifdef CONFIG_64BIT | 102 | #if PT_NLEVELS == 3 |
103 | ldo ASM_PMD_ENTRY_SIZE(%r4),%r4 | 103 | ldo ASM_PMD_ENTRY_SIZE(%r4),%r4 |
104 | #else | 104 | #else |
105 | ldo ASM_PGD_ENTRY_SIZE(%r4),%r4 | 105 | ldo ASM_PGD_ENTRY_SIZE(%r4),%r4 |
@@ -107,13 +107,14 @@ $bss_loop: | |||
107 | 107 | ||
108 | 108 | ||
109 | /* Now initialize the PTEs themselves */ | 109 | /* Now initialize the PTEs themselves */ |
110 | ldo _PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */ | 110 | ldo 0+_PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */ |
111 | ldi (1<<(KERNEL_INITIAL_ORDER-PAGE_SHIFT)),%r11 /* PFN count */ | ||
111 | load32 PA(pg0),%r1 | 112 | load32 PA(pg0),%r1 |
112 | 113 | ||
113 | $pgt_fill_loop: | 114 | $pgt_fill_loop: |
114 | STREGM %r3,ASM_PTE_ENTRY_SIZE(%r1) | 115 | STREGM %r3,ASM_PTE_ENTRY_SIZE(%r1) |
115 | ldo ASM_PAGE_SIZE(%r3),%r3 | 116 | ldo (1<<PFN_PTE_SHIFT)(%r3),%r3 /* add one PFN */ |
116 | bb,>= %r3,31-KERNEL_INITIAL_ORDER,$pgt_fill_loop | 117 | addib,> -1,%r11,$pgt_fill_loop |
117 | nop | 118 | nop |
118 | 119 | ||
119 | /* Load the return address...er...crash 'n burn */ | 120 | /* Load the return address...er...crash 'n burn */ |