fireHydrantDataOperation.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #ifndef _ASM_M32R_PGTABLE_H
  2. #define _ASM_M32R_PGTABLE_H
  3. #include <asm-generic/4level-fixup.h>
  4. #ifdef __KERNEL__
  5. /*
  6. * The Linux memory management assumes a three-level page table setup. On
  7. * the M32R, we use that, but "fold" the mid level into the top-level page
  8. * table, so that we physically have the same two-level page table as the
  9. * M32R mmu expects.
  10. *
  11. * This file contains the functions and defines necessary to modify and use
  12. * the M32R page table tree.
  13. */
  14. /* CAUTION!: If you change macro definitions in this file, you might have to
  15. * change arch/m32r/mmu.S manually.
  16. */
  17. #ifndef __ASSEMBLY__
  18. #include <linux/threads.h>
  19. #include <linux/bitops.h>
  20. #include <asm/processor.h>
  21. #include <asm/addrspace.h>
  22. #include <asm/page.h>
  23. struct mm_struct;
  24. struct vm_area_struct;
  25. extern pgd_t swapper_pg_dir[1024];
  26. extern void paging_init(void);
  27. /*
  28. * ZERO_PAGE is a global shared page that is always zero: used
  29. * for zero-mapped memory areas etc..
  30. */
  31. extern unsigned long empty_zero_page[1024];
  32. #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
  33. #endif /* !__ASSEMBLY__ */
  34. #ifndef __ASSEMBLY__
  35. #include <asm/pgtable-2level.h>
  36. #endif
  37. #define pgtable_cache_init() do { } while (0)
  38. #define PMD_SIZE (1UL << PMD_SHIFT)
  39. #define PMD_MASK (~(PMD_SIZE - 1))
  40. #define PGDIR_SIZE (1UL << PGDIR_SHIFT)
  41. #define PGDIR_MASK (~(PGDIR_SIZE - 1))
  42. #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
  43. #define FIRST_USER_ADDRESS 0
  44. #ifndef __ASSEMBLY__
  45. /* Just any arbitrary offset to the start of the vmalloc VM area: the
  46. * current 8MB value just means that there will be a 8MB "hole" after the
  47. * physical memory until the kernel virtual memory starts. That means that
  48. * any out-of-bounds memory accesses will hopefully be caught.
  49. * The vmalloc() routines leaves a hole of 4kB between each vmalloced
  50. * area for the same reason. ;)
  51. */
  52. #define VMALLOC_START KSEG2
  53. #define VMALLOC_END KSEG3
  54. /*
  55. * M32R TLB format
  56. *
  57. * [0] [1:19] [20:23] [24:31]
  58. * +-----------------------+----+-------------+
  59. * | VPN |0000| ASID |
  60. * +-----------------------+----+-------------+
  61. * +-+---------------------+----+-+---+-+-+-+-+
  62. * |0 PPN |0000|N|AC |L|G|V| |
  63. * +-+---------------------+----+-+---+-+-+-+-+
  64. * RWX
  65. */
  66. #define _PAGE_BIT_DIRTY 0 /* software: page changed */
  67. #define _PAGE_BIT_FILE 0 /* when !present: nonlinear file
  68. mapping */
  69. #define _PAGE_BIT_PRESENT 1 /* Valid: page is valid */
  70. #define _PAGE_BIT_GLOBAL 2 /* Global */
  71. #define _PAGE_BIT_LARGE 3 /* Large */
  72. #define _PAGE_BIT_EXEC 4 /* Execute */
  73. #define _PAGE_BIT_WRITE 5 /* Write */
  74. #define _PAGE_BIT_READ 6 /* Read */
  75. #define _PAGE_BIT_NONCACHABLE 7 /* Non cachable */
  76. #define _PAGE_BIT_ACCESSED 8 /* software: page referenced */
  77. #define _PAGE_BIT_PROTNONE 9 /* software: if not present */
  78. #define _PAGE_DIRTY (1UL << _PAGE_BIT_DIRTY)
  79. #define _PAGE_FILE (1UL << _PAGE_BIT_FILE)
  80. #define _PAGE_PRESENT (1UL << _PAGE_BIT_PRESENT)
  81. #define _PAGE_GLOBAL (1UL << _PAGE_BIT_GLOBAL)
  82. #define _PAGE_LARGE (1UL << _PAGE_BIT_LARGE)
  83. #define _PAGE_EXEC (1UL << _PAGE_BIT_EXEC)
  84. #define _PAGE_WRITE (1UL << _PAGE_BIT_WRITE)
  85. #define _PAGE_READ (1UL << _PAGE_BIT_READ)
  86. #define _PAGE_NONCACHABLE (1UL << _PAGE_BIT_NONCACHABLE)
  87. #define _PAGE_ACCESSED (1UL << _PAGE_BIT_ACCESSED)
  88. #define _PAGE_PROTNONE (1UL << _PAGE_BIT_PROTNONE)
  89. #define _PAGE_TABLE \
  90. ( _PAGE_PRESENT | _PAGE_WRITE | _PAGE_READ | _PAGE_ACCESSED \
  91. | _PAGE_DIRTY )
  92. #define _KERNPG_TABLE \
  93. ( _PAGE_PRESENT | _PAGE_WRITE | _PAGE_READ | _PAGE_ACCESSED \