* [PATCH] unify pfn_to_page take 2 [10/25] h8300 funcs
@ 2006-02-08 6:00 KAMEZAWA Hiroyuki
0 siblings, 0 replies; only message in thread
From: KAMEZAWA Hiroyuki @ 2006-02-08 6:00 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: ysato
Looks complicated..
ex) page_to_pfn()
(((page - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) >> PAGE_SHIFT
is same to
(page - mem_map) + (PAGE_OFFSET >> PAGE_SHIFT)
H8300 can use generic ones.
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Index: test-layout-free-zone/include/asm-h8300/page.h
===================================================================
--- test-layout-free-zone.orig/include/asm-h8300/page.h
+++ test-layout-free-zone/include/asm-h8300/page.h
@@ -71,8 +71,7 @@ extern unsigned long memory_end;
#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
#define pfn_valid(page) (page < max_mapnr)
-#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn))
-#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
+#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
((void *)(kaddr) < (void *)memory_end))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-08 5:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-08 6:00 [PATCH] unify pfn_to_page take 2 [10/25] h8300 funcs KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox