page_32.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef _ASM_X86_PAGE_32_H
  2. #define _ASM_X86_PAGE_32_H
  3. #include <asm/page_32_types.h>
  4. #ifndef __ASSEMBLY__
  5. #ifdef CONFIG_HUGETLB_PAGE
  6. #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
  7. #endif
  8. #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
  9. #ifdef CONFIG_DEBUG_VIRTUAL
  10. extern unsigned long __phys_addr(unsigned long);
  11. #else
  12. #define __phys_addr(x) __phys_addr_nodebug(x)
  13. #endif
  14. #define __phys_addr_symbol(x) __phys_addr(x)
  15. #define __phys_reloc_hide(x) RELOC_HIDE((x), 0)
  16. #ifdef CONFIG_FLATMEM
  17. #define pfn_valid(pfn) ((pfn) < max_mapnr)
  18. #endif /* CONFIG_FLATMEM */
  19. #ifdef CONFIG_X86_USE_3DNOW
  20. #include <asm/mmx.h>
  21. static inline void clear_page(void *page)
  22. {
  23. mmx_clear_page(page);
  24. }
  25. static inline void copy_page(void *to, void *from)
  26. {
  27. mmx_copy_page(to, from);
  28. }
  29. #else /* !CONFIG_X86_USE_3DNOW */
  30. #include <linux/string.h>
  31. static inline void clear_page(void *page)
  32. {
  33. memset(page, 0, PAGE_SIZE);
  34. }
  35. static inline void copy_page(void *to, void *from)
  36. {
  37. memcpy(to, from, PAGE_SIZE);
  38. }
  39. #endif /* CONFIG_X86_3DNOW */
  40. #endif /* !__ASSEMBLY__ */
  41. #endif /* _ASM_X86_PAGE_32_H */