Lines Matching refs:gran
172 #define lpae_entries(gran) (_AC(1,U) << LPAE_SHIFT_##gran) argument
173 #define lpae_entry_mask(gran) (lpae_entries(gran) - 1) argument
175 #define third_shift(gran) (PAGE_SHIFT_##gran) argument
176 #define third_size(gran) ((paddr_t)1 << third_shift(gran)) argument
178 #define second_shift(gran) (third_shift(gran) + LPAE_SHIFT_##gran) argument
179 #define second_size(gran) ((paddr_t)1 << second_shift(gran)) argument
181 #define first_shift(gran) (second_shift(gran) + LPAE_SHIFT_##gran) argument
182 #define first_size(gran) ((paddr_t)1 << first_shift(gran)) argument
185 #define zeroeth_shift(gran) (first_shift(gran) + LPAE_SHIFT_##gran) argument
186 #define zeroeth_size(gran) ((paddr_t)1 << zeroeth_shift(gran)) argument
188 #define TABLE_OFFSET(offs, gran) (offs & lpae_entry_mask(gran)) argument
189 #define TABLE_OFFSET_HELPERS(gran) \ argument
190 static inline paddr_t third_table_offset_##gran##K(paddr_t va) \
192 return TABLE_OFFSET((va >> third_shift(gran##K)), gran##K); \
195 static inline paddr_t second_table_offset_##gran##K(paddr_t va) \
197 return TABLE_OFFSET((va >> second_shift(gran##K)), gran##K); \
200 static inline paddr_t first_table_offset_##gran##K(paddr_t va) \
202 return TABLE_OFFSET((va >> first_shift(gran##K)), gran##K); \
205 static inline paddr_t zeroeth_table_offset_##gran##K(paddr_t va) \
208 if ( gran == 64 ) \
211 return TABLE_OFFSET((va >> zeroeth_shift(gran##K)), gran##K); \