diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-10-28 01:45:17 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-10-28 01:45:17 +0300 |
commit | e343eb0d60f74547e0aeb5bd151105c2e6cfe588 (patch) | |
tree | 92586df0daf3298262a957640e5c86679c963f41 /arch/m32r/mm | |
parent | ddc04fd4d5163aee9ebdb38a56c365b602e2b7b7 (diff) | |
parent | 012abeea669ea49636cf952d13298bb68654146a (diff) | |
download | linux-e343eb0d60f74547e0aeb5bd151105c2e6cfe588.tar.xz |
Merge commit 'v2.6.32-rc5' into for-2.6.33
Diffstat (limited to 'arch/m32r/mm')
-rw-r--r-- | arch/m32r/mm/discontig.c | 5 | ||||
-rw-r--r-- | arch/m32r/mm/mmu.S | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c index b7a78ad429b7..5d2858f6eede 100644 --- a/arch/m32r/mm/discontig.c +++ b/arch/m32r/mm/discontig.c @@ -32,6 +32,9 @@ typedef struct { } mem_prof_t; static mem_prof_t mem_prof[MAX_NUMNODES]; +extern unsigned long memory_start; +extern unsigned long memory_end; + static void __init mem_prof_init(void) { unsigned long start_pfn, holes, free_pfn; @@ -42,7 +45,7 @@ static void __init mem_prof_init(void) /* Node#0 SDRAM */ mp = &mem_prof[0]; mp->start_pfn = PFN_UP(CONFIG_MEMORY_START); - mp->pages = PFN_DOWN(CONFIG_MEMORY_SIZE); + mp->pages = PFN_DOWN(memory_end - memory_start); mp->holes = 0; mp->free_pfn = PFN_UP(__pa(_end)); diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S index 49a6d16a3d58..e9491a5ae827 100644 --- a/arch/m32r/mm/mmu.S +++ b/arch/m32r/mm/mmu.S @@ -150,9 +150,13 @@ ENTRY(tme_handler) ; pmd = pmd_offset(pgd, address); ld r3, @r3 ; r3: pmd data - ldi r2, #-4096 beqz r3, 3f ; pmd_none(*pmd) ? + and3 r2, r3, #0xfff + add3 r2, r2, #-355 ; _KERNPG_TABLE(=0x163) + bnez r2, 3f ; pmd_bad(*pmd) ? + ldi r2, #-4096 + ; pte = pte_offset(pmd, address); and r2, r3 ; r2: pte base addr srl3 r3, r0, #10 @@ -263,9 +267,9 @@ ENTRY(tme_handler) ld r1, @r3 ; r1: pmd beqz r1, 3f ; pmd_none(*pmd) ? ; - and3 r1, r1, #0xeff - ldi r4, #611 ; _KERNPG_TABLE(=611) - bne r1, r4, 3f ; !pmd_bad(*pmd) ? + and3 r1, r1, #0x3ff + ldi r4, #0x163 ; _KERNPG_TABLE(=0x163) + bne r1, r4, 3f ; pmd_bad(*pmd) ? .fillinsn 4: |