Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: SGI-IP27: replace MAX_COMPACT_NODE with MAX_NUMNODES

MAX_COMPACT_NODE is a leftover from the compact node implementation,
which is removed now. Use MAX_NUMNODES instead.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

authored by

Thomas Bogendoerfer and committed by
Paul Burton
c80b4896 474435a0

+10 -30
+1 -1
arch/mips/include/asm/mach-ip27/topology.h
··· 22 22 23 23 #define cpumask_of_pcibus(bus) (cpumask_of_node(pcibus_to_node(bus))) 24 24 25 - extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; 25 + extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES]; 26 26 27 27 #define node_distance(from, to) (__node_distances[(from)][(to)]) 28 28
+1 -3
arch/mips/include/asm/sn/gda.h
··· 60 60 /* Pointer to a mask of nodes with copies 61 61 * of the kernel. */ 62 62 char g_padding[56]; /* pad out to 128 bytes */ 63 - nasid_t g_nasidtable[MAX_COMPACT_NODES]; /* NASID of each node, 64 - * indexed by cnodeid. 65 - */ 63 + nasid_t g_nasidtable[MAX_NUMNODES]; /* NASID of each node */ 66 64 } gda_t; 67 65 68 66 #define GDA ((gda_t*) GDA_ADDR(get_nasid()))
+1 -15
arch/mips/include/asm/sn/sn0/arch.h
··· 12 12 #define _ASM_SN_SN0_ARCH_H 13 13 14 14 15 - #ifndef SN0XXL /* 128 cpu SMP max */ 16 - /* 17 - * This is the maximum number of nodes that can be part of a kernel. 18 - * Effectively, it's the maximum number of compact node ids (cnodeid_t). 19 - */ 20 - #define MAX_COMPACT_NODES 64 21 - 22 15 /* 23 16 * MAXCPUS refers to the maximum number of CPUs in a single kernel. 24 17 * This is not necessarily the same as MAXNODES * CPUS_PER_NODE 25 18 */ 26 - #define MAXCPUS 128 27 - 28 - #else /* SN0XXL system */ 29 - 30 - #define MAX_COMPACT_NODES 128 31 - #define MAXCPUS 256 32 - 33 - #endif /* SN0XXL */ 19 + #define MAXCPUS (MAX_NUMNODES * CPUS_PER_NODE) 34 20 35 21 /* 36 22 * This is the maximum number of NASIDS that can be present in a system.
+1 -1
arch/mips/sgi-ip27/ip27-init.c
··· 42 42 43 43 #define CPU_NONE (cpuid_t)-1 44 44 45 - static DECLARE_BITMAP(hub_init_mask, MAX_COMPACT_NODES); 45 + static DECLARE_BITMAP(hub_init_mask, MAX_NUMNODES); 46 46 nasid_t master_nasid = INVALID_NASID; 47 47 48 48 struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
+5 -5
arch/mips/sgi-ip27/ip27-memory.c
··· 33 33 #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) 34 34 #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) 35 35 36 - struct node_data *__node_data[MAX_COMPACT_NODES]; 36 + struct node_data *__node_data[MAX_NUMNODES]; 37 37 38 38 EXPORT_SYMBOL(__node_data); 39 39 ··· 104 104 router_a->rou_rflag = 0; 105 105 } 106 106 107 - unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; 107 + unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES]; 108 108 EXPORT_SYMBOL(__node_distances); 109 109 110 110 static int __init compute_node_distance(nasid_t nasid_a, nasid_t nasid_b) ··· 173 173 { 174 174 nasid_t row, col; 175 175 176 - for (row = 0; row < MAX_COMPACT_NODES; row++) 177 - for (col = 0; col < MAX_COMPACT_NODES; col++) 176 + for (row = 0; row < MAX_NUMNODES; row++) 177 + for (col = 0; col < MAX_NUMNODES; col++) 178 178 __node_distances[row][col] = -1; 179 179 180 180 for_each_online_node(row) { ··· 412 412 szmem(); 413 413 max_low_pfn = PHYS_PFN(memblock_end_of_DRAM()); 414 414 415 - for (node = 0; node < MAX_COMPACT_NODES; node++) { 415 + for (node = 0; node < MAX_NUMNODES; node++) { 416 416 if (node_online(node)) { 417 417 node_mem_init(node); 418 418 continue;
+1 -5
arch/mips/sgi-ip27/ip27-smp.c
··· 81 81 int i, highest = 0; 82 82 gda_t *gdap = GDA; 83 83 84 - /* 85 - * MCD - this whole "compact node" stuff can probably be dropped, 86 - * as we can handle sparse numbering now 87 - */ 88 84 nodes_clear(node_online_map); 89 - for (i = 0; i < MAX_COMPACT_NODES; i++) { 85 + for (i = 0; i < MAX_NUMNODES; i++) { 90 86 nasid_t nasid = gdap->g_nasidtable[i]; 91 87 if (nasid == INVALID_NASID) 92 88 break;