From: Dave Hansen The following series implements memory hot-add for ppc64 and i386. There are x86_64 and ia64 implementations that will be submitted shortly as well, through the normal maintainers. This patch: local_mapnr is unused, except for in an alpha header. Keep the alpha one, kill the rest. Signed-off-by: Dave Hansen Signed-off-by: Andrew Morton --- include/asm-i386/mmzone.h | 6 ------ include/asm-m32r/mmzone.h | 6 ------ include/asm-parisc/mmzone.h | 6 ------ include/asm-ppc64/mmzone.h | 3 --- 4 files changed, 21 deletions(-) diff -puN include/asm-i386/mmzone.h~memory-hotplug-prep-kill-local_mapnr include/asm-i386/mmzone.h --- devel/include/asm-i386/mmzone.h~memory-hotplug-prep-kill-local_mapnr 2005-09-10 14:30:59.000000000 -0700 +++ devel-akpm/include/asm-i386/mmzone.h 2005-09-10 14:30:59.000000000 -0700 @@ -88,12 +88,6 @@ static inline int pfn_to_nid(unsigned lo __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ }) -#define local_mapnr(kvaddr) \ -({ \ - unsigned long __pfn = __pa(kvaddr) >> PAGE_SHIFT; \ - (__pfn - node_start_pfn(pfn_to_nid(__pfn))); \ -}) - /* XXX: FIXME -- wli */ #define kern_addr_valid(kaddr) (0) diff -puN include/asm-m32r/mmzone.h~memory-hotplug-prep-kill-local_mapnr include/asm-m32r/mmzone.h --- devel/include/asm-m32r/mmzone.h~memory-hotplug-prep-kill-local_mapnr 2005-09-10 14:30:59.000000000 -0700 +++ devel-akpm/include/asm-m32r/mmzone.h 2005-09-10 14:30:59.000000000 -0700 @@ -21,12 +21,6 @@ extern struct pglist_data *node_data[]; __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \ }) -#define local_mapnr(kvaddr) \ -({ \ - unsigned long __pfn = __pa(kvaddr) >> PAGE_SHIFT; \ - (__pfn - node_start_pfn(pfn_to_nid(__pfn))); \ -}) - #define pfn_to_page(pfn) \ ({ \ unsigned long __pfn = pfn; \ diff -puN include/asm-parisc/mmzone.h~memory-hotplug-prep-kill-local_mapnr include/asm-parisc/mmzone.h --- devel/include/asm-parisc/mmzone.h~memory-hotplug-prep-kill-local_mapnr 2005-09-10 14:30:59.000000000 -0700 +++ devel-akpm/include/asm-parisc/mmzone.h 2005-09-10 14:30:59.000000000 -0700 @@ -27,12 +27,6 @@ extern struct node_map_data node_data[]; }) #define node_localnr(pfn, nid) ((pfn) - node_start_pfn(nid)) -#define local_mapnr(kvaddr) \ -({ \ - unsigned long __pfn = __pa(kvaddr) >> PAGE_SHIFT; \ - (__pfn - node_start_pfn(pfn_to_nid(__pfn))); \ -}) - #define pfn_to_page(pfn) \ ({ \ unsigned long __pfn = (pfn); \ diff -puN include/asm-ppc64/mmzone.h~memory-hotplug-prep-kill-local_mapnr include/asm-ppc64/mmzone.h --- devel/include/asm-ppc64/mmzone.h~memory-hotplug-prep-kill-local_mapnr 2005-09-10 14:30:59.000000000 -0700 +++ devel-akpm/include/asm-ppc64/mmzone.h 2005-09-10 14:30:59.000000000 -0700 @@ -67,9 +67,6 @@ static inline int pa_to_nid(unsigned lon #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) #define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn) -#define local_mapnr(kvaddr) \ - ( (__pa(kvaddr) >> PAGE_SHIFT) - node_start_pfn(kvaddr_to_nid(kvaddr)) - #ifdef CONFIG_DISCONTIGMEM /* _