diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 22:17:26 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 22:17:26 +0000 |
commit | 984760dbf5e48f6224dfe9e26e03536b3d38b6cd (patch) | |
tree | a99674322e524c4c90009b3bdae5fab0eebf2094 /arch/sparc64/mm | |
parent | a7ce7d5e94c98ef5b867f61b2ebecd563f4b6ec9 (diff) |
Merge with Linux 2.4.0-test6-pre8.
Diffstat (limited to 'arch/sparc64/mm')
-rw-r--r-- | arch/sparc64/mm/fault.c | 2 | ||||
-rw-r--r-- | arch/sparc64/mm/generic.c | 6 | ||||
-rw-r--r-- | arch/sparc64/mm/init.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 63da67c8e..cd4b3365c 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c @@ -110,7 +110,7 @@ static unsigned int get_user_insn(unsigned long tpc) if(!pte_present(pte)) goto out; - pa = phys_base + (pte_pagenr(pte) << PAGE_SHIFT); + pa = phys_base + (sparc64_pte_pagenr(pte) << PAGE_SHIFT); pa += (tpc & ~PAGE_MASK); /* Use phys bypass so we don't pollute dtlb/dcache. */ diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c index 9a1ab1de3..c469c6062 100644 --- a/arch/sparc64/mm/generic.c +++ b/arch/sparc64/mm/generic.c @@ -18,14 +18,14 @@ static inline void forget_pte(pte_t page) if (pte_none(page)) return; if (pte_present(page)) { - unsigned long nr = pte_pagenr(page); - if (nr >= max_mapnr || PageReserved(mem_map+nr)) + struct page *ptpage = pte_page(page); + if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage)) return; /* * free_page() used to be able to clear swap cache * entries. We may now have to do it manually. */ - free_page_and_swap_cache(mem_map+nr); + free_page_and_swap_cache(ptpage); return; } swap_free(pte_to_swp_entry(page)); diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index d3c9e5036..63994c51d 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -1242,7 +1242,7 @@ void free_initmem (void) page = (addr + ((unsigned long) __va(phys_base)) - ((unsigned long) &empty_zero_page)); - p = mem_map + MAP_NR(page); + p = virt_to_page(page); ClearPageReserved(p); set_page_count(p, 1); @@ -1257,7 +1257,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) if (start < end) printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); for (; start < end; start += PAGE_SIZE) { - struct page *p = mem_map + MAP_NR(start); + struct page *p = virt_to_page(start); ClearPageReserved(p); set_page_count(p, 1); |