MIPS: Loongson: Register reserved memory pages
authorWu Zhangjin <wuzhangjin@gmail.com>
Fri, 16 Oct 2009 06:17:15 +0000 (14:17 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 17 Dec 2009 01:57:02 +0000 (01:57 +0000)
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>
arch/mips/loongson/common/mem.c

index e94ef15..3f7f153 100644 (file)
 
 #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 */
 }