Lines Matching refs:pgd
313 static inline void set_pgd(pgd_t *pgdp, pgd_t pgd) in set_pgd() argument
316 *pgdp = pgd; in set_pgd()
318 set_p4d((p4d_t *)pgdp, (p4d_t){ pgd_val(pgd) }); in set_pgd()
321 static inline int pgd_none(pgd_t pgd) in pgd_none() argument
324 return (pgd_val(pgd) == 0); in pgd_none()
329 static inline int pgd_present(pgd_t pgd) in pgd_present() argument
332 return (pgd_val(pgd) & _PAGE_PRESENT); in pgd_present()
337 static inline int pgd_bad(pgd_t pgd) in pgd_bad() argument
340 return !pgd_present(pgd); in pgd_bad()
345 static inline void pgd_clear(pgd_t *pgd) in pgd_clear() argument
348 set_pgd(pgd, __pgd(0)); in pgd_clear()
351 static inline p4d_t *pgd_pgtable(pgd_t pgd) in pgd_pgtable() argument
354 return (p4d_t *)pfn_to_virt(__page_val_to_pfn(pgd_val(pgd))); in pgd_pgtable()
356 return (p4d_t *)p4d_pgtable((p4d_t) { pgd_val(pgd) }); in pgd_pgtable()
358 #define pgd_page_vaddr(pgd) ((unsigned long)pgd_pgtable(pgd)) argument
360 static inline struct page *pgd_page(pgd_t pgd) in pgd_page() argument
362 return pfn_to_page(__page_val_to_pfn(pgd_val(pgd))); in pgd_page()
364 #define pgd_page(pgd) pgd_page(pgd) argument
369 static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address) in p4d_offset() argument
372 return pgd_pgtable(*pgd) + p4d_index(address); in p4d_offset()
374 return (p4d_t *)pgd; in p4d_offset()