Subject: Re: [PATCH 3/9] powerpc/mm/book3s-64: Use physical addresses in upper page table tree levels

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Mon, 22 Feb 2016 12:36:03 +0530

Paul Mackerras <[email-masked]> writes:

> From: Paul Mackerras <[email-masked]>
>
> This changes the Linux page tables to store physical addresses
> rather than kernel virtual addresses in the upper levels of the
> tree (pgd, pud and pmd) for 64-bit Book 3S machines.
>
> This frees up some high order bits, and will be needed with
> PowerISA v3.0 machines which read the page table tree in hardware
> in radix mode.
>

Radix mark the top two bits at upper level page table tree.

ie,

static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
{
	pud_set(pud, __pgtable_ptr_val(pmd));
}

static inline void rpud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
{
	*pud = __pud(__pa(pmd) | RPUD_VAL_BITS);
}

I guess we will do the same with hash to keep them same ?

-aneesh