[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081030104926.GF3569@elte.hu>
Date: Thu, 30 Oct 2008 11:49:26 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Jan Beulich <jbeulich@...ell.com>
Cc: tglx@...utronix.de, hpa@...or.com, linux-kernel@...r.kernel.org,
Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [PATCH] i386/PAE: fix pud_page()
* Jan Beulich <jbeulich@...ell.com> wrote:
> To the unsuspecting user it is quite annoying that this broken and
> inconsistent with x86-64 definition still exists.
>
> Signed-off-by: Jan Beulich <jbeulich@...ell.com>
>
> ---
> arch/x86/include/asm/pgtable-3level.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
applied, thanks Jan!
> -#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK))
> +#define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)
>
> #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
>
>
> /* Find an entry in the second-level page table.. */
> -#define pmd_offset(pud, address) ((pmd_t *)pud_page(*(pud)) + \
> +#define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \
> pmd_index(address))
we were quite lucky there. Despite being a cleanup i've put this into
x86/urgent - i agree that it's just too ugly and confusing.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists