[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180220161424.5421-4-j.neuschaefer@gmx.net>
Date: Tue, 20 Feb 2018 17:14:21 +0100
From: Jonathan Neuschäfer <j.neuschaefer@....net>
To: linuxppc-dev@...ts.ozlabs.org
Cc: linux-kernel@...r.kernel.org,
Michael Ellerman <mpe@...erman.id.au>, linux-mm@...ck.org,
Joel Stanley <joel@....id.au>,
Jonathan Neuschäfer <j.neuschaefer@....net>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Nathan Fontenot <nfont@...ux.vnet.ibm.com>,
Michael Bringmann <mwb@...ux.vnet.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Subject: [PATCH 3/6] powerpc: numa: Use the right #ifdef guards around functions
of_node_to_nid and dump_numa_cpu_topology are declared inline in their
respective header files, if CONFIG_NUMA is not set. Thus it is only
valid to define these functions in numa.c if CONFIG_NUMA is set.
(numa.c, despite the name, isn't conditionalized on CONFIG_NUMA, but
CONFIG_NEED_MULTIPLE_NODES.)
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@....net>
---
arch/powerpc/mm/numa.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 0570bc2a0b13..df03a65b658f 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -254,6 +254,7 @@ static int of_node_to_nid_single(struct device_node *device)
return nid;
}
+#ifdef CONFIG_NUMA
/* Walk the device tree upwards, looking for an associativity id */
int of_node_to_nid(struct device_node *device)
{
@@ -272,6 +273,7 @@ int of_node_to_nid(struct device_node *device)
return nid;
}
EXPORT_SYMBOL(of_node_to_nid);
+#endif
static int __init find_min_common_depth(void)
{
@@ -744,6 +746,7 @@ static void __init setup_nonnuma(void)
}
}
+#ifdef CONFIG_NUMA
void __init dump_numa_cpu_topology(void)
{
unsigned int node;
@@ -778,6 +781,7 @@ void __init dump_numa_cpu_topology(void)
pr_cont("\n");
}
}
+#endif
/* Initialize NODE_DATA for a node on the local memory */
static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
--
2.16.1
Powered by blists - more mailing lists