LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: markn@au1.ibm.com, tbreeds@au1.ibm.com, lkessler@us.ibm.com,
	Jesse Larrew <jlarrew@linux.vnet.ibm.com>,
	mjwolf@us.ibm.com
Subject: [PATCH] powerpc/pseries: Fix VPHN build errors on non-SMP systems
Date: Sun, 12 Dec 2010 18:53:42 -0500	[thread overview]
Message-ID: <20101212235342.3583.29397.sendpatchset@manic8ball.ltc.austin.ibm.com> (raw)

From: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

The VPHN feature is only meaningful on NUMA systems that implement
the SPLPAR option, so exclude the VPHN code on systems without
SPLPAR enabled.

This patch fixes a build problem on non-SMP systems introduced by the
following commits:

3b7a27db3b6b5501e3d1c1628e6d5a547ffe76c6
9eff1a38407c051273fe1a20f03f8155bd32de35

Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/topology.h |   20 +++++++++++---------
 arch/powerpc/mm/numa.c              |    3 +++
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index aed188b..a2832b8 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -93,9 +93,20 @@ extern void __init dump_numa_cpu_topology(void);
 extern int sysfs_add_device_to_node(struct sys_device *dev, int nid);
 extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid);
 
+#ifdef CONFIG_SPLPAR
 extern int start_topology_update(void);
 extern int stop_topology_update(void);
 #else
+static inline int start_topology_update(void)
+{
+	return 0;
+}
+static inline int stop_topology_update(void)
+{
+	return 0;
+}
+#endif /* CONFIG_SPLPAR */
+#else
 
 static inline void dump_numa_cpu_topology(void) {}
 
@@ -108,15 +119,6 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
 						int nid)
 {
 }
-
-static inline int start_topology_update(void)
-{
-	return 0;
-}
-static inline int stop_topology_update(void)
-{
-	return 0;
-}
 #endif /* CONFIG_NUMA */
 
 #include <asm-generic/topology.h>
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 42aa7d1..0f50941 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -28,6 +28,7 @@
 #include <asm/smp.h>
 #include <asm/firmware.h>
 #include <asm/paca.h>
+#include <asm/hvcall.h>
 
 static int numa_enabled = 1;
 
@@ -1263,6 +1264,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
 #endif /* CONFIG_MEMORY_HOTPLUG */
 
 /* Vrtual Processor Home Node (VPHN) support */
+#ifdef CONFIG_SPLPAR
 #define VPHN_NR_CHANGE_CTRS (8)
 static u8 vphn_cpu_change_counts[NR_CPUS][VPHN_NR_CHANGE_CTRS];
 static cpumask_t cpu_associativity_changes_mask;
@@ -1505,3 +1507,4 @@ int stop_topology_update(void)
 	vphn_enabled = 0;
 	return del_timer_sync(&topology_timer);
 }
+#endif /* CONFIG_SPLPAR */
-- 
1.7.2.3

                 reply	other threads:[~2010-12-12 23:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101212235342.3583.29397.sendpatchset@manic8ball.ltc.austin.ibm.com \
    --to=jlarrew@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkessler@us.ibm.com \
    --cc=markn@au1.ibm.com \
    --cc=mjwolf@us.ibm.com \
    --cc=tbreeds@au1.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox