mm.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifdef CONFIG_MMU
  2. /* the upper-most page table pointer */
  3. extern pmd_t *top_pmd;
  4. #define TOP_PTE(x) pte_offset_kernel(top_pmd, x)
  5. /*
  6. * 0xffff8000 to 0xffffffff is reserved for any ARM architecture
  7. * specific hacks for copying pages efficiently, while 0xffff4000
  8. * is reserved for VIPT aliasing flushing by generic code.
  9. *
  10. * Note that we don't allow VIPT aliasing caches with SMP.
  11. */
  12. #define COPYPAGE_MINICACHE 0xffff8000
  13. #define COPYPAGE_V6_FROM 0xffff8000
  14. #define COPYPAGE_V6_TO 0xffffc000
  15. /* PFN alias flushing, for VIPT caches */
  16. #define FLUSH_ALIAS_START 0xffff4000
  17. static inline pmd_t *pmd_off_k(unsigned long virt)
  18. {
  19. return pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt);
  20. }
  21. struct mem_type {
  22. pteval_t prot_pte;
  23. pmdval_t prot_l1;
  24. pmdval_t prot_sect;
  25. unsigned int domain;
  26. };
  27. const struct mem_type *get_mem_type(unsigned int type);
  28. extern void __flush_dcache_page(struct address_space *mapping, struct page *page);
  29. /*
  30. * ARM specific vm_struct->flags bits.
  31. */
  32. /* (super)section-mapped I/O regions used by ioremap()/iounmap() */
  33. #define VM_ARM_SECTION_MAPPING 0x80000000
  34. /* permanent static mappings from iotable_init() */
  35. #define VM_ARM_STATIC_MAPPING 0x40000000
  36. /* mapping type (attributes) for permanent static mappings */
  37. #define VM_ARM_MTYPE(mt) ((mt) << 20)
  38. #define VM_ARM_MTYPE_MASK (0x1f << 20)
  39. #endif
  40. #ifdef CONFIG_ZONE_DMA
  41. extern u32 arm_dma_limit;
  42. #else
  43. #define arm_dma_limit ((u32)~0)
  44. #endif
  45. void __init bootmem_init(void);
  46. void arm_mm_memblock_reserve(void);