On Wed, Feb 08, 2006 at 02:41:22PM +0900, KAMEZAWA Hiroyuki wrote:I named the file as memory_model.h, so I placed it under linux/+#ifndef CONFIG_ARCH_HAS_PFN_TO_PAGE
Since this file is entirely conditionalized on ARCH_HAS_PFN_TO_PAGE,
might it be better to put this in asm-generic/ and include it from
an asm- header instead of adding yet another ARCH_HAS_ define?
This way, m68k (iirc?) could just not include that header, and not
worry about this define.
Then again, adding the include to every arches headers likely offsets
some of the C code reduction. However, it's still a win on the unified
definition and long term maintainability angle. Perhaps someone more
authoritative than little old me, could cast judgement on this.
Ah, okay. thanks.[...]
+/* not-inlined version for some archs. funcs are defined in mm/page_alloc.c */
+extern unsigned long page_to_pfn(struct page *page);
+extern struct page *pfn_to_page(unsigned long pfn);
Commenting this #else might improve readability.