diff options
Diffstat (limited to 'arch/arm/mm/mm-armv.c')
-rw-r--r-- | arch/arm/mm/mm-armv.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index 8cb024aa88bd..3a81944d74ba 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
@@ -577,23 +577,23 @@ static void __init create_mapping(struct map_desc *md) | |||
577 | */ | 577 | */ |
578 | void setup_mm_for_reboot(char mode) | 578 | void setup_mm_for_reboot(char mode) |
579 | { | 579 | { |
580 | unsigned long pmdval; | 580 | unsigned long base_pmdval; |
581 | pgd_t *pgd; | 581 | pgd_t *pgd; |
582 | pmd_t *pmd; | ||
583 | int i; | 582 | int i; |
584 | int cpu_arch = cpu_architecture(); | ||
585 | 583 | ||
586 | if (current->mm && current->mm->pgd) | 584 | if (current->mm && current->mm->pgd) |
587 | pgd = current->mm->pgd; | 585 | pgd = current->mm->pgd; |
588 | else | 586 | else |
589 | pgd = init_mm.pgd; | 587 | pgd = init_mm.pgd; |
590 | 588 | ||
591 | for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++) { | 589 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; |
592 | pmdval = (i << PGDIR_SHIFT) | | 590 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ) |
593 | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | | 591 | base_pmdval |= PMD_BIT4; |
594 | PMD_TYPE_SECT; | 592 | |
595 | if (cpu_arch <= CPU_ARCH_ARMv5TEJ) | 593 | for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { |
596 | pmdval |= PMD_BIT4; | 594 | unsigned long pmdval = (i << PGDIR_SHIFT) | base_pmdval; |
595 | pmd_t *pmd; | ||
596 | |||
597 | pmd = pmd_off(pgd, i << PGDIR_SHIFT); | 597 | pmd = pmd_off(pgd, i << PGDIR_SHIFT); |
598 | pmd[0] = __pmd(pmdval); | 598 | pmd[0] = __pmd(pmdval); |
599 | pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))); | 599 | pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))); |