pgtable.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef _H8300_PGTABLE_H
  2. #define _H8300_PGTABLE_H
  3. #include <asm-generic/4level-fixup.h>
  4. #include <linux/slab.h>
  5. #include <asm/processor.h>
  6. #include <asm/page.h>
  7. #include <asm/io.h>
  8. #define pgd_present(pgd) (1) /* pages are always present on NO_MM */
  9. #define pgd_none(pgd) (0)
  10. #define pgd_bad(pgd) (0)
  11. #define pgd_clear(pgdp)
  12. #define kern_addr_valid(addr) (1)
  13. #define pmd_offset(a, b) ((void *)0)
  14. #define pmd_none(pmd) (1)
  15. #define pgd_offset_k(adrdress) ((pgd_t *)0)
  16. #define pte_offset_kernel(dir, address) ((pte_t *)0)
  17. #define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
  18. #define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
  19. #define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */
  20. #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
  21. #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
  22. extern void paging_init(void);
  23. #define swapper_pg_dir ((pgd_t *) 0)
  24. #define __swp_type(x) (0)
  25. #define __swp_offset(x) (0)
  26. #define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
  27. #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
  28. #define __swp_entry_to_pte(x) ((pte_t) { (x).val })
  29. static inline int pte_file(pte_t pte) { return 0; }
  30. /*
  31. * ZERO_PAGE is a global shared page that is always zero: used
  32. * for zero-mapped memory areas etc..
  33. */
  34. #define ZERO_PAGE(vaddr) (virt_to_page(0))
  35. /*
  36. * These would be in other places but having them here reduces the diffs.
  37. */
  38. extern unsigned int kobjsize(const void *objp);
  39. extern int is_in_rom(unsigned long);
  40. /*
  41. * No page table caches to initialise
  42. */
  43. #define pgtable_cache_init() do { } while (0)
  44. #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
  45. remap_pfn_range(vma, vaddr, pfn, size, prot)
  46. /*
  47. * All 32bit addresses are effectively valid for vmalloc...
  48. * Sort of meaningless for non-VM targets.
  49. */
  50. #define VMALLOC_START 0
  51. #define VMALLOC_END 0xffffffff
  52. /*
  53. * All 32bit addresses are effectively valid for vmalloc...
  54. * Sort of meaningless for non-VM targets.
  55. */
  56. #define VMALLOC_START 0
  57. #define VMALLOC_END 0xffffffff
  58. #define arch_enter_lazy_cpu_mode() do {} while (0)
  59. #endif /* _H8300_PGTABLE_H */