[PATCH] POWERPC: Allow 32-bit pgtable code to support 36-bit physical
Kumar Gala
galak at kernel.crashing.org
Fri Aug 22 07:40:59 EST 2008
> #define _PMD_PRESENT 0
> #define _PMD_PRESENT_MASK (PAGE_MASK)
> @@ -517,7 +522,13 @@ 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)
> +
> +#if (defined(CONFIG_PTE_64BIT) && (_PAGE_HASHPTE != 0))
> +#define pte_clear(mm, addr, ptep) \
> + do { pte_update((ptep), (~_PAGE_HASHPTE), __pte(0)); } while (0)
drop the __pte(0), doesn't make sense for pte_update
>
> +#else
> #define pte_clear(mm,addr,ptep) do { set_pte_at((mm), (addr),
> (ptep), __pte(0)); } while (0)
> +#endif
Can we just always (for all ppc32) do:
#define pte_clear(mm,addr,ptep) do { pte_update(ptep,
(~_PAGE_HASHPTE), 0); } while (0)
I've already changed this to be:
#define pte_clear(mm,addr,ptep) do { pte_update(ptep, ~0, 0); } while
(0)
> /*
> diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/
> asm/types.h
> index d3374bc..a9a9262 100644
> --- a/arch/powerpc/include/asm/types.h
> +++ b/arch/powerpc/include/asm/types.h
> @@ -55,7 +55,7 @@ typedef u64 phys_addr_t;
> typedef u32 phys_addr_t;
> #endif
>
> -#ifdef __powerpc64__
> +#if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT)
> typedef u64 dma_addr_t;
> #else
> typedef u32 dma_addr_t;
is this really part of this patchset of the IOMMU changes?
- k
More information about the Linuxppc-dev
mailing list