public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH tip] x86: unsigned long pte_pfn
@ 2008-09-08 20:04 Hugh Dickins
  2008-09-08 20:23 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 5+ messages in thread
From: Hugh Dickins @ 2008-09-08 20:04 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: x86, linux-kernel

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.

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".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-10  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-08 20:04 [PATCH tip] x86: unsigned long pte_pfn Hugh Dickins
2008-09-08 20:23 ` Jeremy Fitzhardinge
2008-09-09 15:42   ` Hugh Dickins
2008-09-09 16:52     ` Jeremy Fitzhardinge
2008-09-10  8:00       ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox