[RFC PATCH 1/2] powerpc/mm: Update prot_none implementation using _PAGE_READ

Paul Mackerras paulus at ozlabs.org
Wed Mar 2 11:38:26 AEDT 2016


On Fri, Feb 26, 2016 at 08:50:49AM +0530, Aneesh Kumar K.V wrote:
> Now that we have _PAGE_READ use that to implement prot none. With this
> prot_none is _PAGE_PRESENT with none of the access bits set. While
> hashing we map that to PP bit 00.
> 
> With this implementation, we will now take a prot fault for prot none
> ptes, whereas before, we never inserted such a pte to hash. Hence we
> always got nohpte fault before.
> 
> This is in preparation to remove _PAGE_USER from book3s 64

Mostly looks good, but I have a comment:

> @@ -176,10 +177,12 @@
>  #define PAGE_SHARED	__pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
>  #define PAGE_SHARED_X	__pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | \
>  				 _PAGE_EXEC)

Don't we need _PAGE_READ in PAGE_SHARED[_X] now?

Paul.


More information about the Linuxppc-dev mailing list