page.h 771 B

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