Commit dbe97702 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Clean up MAX_NR_NODES/NUMNODES/etc. [3/5]

From: Matthew Dobson <colpatch@us.ibm.com>

Fix up the sh arch.  sh defined NR_NODES, change sh to use standard
MAX_NUMNODES instead.
parent 5bdcf4f8
......@@ -51,8 +51,8 @@ unsigned long mmu_context_cache = NO_CONTEXT;
#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)
......
......@@ -10,14 +10,14 @@
#include <linux/config.h>
#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 page *page)
{
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;
......
#ifndef _ASM_MAX_NUMNODES_H
#define _ASM_MAX_NUMNODES_H
/* Max 2 Nodes */
#define NODES_SHIFT 1
#endif /* _ASM_MAX_NUMNODES_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment