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
This commit is contained in:
Thomas Bogendoerfer 2019-10-30 11:51:44 +01:00 committed by Paul Burton
parent 474435a058
commit c80b48965a
No known key found for this signature in database
GPG Key ID: 3EA79FACB57500DD
6 changed files with 10 additions and 30 deletions

View File

@ -22,7 +22,7 @@ extern int pcibus_to_node(struct pci_bus *);
#define cpumask_of_pcibus(bus) (cpumask_of_node(pcibus_to_node(bus))) #define cpumask_of_pcibus(bus) (cpumask_of_node(pcibus_to_node(bus)))
extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
#define node_distance(from, to) (__node_distances[(from)][(to)]) #define node_distance(from, to) (__node_distances[(from)][(to)])

View File

@ -60,9 +60,7 @@ typedef struct gda {
/* Pointer to a mask of nodes with copies /* Pointer to a mask of nodes with copies
* of the kernel. */ * of the kernel. */
char g_padding[56]; /* pad out to 128 bytes */ char g_padding[56]; /* pad out to 128 bytes */
nasid_t g_nasidtable[MAX_COMPACT_NODES]; /* NASID of each node, nasid_t g_nasidtable[MAX_NUMNODES]; /* NASID of each node */
* indexed by cnodeid.
*/
} gda_t; } gda_t;
#define GDA ((gda_t*) GDA_ADDR(get_nasid())) #define GDA ((gda_t*) GDA_ADDR(get_nasid()))

View File

@ -12,25 +12,11 @@
#define _ASM_SN_SN0_ARCH_H #define _ASM_SN_SN0_ARCH_H
#ifndef SN0XXL /* 128 cpu SMP max */
/*
* This is the maximum number of nodes that can be part of a kernel.
* Effectively, it's the maximum number of compact node ids (cnodeid_t).
*/
#define MAX_COMPACT_NODES 64
/* /*
* MAXCPUS refers to the maximum number of CPUs in a single kernel. * MAXCPUS refers to the maximum number of CPUs in a single kernel.
* This is not necessarily the same as MAXNODES * CPUS_PER_NODE * This is not necessarily the same as MAXNODES * CPUS_PER_NODE
*/ */
#define MAXCPUS 128 #define MAXCPUS (MAX_NUMNODES * CPUS_PER_NODE)
#else /* SN0XXL system */
#define MAX_COMPACT_NODES 128
#define MAXCPUS 256
#endif /* SN0XXL */
/* /*
* This is the maximum number of NASIDS that can be present in a system. * This is the maximum number of NASIDS that can be present in a system.

View File

@ -42,7 +42,7 @@
#define CPU_NONE (cpuid_t)-1 #define CPU_NONE (cpuid_t)-1
static DECLARE_BITMAP(hub_init_mask, MAX_COMPACT_NODES); static DECLARE_BITMAP(hub_init_mask, MAX_NUMNODES);
nasid_t master_nasid = INVALID_NASID; nasid_t master_nasid = INVALID_NASID;
struct cpuinfo_ip27 sn_cpu_info[NR_CPUS]; struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];

View File

@ -33,7 +33,7 @@
#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT)
#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT)
struct node_data *__node_data[MAX_COMPACT_NODES]; struct node_data *__node_data[MAX_NUMNODES];
EXPORT_SYMBOL(__node_data); EXPORT_SYMBOL(__node_data);
@ -104,7 +104,7 @@ static void router_recurse(klrou_t *router_a, klrou_t *router_b, int depth)
router_a->rou_rflag = 0; router_a->rou_rflag = 0;
} }
unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
EXPORT_SYMBOL(__node_distances); EXPORT_SYMBOL(__node_distances);
static int __init compute_node_distance(nasid_t nasid_a, nasid_t nasid_b) static int __init compute_node_distance(nasid_t nasid_a, nasid_t nasid_b)
@ -173,8 +173,8 @@ static void __init init_topology_matrix(void)
{ {
nasid_t row, col; nasid_t row, col;
for (row = 0; row < MAX_COMPACT_NODES; row++) for (row = 0; row < MAX_NUMNODES; row++)
for (col = 0; col < MAX_COMPACT_NODES; col++) for (col = 0; col < MAX_NUMNODES; col++)
__node_distances[row][col] = -1; __node_distances[row][col] = -1;
for_each_online_node(row) { for_each_online_node(row) {
@ -412,7 +412,7 @@ void __init prom_meminit(void)
szmem(); szmem();
max_low_pfn = PHYS_PFN(memblock_end_of_DRAM()); max_low_pfn = PHYS_PFN(memblock_end_of_DRAM());
for (node = 0; node < MAX_COMPACT_NODES; node++) { for (node = 0; node < MAX_NUMNODES; node++) {
if (node_online(node)) { if (node_online(node)) {
node_mem_init(node); node_mem_init(node);
continue; continue;

View File

@ -81,12 +81,8 @@ void cpu_node_probe(void)
int i, highest = 0; int i, highest = 0;
gda_t *gdap = GDA; gda_t *gdap = GDA;
/*
* MCD - this whole "compact node" stuff can probably be dropped,
* as we can handle sparse numbering now
*/
nodes_clear(node_online_map); nodes_clear(node_online_map);
for (i = 0; i < MAX_COMPACT_NODES; i++) { for (i = 0; i < MAX_NUMNODES; i++) {
nasid_t nasid = gdap->g_nasidtable[i]; nasid_t nasid = gdap->g_nasidtable[i];
if (nasid == INVALID_NASID) if (nasid == INVALID_NASID)
break; break;