[PATCH v2 2/4] powerpc: Fixes for CONFIG_PTE_64BIT for SMP support

Becky Bruce becky.bruce at freescale.com
Thu Sep 4 03:54:29 EST 2008


On Aug 29, 2008, at 8:56 AM, Kumar Gala wrote:

> There are some minor issues with support 64-bit PTEs on a 32-bit  
> processor
> when dealing with SMP.
>
> * We need to order the stores in set_pte_at to make sure the flag word
>  is set second.
> * Change pte_clear to use pte_update so only the flag word is cleared
>
> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
> ---
> arch/powerpc/include/asm/pgtable-ppc32.h |   14 ++++++++++----
> 1 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/ 
> include/asm/pgtable-ppc32.h
> index 6fe39e3..db2e7bd 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc32.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc32.h
> @@ -517,7 +517,7 @@ extern unsigned long  
> bad_call_to_PMD_PAGE_SIZE(void);
>
> #define pte_none(pte)		((pte_val(pte) & ~_PTE_NONE_MASK) == 0)
> #define pte_present(pte)	(pte_val(pte) & _PAGE_PRESENT)
> -#define pte_clear(mm,addr,ptep)	do { set_pte_at((mm), (addr),  
> (ptep), __pte(0)); } while (0)
> +#define pte_clear(mm,addr,ptep)	do { pte_update(ptep, ~0, 0); }  
> while (0)

This breaks classic... Need to avoid changing PAGE_HASHPTE.

Cheers,
-Becky



More information about the Linuxppc-dev mailing list