Skip to content

Commit

Permalink
MIPS: Loongson: Register reserved memory pages
Browse files Browse the repository at this point in the history
Register reserved pages for Loongson family machines.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: yanh@lemote.com,
Cc: huhb@lemote.com
Cc: Zhang Le <r0bertz@gentoo.org>
Cc: zhangfx@lemote.com,
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Wu Zhangjin authored and Ralf Baechle committed Dec 17, 2009
1 parent c1b14a7 commit 659da2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/mips/loongson/common/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@

#include <loongson.h>
#include <mem.h>
#include <pci.h>

void __init prom_init_memory(void)
{
add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);

add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize <<
20), BOOT_MEM_RESERVED);
#ifdef CONFIG_64BIT
if (highmemsize > 0)
add_memory_region(LOONGSON_HIGHMEM_START,
highmemsize << 20, BOOT_MEM_RAM);

add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START -
LOONGSON_PCI_MEM_END - 1, BOOT_MEM_RESERVED);

#endif /* CONFIG_64BIT */
}

Expand Down

0 comments on commit 659da2b

Please sign in to comment.