Skip to content

Commit

Permalink
[PATCH] ARM: Move PGD kernel page table initialisation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Russell King committed Jun 27, 2005
1 parent 2ea8339 commit a343e60
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions arch/arm/mm/mm-armv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
/*
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a343e60

Please sign in to comment.