LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jan Beulich <jbeulich@novell.com>
Cc: tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org,
	Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [PATCH] i386/PAE: fix pud_page()
Date: Thu, 30 Oct 2008 11:49:26 +0100	[thread overview]
Message-ID: <20081030104926.GF3569@elte.hu> (raw)
In-Reply-To: <49099C71.76E4.0078.0@novell.com>


* Jan Beulich <jbeulich@novell.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@novell.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

      reply	other threads:[~2008-10-30 10:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 10:37 Jan Beulich
2008-10-30 10:49 ` Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081030104926.GF3569@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=jbeulich@novell.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH] i386/PAE: fix pud_page()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).