All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] unify pfn_to_page take 2 [6/25]  arm funcs
@ 2006-02-08  5:52 KAMEZAWA Hiroyuki
  0 siblings, 0 replies; only message in thread
From: KAMEZAWA Hiroyuki @ 2006-02-08  5:52 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: rmk

arm can use generic funcs.
PFN_TO_NID, LOCAL_MAP_NR are defined by sub-archs.

Signed-Off-By: KAMEZAWA Hirotuki <kamezawa.hiroyu@jp.fujitsu.com>

Index: test-layout-free-zone/include/asm-arm/memory.h
===================================================================
--- test-layout-free-zone.orig/include/asm-arm/memory.h
+++ test-layout-free-zone/include/asm-arm/memory.h
@@ -172,9 +172,7 @@ static inline __deprecated void *bus_to_
   *  virt_addr_valid(k)	indicates whether a virtual address is valid
   */
  #ifndef CONFIG_DISCONTIGMEM
-
-#define page_to_pfn(page)	(((page) - mem_map) + PHYS_PFN_OFFSET)
-#define pfn_to_page(pfn)	((mem_map + (pfn)) - PHYS_PFN_OFFSET)
+#define ARCH_PFH_OFFSET		PHYS_PFN_OFFSET
  #define pfn_valid(pfn)		((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))

  #define virt_to_page(kaddr)	(pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
@@ -189,13 +187,8 @@ static inline __deprecated void *bus_to_
   * around in memory.
   */
  #include <linux/numa.h>
-
-#define page_to_pfn(page)					\
-	(( (page) - page_zone(page)->zone_mem_map)		\
-	  + page_zone(page)->zone_start_pfn)
-
-#define pfn_to_page(pfn)					\
-	(PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT))
+#define arch_pfn_to_nid(pfn)			(PFN_TO_NID(pfn))
+#define arch_local_page_offset(pfn, nid)	(LOCAL_MAP_NR((pfn) << PAGE_SHIFT))

  #define pfn_valid(pfn)						\
  	({							\


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-08  5:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-08  5:52 [PATCH] unify pfn_to_page take 2 [6/25] arm funcs KAMEZAWA Hiroyuki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.