From 3d355d24d9bc8a29f7f52f6e9aa5e2354fa6b5f3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 20 Jan 2005 19:59:54 -0500 Subject: [PATCH] --- yaml --- r: 19912 b: refs/heads/master c: 3d503753b40469b6a19dcc3511f6eb8c55f6d122 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/mm/init.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a578ef6aa72a..dec0435330d8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e9feeb207e55373f718b33e0d6cb0c2f8b58f3c1 +refs/heads/master: 3d503753b40469b6a19dcc3511f6eb8c55f6d122 diff --git a/trunk/arch/mips/mm/init.c b/trunk/arch/mips/mm/init.c index 4ee91c9a556f..0ff9a348b843 100644 --- a/trunk/arch/mips/mm/init.c +++ b/trunk/arch/mips/mm/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -200,6 +201,11 @@ static inline int page_is_ram(unsigned long pagenr) return 0; } +static struct kcore_list kcore_mem, kcore_vmalloc; +#ifdef CONFIG_64BIT +static struct kcore_list kcore_kseg0; +#endif + void __init mem_init(void) { unsigned long codesize, reservedpages, datasize, initsize; @@ -249,6 +255,16 @@ void __init mem_init(void) datasize = (unsigned long) &_edata - (unsigned long) &_etext; initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; +#ifdef CONFIG_64BIT + if ((unsigned long) &_text > (unsigned long) CKSEG0) + /* The -4 is a hack so that user tools don't have to handle + the overflow. */ + kclist_add(&kcore_kseg0, (void *) CKSEG0, 0x80000000 - 4); +#endif + kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT); + kclist_add(&kcore_vmalloc, (void *)VMALLOC_START, + VMALLOC_END-VMALLOC_START); + printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),