public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH tip] x86: unsigned long pte_pfn
Date: Mon, 08 Sep 2008 13:23:46 -0700	[thread overview]
Message-ID: <48C589D2.5030905@goop.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0809082100090.30216@blonde.site>

Hugh Dickins wrote:
> pte_pfn() has always been of type unsigned long, even on 32-bit PAE;
> but in the current tip/next/mm tree it's unsigned long long on 64-bit,
> which gives an irritating warning if you try to printk a pfn with the
> usual %lx.  Copy the inline function used by 32-bit's pgtable-3level.h.
>   

That looks OK, but rather than copying it, why not move the definition
into pgtable.h?  Isn't it identical for all pagetable modes?

    J

> Signed-off-by: Hugh Dickins <hugh@veritas.com>
> ---
>
>  include/asm-x86/pgtable_64.h |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> --- 2.6.27-rc5-mm1/include/asm-x86/pgtable_64.h	2008-09-05 10:08:04.000000000 +0100
> +++ linux/include/asm-x86/pgtable_64.h	2008-09-08 19:12:39.000000000 +0100
> @@ -182,7 +182,11 @@ static inline int pmd_bad(pmd_t pmd)
>  
>  #define pages_to_mb(x)	((x) >> (20 - PAGE_SHIFT))   /* FIXME: is this right? */
>  #define pte_page(x)	pfn_to_page(pte_pfn((x)))
> -#define pte_pfn(x)	((pte_val((x)) & __PHYSICAL_MASK) >> PAGE_SHIFT)
> +
> +static inline unsigned long pte_pfn(pte_t pte)
> +{
> +	return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT;
> +}
>  
>  /*
>   * Macro to mark a page protection value as "uncacheable".
>   


  reply	other threads:[~2008-09-08 20:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 20:04 [PATCH tip] x86: unsigned long pte_pfn Hugh Dickins
2008-09-08 20:23 ` Jeremy Fitzhardinge [this message]
2008-09-09 15:42   ` Hugh Dickins
2008-09-09 16:52     ` Jeremy Fitzhardinge
2008-09-10  8:00       ` Ingo Molnar

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=48C589D2.5030905@goop.org \
    --to=jeremy@goop.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox