Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225914
b: refs/heads/master
c: e926f44
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Dec 22, 2010
1 parent d950f01 commit 0df870e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af3813d6a5bf8d0f71b23d3ce458fa5f9916c6b7
refs/heads/master: e926f4495e202500a6265987277fab217e235f08
3 changes: 1 addition & 2 deletions trunk/arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ extern void __pgd_error(const char *file, int line, pgd_t);
*/
#define FIRST_USER_ADDRESS PAGE_SIZE

#define FIRST_USER_PGD_NR 1
#define USER_PTRS_PER_PGD ((TASK_SIZE/PGDIR_SIZE) - FIRST_USER_PGD_NR)
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)

/*
* section address mask and size definitions.
Expand Down
8 changes: 3 additions & 5 deletions trunk/arch/arm/mm/pgd.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include "mm.h"

#define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD)

/*
* need to get a 16k page for level 1
*/
Expand All @@ -32,14 +30,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
if (!new_pgd)
goto no_pgd;

memset(new_pgd, 0, FIRST_KERNEL_PGD_NR * sizeof(pgd_t));
memset(new_pgd, 0, USER_PTRS_PER_PGD * 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));
memcpy(new_pgd + USER_PTRS_PER_PGD, init_pgd + USER_PTRS_PER_PGD,
(PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));

clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t));

Expand Down

0 comments on commit 0df870e

Please sign in to comment.