Lines Matching refs:tp
131 #define TTE_GET_SIZE(tp) \
132 (((tp)->tte_data >> TD_SIZE_SHIFT) & TD_SIZE_MASK)
133 #define TTE_GET_PAGE_SHIFT(tp) \
134 TTE_PAGE_SHIFT(TTE_GET_SIZE(tp))
135 #define TTE_GET_PAGE_SIZE(tp) \
136 (1 << TTE_GET_PAGE_SHIFT(tp))
137 #define TTE_GET_PAGE_MASK(tp) \
138 (TTE_GET_PAGE_SIZE(tp) - 1)
140 #define TTE_GET_PA(tp) \
141 ((tp)->tte_data & (TD_PA_MASK << TD_PA_SHIFT))
142 #define TTE_GET_VPN(tp) \
143 ((tp)->tte_vpn >> TV_SIZE_BITS)
144 #define TTE_GET_VA(tp) \
145 (TTE_GET_VPN(tp) << TTE_GET_PAGE_SHIFT(tp))
146 #define TTE_GET_PMAP(tp) \
147 (((tp)->tte_data & TD_P) != 0 ? (kernel_pmap) : \
148 (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap))
149 #define TTE_ZERO(tp) \
150 memset(tp, 0, sizeof(*tp))
161 tte_match(struct tte *tp, vm_offset_t va)
164 return (((tp->tte_data & TD_V) != 0) &&
165 (tp->tte_vpn == TV_VPN(va, TTE_GET_SIZE(tp))));