Subject: Re: [PATCH -V2 1/2] powerpc: Use HPTE constants when updating hpte bits

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Tue, 08 Oct 2013 08:45:38 +0530

"Aneesh Kumar K.V" <[email-masked]> writes:

> From: "Aneesh Kumar K.V" <[email-masked]>
>
> Even though we have same value for linux PTE bits and hash PTE pits
> use the hash pte bits wen updating hash pte

...
> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> index 02d6e21..78f2c59 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -146,8 +146,9 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group,
>  	flags = 0;
>
>  	/* Make pHyp happy */
> -	if ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU))
> -		hpte_r &= ~_PAGE_COHERENT;
> +	if ((rflags & _PAGE_NO_CACHE) && !(rflags & _PAGE_WRITETHRU))
> +		hpte_r &= ~HPTE_R_M;
> +

-	if ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU))
+	if ((rflags & _PAGE_NO_CACHE) && !(rflags & _PAGE_WRITETHRU))

the if loop part of the change is already done in upstream. Since V2
was generated after moving V1 patch to a different tree (kvm tree),
ended up with that additional change. Let me know if you want me
respin the patch

>  	if (firmware_has_feature(FW_FEATURE_XCMO) && !(hpte_r & HPTE_R_N))
>  		flags |= H_COALESCE_CAND;
>

-aneesh