x86_64 can use generic ones.
Signed-Off-By: KAMEZAWA Hiroyuki <[email protected]>
Index: cleanup_pfn_page/include/asm-x86_64/mmzone.h
===================================================================
--- cleanup_pfn_page.orig/include/asm-x86_64/mmzone.h
+++ cleanup_pfn_page/include/asm-x86_64/mmzone.h
@@ -38,9 +38,7 @@ static inline __attribute__((pure)) int
#ifdef CONFIG_DISCONTIGMEM
#define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT)
#define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr))
-
-extern struct page *pfn_to_page(unsigned long pfn);
-extern unsigned long page_to_pfn(struct page *page);
+#define arch_pfn_to_nid(pfn) pfn_to_nid(pfn)
extern int pfn_valid(unsigned long pfn);
#endif
Index: cleanup_pfn_page/include/asm-x86_64/page.h
===================================================================
--- cleanup_pfn_page.orig/include/asm-x86_64/page.h
+++ cleanup_pfn_page/include/asm-x86_64/page.h
@@ -123,8 +123,6 @@ typedef struct { unsigned long pgprot; }
#define __boot_va(x) __va(x)
#define __boot_pa(x) __pa(x)
#ifdef CONFIG_FLATMEM
-#define pfn_to_page(pfn) (mem_map + (pfn))
-#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
#define pfn_valid(pfn) ((pfn) < end_pfn)
#endif
Index: cleanup_pfn_page/arch/x86_64/mm/numa.c
===================================================================
--- cleanup_pfn_page.orig/arch/x86_64/mm/numa.c
+++ cleanup_pfn_page/arch/x86_64/mm/numa.c
@@ -369,21 +369,6 @@ EXPORT_SYMBOL(node_data);
* Should do that.
*/
-/* Requires pfn_valid(pfn) to be true */
-struct page *pfn_to_page(unsigned long pfn)
-{
- int nid = phys_to_nid(((unsigned long)(pfn)) << PAGE_SHIFT);
- return (pfn - node_start_pfn(nid)) + NODE_DATA(nid)->node_mem_map;
-}
-EXPORT_SYMBOL(pfn_to_page);
-
-unsigned long page_to_pfn(struct page *page)
-{
- return (long)(((page) - page_zone(page)->zone_mem_map) +
- page_zone(page)->zone_start_pfn);
-}
-EXPORT_SYMBOL(page_to_pfn);
-
int pfn_valid(unsigned long pfn)
{
unsigned nid;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]