From: Matthew Dobson Fix up the sh arch. sh defined NR_NODES, change sh to use standard MAX_NUMNODES instead. arch/sh/mm/init.c | 4 ++-- include/asm-sh/mmzone.h | 10 +++++----- include/asm-sh/numnodes.h | 7 +++++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff -puN arch/sh/mm/init.c~node-enumeration-cleanup-03 arch/sh/mm/init.c --- 25/arch/sh/mm/init.c~node-enumeration-cleanup-03 2003-09-16 00:15:49.000000000 -0700 +++ 25-akpm/arch/sh/mm/init.c 2003-09-16 00:15:49.000000000 -0700 @@ -51,8 +51,8 @@ unsigned long mmu_context_cache = NO_CON #endif #ifdef CONFIG_DISCONTIGMEM -pg_data_t discontig_page_data[NR_NODES]; -bootmem_data_t discontig_node_bdata[NR_NODES]; +pg_data_t discontig_page_data[MAX_NUMNODES]; +bootmem_data_t discontig_node_bdata[MAX_NUMNODES]; #endif void show_mem(void) diff -puN include/asm-sh/mmzone.h~node-enumeration-cleanup-03 include/asm-sh/mmzone.h --- 25/include/asm-sh/mmzone.h~node-enumeration-cleanup-03 2003-09-16 00:15:49.000000000 -0700 +++ 25-akpm/include/asm-sh/mmzone.h 2003-09-16 00:15:49.000000000 -0700 @@ -10,14 +10,14 @@ #include +#ifdef CONFIG_DISCONTIGMEM + /* Currently, just for HP690 */ #define PHYSADDR_TO_NID(phys) ((((phys) - __MEMORY_START) >= 0x01000000)?1:0) -#define NR_NODES 2 -extern pg_data_t discontig_page_data[NR_NODES]; -extern bootmem_data_t discontig_node_bdata[NR_NODES]; +extern pg_data_t discontig_page_data[MAX_NUMNODES]; +extern bootmem_data_t discontig_node_bdata[MAX_NUMNODES]; -#ifdef CONFIG_DISCONTIGMEM /* * Following are macros that each numa implmentation must define. */ @@ -46,7 +46,7 @@ static inline int is_valid_page(struct p { unsigned int i; - for (i = 0; i < NR_NODES; i++) { + for (i = 0; i < MAX_NUMNODES; i++) { if (page >= NODE_MEM_MAP(i) && page < NODE_MEM_MAP(i) + NODE_DATA(i)->node_size) return 1; diff -puN /dev/null include/asm-sh/numnodes.h --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25-akpm/include/asm-sh/numnodes.h 2003-09-16 00:15:49.000000000 -0700 @@ -0,0 +1,7 @@ +#ifndef _ASM_MAX_NUMNODES_H +#define _ASM_MAX_NUMNODES_H + +/* Max 2 Nodes */ +#define NODES_SHIFT 1 + +#endif /* _ASM_MAX_NUMNODES_H */ _