aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/include/asm/mach-netlogic/multi-node.h2
-rw-r--r--arch/mips/pci/pci-xlp.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/include/asm/mach-netlogic/multi-node.h b/arch/mips/include/asm/mach-netlogic/multi-node.h
index b3d91e0c10dd..beeb36b9f9f8 100644
--- a/arch/mips/include/asm/mach-netlogic/multi-node.h
+++ b/arch/mips/include/asm/mach-netlogic/multi-node.h
@@ -63,6 +63,8 @@ struct nlm_soc_info {
63 63
64extern struct nlm_soc_info nlm_nodes[NLM_NR_NODES]; 64extern struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
65#define nlm_get_node(i) (&nlm_nodes[i]) 65#define nlm_get_node(i) (&nlm_nodes[i])
66#define nlm_node_present(n) ((n) >= 0 && (n) < NLM_NR_NODES && \
67 nlm_get_node(n)->coremask != 0)
66#ifdef CONFIG_CPU_XLR 68#ifdef CONFIG_CPU_XLR
67#define nlm_current_node() (&nlm_nodes[0]) 69#define nlm_current_node() (&nlm_nodes[0])
68#else 70#else
diff --git a/arch/mips/pci/pci-xlp.c b/arch/mips/pci/pci-xlp.c
index 222d804e77d1..da7a37a55981 100644
--- a/arch/mips/pci/pci-xlp.c
+++ b/arch/mips/pci/pci-xlp.c
@@ -235,7 +235,6 @@ static inline void xlp_config_pci_bswap(int node, int link) {}
235 235
236static int __init pcibios_init(void) 236static int __init pcibios_init(void)
237{ 237{
238 struct nlm_soc_info *nodep;
239 uint64_t pciebase; 238 uint64_t pciebase;
240 int link, n; 239 int link, n;
241 u32 reg; 240 u32 reg;
@@ -249,9 +248,8 @@ static int __init pcibios_init(void)
249 ioport_resource.end = ~0; 248 ioport_resource.end = ~0;
250 249
251 for (n = 0; n < NLM_NR_NODES; n++) { 250 for (n = 0; n < NLM_NR_NODES; n++) {
252 nodep = nlm_get_node(n); 251 if (!nlm_node_present(n))
253 if (!nodep->coremask) 252 continue;
254 continue; /* node does not exist */
255 253
256 for (link = 0; link < PCIE_NLINKS; link++) { 254 for (link = 0; link < PCIE_NLINKS; link++) {
257 pciebase = nlm_get_pcie_base(n, link); 255 pciebase = nlm_get_pcie_base(n, link);