diff options
Diffstat (limited to 'arch/arm/mm/fault.c')
-rw-r--r-- | arch/arm/mm/fault.c | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index f10f9bac2206..bc0e1d88fd3b 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -76,9 +76,11 @@ void show_pte(struct mm_struct *mm, unsigned long addr) | |||
76 | 76 | ||
77 | printk(KERN_ALERT "pgd = %p\n", mm->pgd); | 77 | printk(KERN_ALERT "pgd = %p\n", mm->pgd); |
78 | pgd = pgd_offset(mm, addr); | 78 | pgd = pgd_offset(mm, addr); |
79 | printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); | 79 | printk(KERN_ALERT "[%08lx] *pgd=%08llx", |
80 | addr, (long long)pgd_val(*pgd)); | ||
80 | 81 | ||
81 | do { | 82 | do { |
83 | pud_t *pud; | ||
82 | pmd_t *pmd; | 84 | pmd_t *pmd; |
83 | pte_t *pte; | 85 | pte_t *pte; |
84 | 86 | ||
@@ -90,9 +92,21 @@ void show_pte(struct mm_struct *mm, unsigned long addr) | |||
90 | break; | 92 | break; |
91 | } | 93 | } |
92 | 94 | ||
93 | pmd = pmd_offset(pgd, addr); | 95 | pud = pud_offset(pgd, addr); |
96 | if (PTRS_PER_PUD != 1) | ||
97 | printk(", *pud=%08lx", pud_val(*pud)); | ||
98 | |||
99 | if (pud_none(*pud)) | ||
100 | break; | ||
101 | |||
102 | if (pud_bad(*pud)) { | ||
103 | printk("(bad)"); | ||
104 | break; | ||
105 | } | ||
106 | |||
107 | pmd = pmd_offset(pud, addr); | ||
94 | if (PTRS_PER_PMD != 1) | 108 | if (PTRS_PER_PMD != 1) |
95 | printk(", *pmd=%08lx", pmd_val(*pmd)); | 109 | printk(", *pmd=%08llx", (long long)pmd_val(*pmd)); |
96 | 110 | ||
97 | if (pmd_none(*pmd)) | 111 | if (pmd_none(*pmd)) |
98 | break; | 112 | break; |
@@ -107,8 +121,9 @@ void show_pte(struct mm_struct *mm, unsigned long addr) | |||
107 | break; | 121 | break; |
108 | 122 | ||
109 | pte = pte_offset_map(pmd, addr); | 123 | pte = pte_offset_map(pmd, addr); |
110 | printk(", *pte=%08lx", pte_val(*pte)); | 124 | printk(", *pte=%08llx", (long long)pte_val(*pte)); |
111 | printk(", *ppte=%08lx", pte_val(pte[PTE_HWTABLE_PTRS])); | 125 | printk(", *ppte=%08llx", |
126 | (long long)pte_val(pte[PTE_HWTABLE_PTRS])); | ||
112 | pte_unmap(pte); | 127 | pte_unmap(pte); |
113 | } while(0); | 128 | } while(0); |
114 | 129 | ||
@@ -388,6 +403,7 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
388 | { | 403 | { |
389 | unsigned int index; | 404 | unsigned int index; |
390 | pgd_t *pgd, *pgd_k; | 405 | pgd_t *pgd, *pgd_k; |
406 | pud_t *pud, *pud_k; | ||
391 | pmd_t *pmd, *pmd_k; | 407 | pmd_t *pmd, *pmd_k; |
392 | 408 | ||
393 | if (addr < TASK_SIZE) | 409 | if (addr < TASK_SIZE) |
@@ -406,12 +422,19 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
406 | 422 | ||
407 | if (pgd_none(*pgd_k)) | 423 | if (pgd_none(*pgd_k)) |
408 | goto bad_area; | 424 | goto bad_area; |
409 | |||
410 | if (!pgd_present(*pgd)) | 425 | if (!pgd_present(*pgd)) |
411 | set_pgd(pgd, *pgd_k); | 426 | set_pgd(pgd, *pgd_k); |
412 | 427 | ||
413 | pmd_k = pmd_offset(pgd_k, addr); | 428 | pud = pud_offset(pgd, addr); |
414 | pmd = pmd_offset(pgd, addr); | 429 | pud_k = pud_offset(pgd_k, addr); |
430 | |||
431 | if (pud_none(*pud_k)) | ||
432 | goto bad_area; | ||
433 | if (!pud_present(*pud)) | ||
434 | set_pud(pud, *pud_k); | ||
435 | |||
436 | pmd = pmd_offset(pud, addr); | ||
437 | pmd_k = pmd_offset(pud_k, addr); | ||
415 | 438 | ||
416 | /* | 439 | /* |
417 | * On ARM one Linux PGD entry contains two hardware entries (see page | 440 | * On ARM one Linux PGD entry contains two hardware entries (see page |