2 * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
3 * Rewritten for Linux 2.6 by Christoph Hellwig (hch@lst.de) Jan 2004
8 #include <linux/config.h>
12 #ifdef CONFIG_DISCONTIGMEM
14 #define kvaddr_to_nid(kvaddr) pa_to_nid(__pa(kvaddr))
15 #define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT)
17 #define pfn_valid(pfn) \
19 unsigned long __pfn = (pfn); \
20 int __n = pfn_to_nid(__pfn); \
21 ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \
22 NODE_DATA(__n)->node_spanned_pages) : 0);\
25 /* XXX: FIXME -- wli */
26 #define kern_addr_valid(addr) (0)
28 #endif /* CONFIG_DISCONTIGMEM */
30 #endif /* _ASM_MMZONE_H_ */