From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: benh@au1.ibm.com, anton@au1.ibm.com, paulus@au1.ibm.com,
akpm@linux-foundation.org
Subject: [PATCH RFC] powerpc: Fixes to allow pseries to build for HOTPLUG_CPU=n
Date: Sat, 27 Feb 2010 23:29:25 -0800 [thread overview]
Message-ID: <20100228072925.GA26097@linux.vnet.ibm.com> (raw)
Building for a pseries machine with HOTPLUG_CPU=n on 2.6.33 gives the
following build errors:
arch/powerpc/platforms/built-in.o: In function `.smp_xics_setup_cpu':
smp.c:(.devinit.text+0x8c): undefined reference to `.set_cpu_current_state'
smp.c:(.devinit.text+0x98): undefined reference to `.set_default_offline_state'
arch/powerpc/platforms/built-in.o: In function `.smp_pSeries_kick_cpu':
smp.c:(.devinit.text+0x13c): undefined reference to `.get_cpu_current_state'
smp.c:(.devinit.text+0x1c4): undefined reference to `.set_preferred_offline_state'
smp.c:(.devinit.text+0x1d0): undefined reference to `.get_cpu_current_state'
This patch fixes this by providing empty (or nearly empty) functions for
the HOTPLUG_CPU=n case. Passes moderate rcutorture testing.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
offline_states.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/offline_states.h b/arch/powerpc/platforms/pseries/offline_states.h
index 22574e0..195f9c7 100644
--- a/arch/powerpc/platforms/pseries/offline_states.h
+++ b/arch/powerpc/platforms/pseries/offline_states.h
@@ -9,10 +9,40 @@ enum cpu_state_vals {
CPU_MAX_OFFLINE_STATES
};
+#ifdef CONFIG_HOTPLUG_CPU
+
extern enum cpu_state_vals get_cpu_current_state(int cpu);
extern void set_cpu_current_state(int cpu, enum cpu_state_vals state);
extern enum cpu_state_vals get_preferred_offline_state(int cpu);
extern void set_preferred_offline_state(int cpu, enum cpu_state_vals state);
extern void set_default_offline_state(int cpu);
+
+#else /* #ifdef CONFIG_HOTPLUG_CPU */
+
+static inline enum cpu_state_vals get_cpu_current_state(int cpu)
+{
+ return cpu_online(cpu) ? CPU_STATE_ONLINE : CPU_STATE_OFFLINE;
+}
+
+static inline void set_cpu_current_state(int cpu, enum cpu_state_vals state)
+{
+}
+
+static inline enum cpu_state_vals get_preferred_offline_state(int cpu)
+{
+ return CPU_STATE_OFFLINE;
+}
+
+static inline void set_preferred_offline_state(int cpu,
+ enum cpu_state_vals state)
+{
+}
+
+static inline void set_default_offline_state(int cpu)
+{
+}
+
+#endif /* #else #ifdef CONFIG_HOTPLUG_CPU */
+
extern int start_secondary(void);
#endif
reply other threads:[~2010-02-28 7:29 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=20100228072925.GA26097@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anton@au1.ibm.com \
--cc=benh@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.