page_32.h 1000 B

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