[PATCH 1/5] ARM: pgtable: switch order of Linux vs hardware page tables

Catalin Marinas catalin.marinas at arm.com
Thu Nov 18 12:18:37 EST 2010


On 17 November 2010 17:28, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> This switches the ordering of the Linux vs hardware page tables in
> each page, thereby eliminating some of the arithmetic in the page
> table walks.  As we now place the Linux page table at the beginning
> of the page, we can deal with the offset in the pgt by simply masking
> it away, along with the other control bits.
[...]
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -535,7 +535,7 @@ static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned l
>  {
>        if (pmd_none(*pmd)) {
>                pte_t *pte = early_alloc(2 * PTRS_PER_PTE * sizeof(pte_t));
> -               __pmd_populate(pmd, __pa(pte) | prot);
> +               __pmd_populate(pmd, __pa(pte), prot);

While you are here, can you change the early_alloc size to
PTE_HWTABLE_OFF+PTE_HWTABLE_SIZE? This way I don't need to patch this
in LPAE.

-- 
Catalin



More information about the linux-arm-kernel mailing list