[PATCH] POWERPC: Allow 32-bit pgtable code to support 36-bit physical

Becky Bruce becky.bruce at freescale.com
Sat Aug 23 04:20:26 EST 2008


On Aug 21, 2008, at 4:40 PM, Kumar Gala wrote:

>> #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

Cut-and-paste strikes again :) Will fix, thanks.

>
>>
>> +#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)

That's fine, but it makes me dependent on your tree.  Shall I respin  
on top of your tree and have you pick this up, or are you going to  
push your changes to Paulus?

>
>
>
>> /*
>> 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?

It doesn't really belong here - I'll move it.

Thanks,
B




More information about the Linuxppc-dev mailing list