Go to the documentation of this file.
4 #define _PAGE_SPECIAL 0x00000400
5 #define _PAGE_HPTE_SUB 0x0ffff000
6 #define _PAGE_HPTE_SUB0 0x08000000
7 #define _PAGE_COMBO 0x10000000
8 #define _PAGE_4K_PFN 0x20000000
22 #define _PAGE_HASHPTE _PAGE_HPTE_SUB
28 #define _PAGE_F_SECOND 0x00008000
29 #define _PAGE_F_GIX 0x00007000
32 #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | _PAGE_COMBO)
39 #define PTE_RPN_SHIFT (30)
49 #define __real_pte(e,p) ((real_pte_t) { \
50 (e), ((e) & _PAGE_COMBO) ? \
51 (pte_val(*((p) + PTRS_PER_PTE))) : 0 })
52 #define __rpte_to_hidx(r,index) ((pte_val((r).pte) & _PAGE_COMBO) ? \
53 (((r).hidx >> ((index)<<2)) & 0xf) : ((pte_val((r).pte) >> 12) & 0xf))
54 #define __rpte_to_pte(r) ((r).pte)
55 #define __rpte_sub_valid(rpte, index) \
56 (pte_val(rpte.pte) & (_PAGE_HPTE_SUB0 >> (index)))
61 #define pte_iterate_hashed_subpages(rpte, psize, vpn, index, shift) \
63 unsigned long __end = vpn + (1UL << (PAGE_SHIFT - VPN_SHIFT)); \
64 unsigned __split = (psize == MMU_PAGE_4K || \
65 psize == MMU_PAGE_64K_AP); \
66 shift = mmu_psize_defs[psize].shift; \
67 for (index = 0; vpn < __end; index++, \
68 vpn += (1L << (shift - VPN_SHIFT))) { \
69 if (!__split || __rpte_sub_valid(rpte, index)) \
72 #define pte_iterate_hashed_end() } while(0); } } while(0)
74 #define pte_pagesize_index(mm, addr, pte) \
75 (((pte) & _PAGE_COMBO)? MMU_PAGE_4K: MMU_PAGE_64K)
77 #define remap_4k_pfn(vma, addr, pfn, prot) \
78 remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, \
79 __pgprot(pgprot_val((prot)) | _PAGE_4K_PFN))