[PATCH 08/12] mm: pgtable: add shortcuts for accessing kernel PMD and PTE

Matthew Wilcox willy at infradead.org
Wed May 13 05:24:41 AEST 2020


On Tue, May 12, 2020 at 09:44:18PM +0300, Mike Rapoport wrote:
> +++ b/include/linux/pgtable.h
> @@ -28,6 +28,24 @@
>  #define USER_PGTABLES_CEILING	0UL
>  #endif
>  
> +/* FIXME: */

Fix you what?  Add documentation?

> +static inline pmd_t *pmd_off(struct mm_struct *mm, unsigned long va)
> +{
> +	return pmd_offset(pud_offset(p4d_offset(pgd_offset(mm, va), va), va), va);
> +}


More information about the Linuxppc-dev mailing list