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

Alpha can use generic pfn_to_page definition.

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

Index: test-layout-free-zone/include/asm-alpha/mmzone.h
===================================================================
--- test-layout-free-zone.orig/include/asm-alpha/mmzone.h
+++ test-layout-free-zone/include/asm-alpha/mmzone.h
@@ -104,19 +104,8 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p,
  	__xx;                                                           \
  })

-#define pfn_to_page(pfn)						\
-({									\
- 	unsigned long kaddr = (unsigned long)__va((pfn) << PAGE_SHIFT);	\
-	(NODE_DATA(kvaddr_to_nid(kaddr))->node_mem_map + local_mapnr(kaddr));	\
-})
-
-#define page_to_pfn(page)						\
-	((page) - page_zone(page)->zone_mem_map +			\
-	 (page_zone(page)->zone_start_pfn))
-
  #define page_to_pa(page)						\
-	((( (page) - page_zone(page)->zone_mem_map )			\
-	+ page_zone(page)->zone_start_pfn) << PAGE_SHIFT)
+	(page_to_pfn(page) << PAGE_SHIFT)

  #define pfn_to_nid(pfn)		pa_to_nid(((u64)(pfn) << PAGE_SHIFT))
  #define pfn_valid(pfn)							\
Index: test-layout-free-zone/include/asm-alpha/page.h
===================================================================
--- test-layout-free-zone.orig/include/asm-alpha/page.h
+++ test-layout-free-zone/include/asm-alpha/page.h
@@ -85,8 +85,6 @@ typedef unsigned long pgprot_t;
  #define __pa(x)			((unsigned long) (x) - PAGE_OFFSET)
  #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
  #ifndef CONFIG_DISCONTIGMEM
-#define pfn_to_page(pfn)	(mem_map + (pfn))
-#define page_to_pfn(page)	((unsigned long)((page) - mem_map))
  #define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)

  #define pfn_valid(pfn)		((pfn) < max_mapnr)


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

only message in thread, other threads:[~2006-02-08  5:49 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:50 PATCH] unify pfn_to_page take 2 [5/25] alpha 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.