[PATCH 1/3] powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Jul 15 15:43:03 EST 2008


On Mon, 2008-07-14 at 08:08 -0500, Kumar Gala wrote:
> Because the pte is now 64-bits the compiler was optimizing the update
> to always clear the upper 32-bits of the pte.  We need to ensure the
> clr mask is treated as an unsigned long long to get the proper behavior.
> 
> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
> Acked-by: Josh Boyer <jwboyer at linux.vnet.ibm.com>

Putting that one into my tree. I'll let you put the 2 others in yours.

Cheers,
Ben.

> ---
>  include/asm-powerpc/pgtable-ppc32.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
> index 11eede4..73015f0 100644
> --- a/include/asm-powerpc/pgtable-ppc32.h
> +++ b/include/asm-powerpc/pgtable-ppc32.h
> @@ -624,7 +624,7 @@ static inline unsigned long long pte_update(pte_t *p,
>  	: "cc" );
>  #else /* PTE_ATOMIC_UPDATES */
>  	unsigned long long old = pte_val(*p);
> -	*p = __pte((old & ~clr) | set);
> +	*p = __pte((old & ~(unsigned long long)clr) | set);
>  #endif /* !PTE_ATOMIC_UPDATES */
> 
>  #ifdef CONFIG_44x




More information about the Linuxppc-dev mailing list