page.h 797 B

12345678910111213141516171819202122232425262728
  1. #ifndef _ASM_CRIS_ARCH_PAGE_H
  2. #define _ASM_CRIS_ARCH_PAGE_H
  3. #include <linux/config.h>
  4. #ifdef __KERNEL__
  5. #define PAGE_OFFSET KSEG_C /* kseg_c is mapped to physical ram. */
  6. /*
  7. * Macros to convert between physical and virtual addresses. By stripiing a
  8. * selected bit it's possible to convert between KSEG_x and 0x40000000 where the
  9. * DRAM really resides. DRAM is virtually at 0xc.
  10. */
  11. #ifndef CONFIG_ETRAXFS_SIM
  12. #define __pa(x) ((unsigned long)(x) & 0x7fffffff)
  13. #define __va(x) ((void *)((unsigned long)(x) | 0x80000000))
  14. #else
  15. #define __pa(x) ((unsigned long)(x) & 0x3fffffff)
  16. #define __va(x) ((void *)((unsigned long)(x) | 0xc0000000))
  17. #endif
  18. #define VM_STACK_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
  19. VM_MAYREAD | VM_MAYWRITE)
  20. #endif /* __KERNEL__ */
  21. #endif /* _ASM_CRIS_ARCH_PAGE_H */