diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-m32r/mmzone.h | 14 | ||||
-rw-r--r-- | include/asm-m32r/page.h | 5 |
2 files changed, 2 insertions, 17 deletions
diff --git a/include/asm-m32r/mmzone.h b/include/asm-m32r/mmzone.h index adc7970a77ec..9f3b5accda88 100644 --- a/include/asm-m32r/mmzone.h +++ b/include/asm-m32r/mmzone.h | |||
@@ -21,20 +21,6 @@ extern struct pglist_data *node_data[]; | |||
21 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \ | 21 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \ |
22 | }) | 22 | }) |
23 | 23 | ||
24 | #define pfn_to_page(pfn) \ | ||
25 | ({ \ | ||
26 | unsigned long __pfn = pfn; \ | ||
27 | int __node = pfn_to_nid(__pfn); \ | ||
28 | &NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)]; \ | ||
29 | }) | ||
30 | |||
31 | #define page_to_pfn(pg) \ | ||
32 | ({ \ | ||
33 | struct page *__page = pg; \ | ||
34 | struct zone *__zone = page_zone(__page); \ | ||
35 | (unsigned long)(__page - __zone->zone_mem_map) \ | ||
36 | + __zone->zone_start_pfn; \ | ||
37 | }) | ||
38 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | 24 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) |
39 | /* | 25 | /* |
40 | * pfn_valid should be made as fast as possible, and the current definition | 26 | * pfn_valid should be made as fast as possible, and the current definition |
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 4ab578876361..9ddbc087dbc5 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h | |||
@@ -76,9 +76,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
76 | 76 | ||
77 | #ifndef CONFIG_DISCONTIGMEM | 77 | #ifndef CONFIG_DISCONTIGMEM |
78 | #define PFN_BASE (CONFIG_MEMORY_START >> PAGE_SHIFT) | 78 | #define PFN_BASE (CONFIG_MEMORY_START >> PAGE_SHIFT) |
79 | #define pfn_to_page(pfn) (mem_map + ((pfn) - PFN_BASE)) | 79 | #define ARCH_PFN_OFFSET PFN_BASE |
80 | #define page_to_pfn(page) \ | ||
81 | ((unsigned long)((page) - mem_map) + PFN_BASE) | ||
82 | #define pfn_valid(pfn) (((pfn) - PFN_BASE) < max_mapnr) | 80 | #define pfn_valid(pfn) (((pfn) - PFN_BASE) < max_mapnr) |
83 | #endif /* !CONFIG_DISCONTIGMEM */ | 81 | #endif /* !CONFIG_DISCONTIGMEM */ |
84 | 82 | ||
@@ -92,6 +90,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
92 | 90 | ||
93 | #endif /* __KERNEL__ */ | 91 | #endif /* __KERNEL__ */ |
94 | 92 | ||
93 | #include <asm-generic/memory_model.h> | ||
95 | #include <asm-generic/page.h> | 94 | #include <asm-generic/page.h> |
96 | 95 | ||
97 | #endif /* _ASM_M32R_PAGE_H */ | 96 | #endif /* _ASM_M32R_PAGE_H */ |