diff options
Diffstat (limited to 'include/asm-m32r')
-rw-r--r-- | include/asm-m32r/mmzone.h | 14 | ||||
-rw-r--r-- | include/asm-m32r/page.h | 5 | ||||
-rw-r--r-- | include/asm-m32r/setup.h | 4 |
3 files changed, 2 insertions, 21 deletions
diff --git a/include/asm-m32r/mmzone.h b/include/asm-m32r/mmzone.h index adc7970a77e..9f3b5accda8 100644 --- a/include/asm-m32r/mmzone.h +++ b/include/asm-m32r/mmzone.h @@ -21,20 +21,6 @@ extern struct pglist_data *node_data[]; __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \ }) -#define pfn_to_page(pfn) \ -({ \ - unsigned long __pfn = pfn; \ - int __node = pfn_to_nid(__pfn); \ - &NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)]; \ -}) - -#define page_to_pfn(pg) \ -({ \ - struct page *__page = pg; \ - struct zone *__zone = page_zone(__page); \ - (unsigned long)(__page - __zone->zone_mem_map) \ - + __zone->zone_start_pfn; \ -}) #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) /* * 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 4ab57887636..9ddbc087dbc 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h @@ -76,9 +76,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; #ifndef CONFIG_DISCONTIGMEM #define PFN_BASE (CONFIG_MEMORY_START >> PAGE_SHIFT) -#define pfn_to_page(pfn) (mem_map + ((pfn) - PFN_BASE)) -#define page_to_pfn(page) \ - ((unsigned long)((page) - mem_map) + PFN_BASE) +#define ARCH_PFN_OFFSET PFN_BASE #define pfn_valid(pfn) (((pfn) - PFN_BASE) < max_mapnr) #endif /* !CONFIG_DISCONTIGMEM */ @@ -92,6 +90,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; #endif /* __KERNEL__ */ +#include <asm-generic/memory_model.h> #include <asm-generic/page.h> #endif /* _ASM_M32R_PAGE_H */ diff --git a/include/asm-m32r/setup.h b/include/asm-m32r/setup.h index 5f028dc26a9..52f4fa29abf 100644 --- a/include/asm-m32r/setup.h +++ b/include/asm-m32r/setup.h @@ -24,10 +24,6 @@ #define RAMDISK_PROMPT_FLAG (0x8000) #define RAMDISK_LOAD_FLAG (0x4000) -#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) -#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) -#define PFN_PHYS(x) ((x) << PAGE_SHIFT) - extern unsigned long memory_start; extern unsigned long memory_end; |