diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2015-04-14 18:45:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:02 -0400 |
commit | 4d66bcc7cf762e82703b94d416245d4a216c79ae (patch) | |
tree | 66178a36412f885b6171ab839c9190750c94e06f /arch/ia64/kernel | |
parent | 1bcad26e9d5362d4890ab5718d729ee9cd85a493 (diff) |
ia64: expose number of page table levels on Kconfig level
We would want to use number of page table level to define mm_struct.
Let's expose it as CONFIG_PGTABLE_LEVELS.
We need to define PGTABLE_LEVELS before sourcing init/Kconfig:
arch/Kconfig will define default value and it's sourced from init/Kconfig.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/ivt.S | 12 | ||||
-rw-r--r-- | arch/ia64/kernel/machine_kexec.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S index 18e794a57248..e42bf7a913f3 100644 --- a/arch/ia64/kernel/ivt.S +++ b/arch/ia64/kernel/ivt.S | |||
@@ -146,7 +146,7 @@ ENTRY(vhpt_miss) | |||
146 | (p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5 | 146 | (p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5 |
147 | (p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4] | 147 | (p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4] |
148 | cmp.eq p7,p6=0,r21 // unused address bits all zeroes? | 148 | cmp.eq p7,p6=0,r21 // unused address bits all zeroes? |
149 | #ifdef CONFIG_PGTABLE_4 | 149 | #if CONFIG_PGTABLE_LEVELS == 4 |
150 | shr.u r28=r22,PUD_SHIFT // shift pud index into position | 150 | shr.u r28=r22,PUD_SHIFT // shift pud index into position |
151 | #else | 151 | #else |
152 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position | 152 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position |
@@ -155,7 +155,7 @@ ENTRY(vhpt_miss) | |||
155 | ld8 r17=[r17] // get *pgd (may be 0) | 155 | ld8 r17=[r17] // get *pgd (may be 0) |
156 | ;; | 156 | ;; |
157 | (p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL? | 157 | (p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL? |
158 | #ifdef CONFIG_PGTABLE_4 | 158 | #if CONFIG_PGTABLE_LEVELS == 4 |
159 | dep r28=r28,r17,3,(PAGE_SHIFT-3) // r28=pud_offset(pgd,addr) | 159 | dep r28=r28,r17,3,(PAGE_SHIFT-3) // r28=pud_offset(pgd,addr) |
160 | ;; | 160 | ;; |
161 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position | 161 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position |
@@ -222,13 +222,13 @@ ENTRY(vhpt_miss) | |||
222 | */ | 222 | */ |
223 | ld8 r25=[r21] // read *pte again | 223 | ld8 r25=[r21] // read *pte again |
224 | ld8 r26=[r17] // read *pmd again | 224 | ld8 r26=[r17] // read *pmd again |
225 | #ifdef CONFIG_PGTABLE_4 | 225 | #if CONFIG_PGTABLE_LEVELS == 4 |
226 | ld8 r19=[r28] // read *pud again | 226 | ld8 r19=[r28] // read *pud again |
227 | #endif | 227 | #endif |
228 | cmp.ne p6,p7=r0,r0 | 228 | cmp.ne p6,p7=r0,r0 |
229 | ;; | 229 | ;; |
230 | cmp.ne.or.andcm p6,p7=r26,r20 // did *pmd change | 230 | cmp.ne.or.andcm p6,p7=r26,r20 // did *pmd change |
231 | #ifdef CONFIG_PGTABLE_4 | 231 | #if CONFIG_PGTABLE_LEVELS == 4 |
232 | cmp.ne.or.andcm p6,p7=r19,r29 // did *pud change | 232 | cmp.ne.or.andcm p6,p7=r19,r29 // did *pud change |
233 | #endif | 233 | #endif |
234 | mov r27=PAGE_SHIFT<<2 | 234 | mov r27=PAGE_SHIFT<<2 |
@@ -476,7 +476,7 @@ ENTRY(nested_dtlb_miss) | |||
476 | (p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5 | 476 | (p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5 |
477 | (p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4] | 477 | (p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4] |
478 | cmp.eq p7,p6=0,r21 // unused address bits all zeroes? | 478 | cmp.eq p7,p6=0,r21 // unused address bits all zeroes? |
479 | #ifdef CONFIG_PGTABLE_4 | 479 | #if CONFIG_PGTABLE_LEVELS == 4 |
480 | shr.u r18=r22,PUD_SHIFT // shift pud index into position | 480 | shr.u r18=r22,PUD_SHIFT // shift pud index into position |
481 | #else | 481 | #else |
482 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position | 482 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position |
@@ -487,7 +487,7 @@ ENTRY(nested_dtlb_miss) | |||
487 | (p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL? | 487 | (p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL? |
488 | dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=p[u|m]d_offset(pgd,addr) | 488 | dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=p[u|m]d_offset(pgd,addr) |
489 | ;; | 489 | ;; |
490 | #ifdef CONFIG_PGTABLE_4 | 490 | #if CONFIG_PGTABLE_LEVELS == 4 |
491 | (p7) ld8 r17=[r17] // get *pud (may be 0) | 491 | (p7) ld8 r17=[r17] // get *pud (may be 0) |
492 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position | 492 | shr.u r18=r22,PMD_SHIFT // shift pmd index into position |
493 | ;; | 493 | ;; |
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c index 5151a649c96b..b72cd7a07222 100644 --- a/arch/ia64/kernel/machine_kexec.c +++ b/arch/ia64/kernel/machine_kexec.c | |||
@@ -156,9 +156,9 @@ void arch_crash_save_vmcoreinfo(void) | |||
156 | VMCOREINFO_OFFSET(node_memblk_s, start_paddr); | 156 | VMCOREINFO_OFFSET(node_memblk_s, start_paddr); |
157 | VMCOREINFO_OFFSET(node_memblk_s, size); | 157 | VMCOREINFO_OFFSET(node_memblk_s, size); |
158 | #endif | 158 | #endif |
159 | #ifdef CONFIG_PGTABLE_3 | 159 | #if CONFIG_PGTABLE_LEVELS == 3 |
160 | VMCOREINFO_CONFIG(PGTABLE_3); | 160 | VMCOREINFO_CONFIG(PGTABLE_3); |
161 | #elif defined(CONFIG_PGTABLE_4) | 161 | #elif CONFIG_PGTABLE_LEVELS == 4 |
162 | VMCOREINFO_CONFIG(PGTABLE_4); | 162 | VMCOREINFO_CONFIG(PGTABLE_4); |
163 | #endif | 163 | #endif |
164 | } | 164 | } |