home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / include / asm-mips / mmzone.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-08-11  |  706 b   |  30 lines

  1. /*
  2.  * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
  3.  * Rewritten for Linux 2.6 by Christoph Hellwig (hch@lst.de) Jan 2004
  4.  */
  5. #ifndef _ASM_MMZONE_H_
  6. #define _ASM_MMZONE_H_
  7.  
  8. #include <asm/page.h>
  9. #include <mmzone.h>
  10.  
  11. #ifdef CONFIG_DISCONTIGMEM
  12.  
  13. #define kvaddr_to_nid(kvaddr)    pa_to_nid(__pa(kvaddr))
  14. #define pfn_to_nid(pfn)        pa_to_nid((pfn) << PAGE_SHIFT)
  15.  
  16. #define pfn_valid(pfn)                        \
  17. ({                                \
  18.      unsigned long __pfn = (pfn);                \
  19.      int __n = pfn_to_nid(__pfn);                \
  20.     ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn +    \
  21.                NODE_DATA(__n)->node_spanned_pages) : 0);\
  22. })
  23.  
  24. /* XXX: FIXME -- wli */
  25. #define kern_addr_valid(addr)    (0)
  26.  
  27. #endif /* CONFIG_DISCONTIGMEM */
  28.  
  29. #endif /* _ASM_MMZONE_H_ */
  30.