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_reloc_hide(x) RELOC_HIDE((x), 0)
  15. #ifdef CONFIG_FLATMEM
  16. #define pfn_valid(pfn) ((pfn) < max_mapnr)
  17. #endif /* CONFIG_FLATMEM */
  18. #ifdef CONFIG_X86_USE_3DNOW
  19. #include <asm/mmx.h>
  20. static inline void clear_page(void *page)
  21. {
  22. mmx_clear_page(page);
  23. }
  24. static inline void copy_page(void *to, void *from)
  25. {
  26. mmx_copy_page(to, from);
  27. }
  28. #else /* !CONFIG_X86_USE_3DNOW */
  29. #include <linux/string.h>
  30. static inline void clear_page(void *page)
  31. {
  32. memset(page, 0, PAGE_SIZE);
  33. }
  34. static inline void copy_page(void *to, void *from)
  35. {
  36. memcpy(to, from, PAGE_SIZE);
  37. }
  38. #endif /* CONFIG_X86_3DNOW */
  39. #endif /* !__ASSEMBLY__ */
  40. #endif /* _ASM_X86_PAGE_32_H */