aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorYoichi Yuasa <yuasa@hh.iij4u.or.jp>2005-06-25 17:54:31 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:25 -0400
commitb4819b593740a6d11db07b52e0fe35975b29a185 (patch)
tree3e697be3b75988432596131ccde17c33d2318650 /include/asm-mips
parent7919a693bd735ed0aa93fc359ae09a588cfeb3bc (diff)
[PATCH] mips: add MIPS-specific support for flatmem/discontigmem
2.6.12-git6 doesn't boot on some MIPS machines. They need the support of flat memory and discontig memory. Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/mmzone.h4
-rw-r--r--include/asm-mips/page.h2
-rw-r--r--include/asm-mips/pgtable.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-mips/mmzone.h b/include/asm-mips/mmzone.h
index 29ee13be0b2a..d721143dbd47 100644
--- a/include/asm-mips/mmzone.h
+++ b/include/asm-mips/mmzone.h
@@ -8,6 +8,8 @@
8#include <asm/page.h> 8#include <asm/page.h>
9#include <mmzone.h> 9#include <mmzone.h>
10 10
11#ifdef CONFIG_DISCONTIGMEM
12
11#define kvaddr_to_nid(kvaddr) pa_to_nid(__pa(kvaddr)) 13#define kvaddr_to_nid(kvaddr) pa_to_nid(__pa(kvaddr))
12#define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT) 14#define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT)
13 15
@@ -36,4 +38,6 @@
36/* XXX: FIXME -- wli */ 38/* XXX: FIXME -- wli */
37#define kern_addr_valid(addr) (0) 39#define kern_addr_valid(addr) (0)
38 40
41#endif /* CONFIG_DISCONTIGMEM */
42
39#endif /* _ASM_MMZONE_H_ */ 43#endif /* _ASM_MMZONE_H_ */
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index d1bf8240e73b..5cae35cd9ba9 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -127,7 +127,7 @@ static __inline__ int get_order(unsigned long size)
127 127
128#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 128#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
129 129
130#ifndef CONFIG_DISCONTIGMEM 130#ifndef CONFIG_NEED_MULTIPLE_NODES
131#define pfn_to_page(pfn) (mem_map + (pfn)) 131#define pfn_to_page(pfn) (mem_map + (pfn))
132#define page_to_pfn(page) ((unsigned long)((page) - mem_map)) 132#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
133#define pfn_valid(pfn) ((pfn) < max_mapnr) 133#define pfn_valid(pfn) ((pfn) < max_mapnr)
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 878843203d67..e76ccd6e3a5d 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -350,7 +350,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
350 __update_cache(vma, address, pte); 350 __update_cache(vma, address, pte);
351} 351}
352 352
353#ifndef CONFIG_DISCONTIGMEM 353#ifndef CONFIG_NEED_MULTIPLE_NODES
354#define kern_addr_valid(addr) (1) 354#define kern_addr_valid(addr) (1)
355#endif 355#endif
356 356