diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-06-27 14:08:56 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-27 14:08:56 +0100 |
commit | a343e6075a396e07eeff52c0da5629c8fd396be2 (patch) | |
tree | 8ee3bcc2d24acb24476e683eea6c4662fb90f514 /arch | |
parent | 2ea83398b75309d8fdc999c4bb252e72d7e4fd9d (diff) | |
download | linux-3.10-a343e6075a396e07eeff52c0da5629c8fd396be2.tar.gz linux-3.10-a343e6075a396e07eeff52c0da5629c8fd396be2.tar.bz2 linux-3.10-a343e6075a396e07eeff52c0da5629c8fd396be2.zip |
[PATCH] ARM: Move PGD kernel page table initialisation
It doesn't make sense to have the PGD kernel pointers initialisation
separate from the PGD user pointers, especially when we clean the
data cache over the whole range.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/mm-armv.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index 2c2b93d77d4..d79864a0dfa 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c @@ -169,7 +169,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); + /* + * Copy over the kernel and IO PGD entries + */ init_pgd = pgd_offset_k(0); + memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR, + (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t)); + + clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); if (!vectors_high()) { /* @@ -198,14 +205,6 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) spin_unlock(&mm->page_table_lock); } - /* - * Copy over the kernel and IO PGD entries - */ - memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR, - (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t)); - - clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); - return new_pgd; no_pte: |