page_32.h 773 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_PAGE_32_H
  3. #define _ASM_X86_PAGE_32_H
  4. #include <asm/page_32_types.h>
  5. #ifndef __ASSEMBLY__
  6. #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
  7. #ifdef CONFIG_DEBUG_VIRTUAL
  8. extern unsigned long __phys_addr(unsigned long);
  9. #else
  10. #define __phys_addr(x) __phys_addr_nodebug(x)
  11. #endif
  12. #define __phys_addr_symbol(x) __phys_addr(x)
  13. #define __phys_reloc_hide(x) RELOC_HIDE((x), 0)
  14. #ifdef CONFIG_FLATMEM
  15. #define pfn_valid(pfn) ((pfn) < max_mapnr)
  16. #endif /* CONFIG_FLATMEM */
  17. #include <linux/string.h>
  18. static inline void clear_page(void *page)
  19. {
  20. memset(page, 0, PAGE_SIZE);
  21. }
  22. static inline void copy_page(void *to, void *from)
  23. {
  24. memcpy(to, from, PAGE_SIZE);
  25. }
  26. #endif /* !__ASSEMBLY__ */
  27. #endif /* _ASM_X86_PAGE_32_H */