diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
commit | 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch) | |
tree | 2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /arch/mips64/mm | |
parent | 216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff) |
Merge with Linux 2.3.32.
Diffstat (limited to 'arch/mips64/mm')
-rw-r--r-- | arch/mips64/mm/fault.c | 4 | ||||
-rw-r--r-- | arch/mips64/mm/init.c | 32 | ||||
-rw-r--r-- | arch/mips64/mm/umap.c | 4 |
3 files changed, 31 insertions, 9 deletions
diff --git a/arch/mips64/mm/fault.c b/arch/mips64/mm/fault.c index b7091a83d..772aa0475 100644 --- a/arch/mips64/mm/fault.c +++ b/arch/mips64/mm/fault.c @@ -1,4 +1,4 @@ -/* $Id: fault.c,v 1.5 1999/11/23 17:12:50 ralf Exp $ +/* $Id: fault.c,v 1.4 1999/12/04 03:59:00 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -22,7 +22,7 @@ #include <linux/version.h> #include <asm/hardirq.h> -#include <asm/pgtable.h> +#include <asm/pgalloc.h> #include <asm/mmu_context.h> #include <asm/softirq.h> #include <asm/system.h> diff --git a/arch/mips64/mm/init.c b/arch/mips64/mm/init.c index 06b047ef9..e788d3b36 100644 --- a/arch/mips64/mm/init.c +++ b/arch/mips64/mm/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.9 2000/01/27 23:45:25 ralf Exp $ +/* $Id: init.c,v 1.10 2000/01/29 01:41:59 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -32,6 +32,7 @@ #include <asm/dma.h> #include <asm/system.h> #include <asm/pgtable.h> +#include <asm/pgalloc.h> #ifdef CONFIG_SGI_IP22 #include <asm/sgialib.h> #endif @@ -343,15 +344,23 @@ extern char __init_begin, __init_end; void __init paging_init(void) { - unsigned int zones_size[2]; + unsigned int zones_size[MAX_NR_ZONES] = {0, 0, 0}; + unsigned long max_dma, low; /* Initialize the entire pgd. */ pgd_init((unsigned long)swapper_pg_dir); pgd_init((unsigned long)swapper_pg_dir + PAGE_SIZE / 2); pmd_init((unsigned long)invalid_pmd_table); - zones_size[0] = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; - zones_size[1] = max_low_pfn - zones_size[0]; + max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; + low = max_low_pfn; + + if (low < max_dma) + zones_size[ZONE_DMA] = low; + else { + zones_size[ZONE_DMA] = max_dma; + zones_size[ZONE_NORMAL] = low - max_dma; + } free_area_init(zones_size); } @@ -381,7 +390,7 @@ void __init mem_init(void) datasize = (unsigned long) &_edata - (unsigned long) &_fdata; initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; - printk("Memory: %uk/%luk available (%ldk kernel code, %ldk reserved, " + printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, " "%ldk data, %ldk init)\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), ram << (PAGE_SHIFT-10), @@ -391,6 +400,19 @@ void __init mem_init(void) initsize >> 10); } +#ifdef CONFIG_BLK_DEV_INITRD +void free_initrd_mem(unsigned long start, unsigned long end) +{ + for (; start < end; start += PAGE_SIZE) { + ClearPageReserved(mem_map + MAP_NR(start)); + set_page_count(mem_map+MAP_NR(start), 1); + free_page(start); + totalram_pages++; + } + printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); +} +#endif + extern char __init_begin, __init_end; extern void prom_free_prom_memory(void); diff --git a/arch/mips64/mm/umap.c b/arch/mips64/mm/umap.c index 5fefe091d..b8ae542cc 100644 --- a/arch/mips64/mm/umap.c +++ b/arch/mips64/mm/umap.c @@ -1,4 +1,4 @@ -/* $Id: umap.c,v 1.3 2000/01/27 01:05:24 ralf Exp $ +/* $Id: umap.c,v 1.4 2000/01/29 01:41:59 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -21,7 +21,7 @@ #include <linux/swap.h> #include <asm/system.h> -#include <asm/pgtable.h> +#include <asm/pgalloc.h> #include <asm/page.h> static inline void |