* [PATCH] powerpc/powernv/idle: Put pnv_cpu_offline behind HOTPLUG_CPU
@ 2017-07-03 4:01 Joel Stanley
2017-07-10 10:52 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Joel Stanley @ 2017-07-03 4:01 UTC (permalink / raw)
To: Michael Ellerman, Gautham R . Shenoy; +Cc: linuxppc-dev, linux-kernel, stable
In commit 900612315788 ("powerpc/powernv/smp: Add busy-wait loop as fall back
for CPU-Hotplug") the idle code uses generic_check_cpu_restart(), but that
function is not available when CONFIG_HOTPLUG_CPU is disabled.
arch/powerpc/platforms/powernv/idle.c: In function ‘pnv_cpu_offline’:
arch/powerpc/platforms/powernv/idle.c:286:11: error: implicit declaration of
function ‘generic_check_cpu_restart’ [-Werror=implicit-function-declaration]
while (!generic_check_cpu_restart(cpu)) {
^~~~~~~~~~~~~~~~~~~~~~~~~
The callers of pnv_cpu_offline are behind CONFIG_HOTPLUG_CPU, so fix the build
error by putting this code behind the same gard.
Fixes: 900612315788 ("powerpc/powernv/smp: Add busy-wait loop as fall back for CPU-Hotplug").
Cc: <stable@vger.kernel.org> # 4.12
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
arch/powerpc/platforms/powernv/idle.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
index 445f30a2c5ef..b15d108db216 100644
--- a/arch/powerpc/platforms/powernv/idle.c
+++ b/arch/powerpc/platforms/powernv/idle.c
@@ -261,6 +261,8 @@ static u64 pnv_deepest_stop_psscr_val;
static u64 pnv_deepest_stop_psscr_mask;
static bool deepest_stop_found;
+#ifdef CONFIG_HOTPLUG_CPU
+
/*
* pnv_cpu_offline: A function that puts the CPU into the deepest
* available platform idle state on a CPU-Offline.
@@ -294,6 +296,8 @@ unsigned long pnv_cpu_offline(unsigned int cpu)
return srr1;
}
+#endif /* CONFIG_HOTPLUG_CPU */
+
/*
* Power ISA 3.0 idle initialization.
*
--
2.13.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/powernv/idle: Put pnv_cpu_offline behind HOTPLUG_CPU
2017-07-03 4:01 [PATCH] powerpc/powernv/idle: Put pnv_cpu_offline behind HOTPLUG_CPU Joel Stanley
@ 2017-07-10 10:52 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-07-10 10:52 UTC (permalink / raw)
To: Joel Stanley, Gautham R . Shenoy; +Cc: linuxppc-dev, linux-kernel, stable
Joel Stanley <joel@jms.id.au> writes:
> In commit 900612315788 ("powerpc/powernv/smp: Add busy-wait loop as fall back
> for CPU-Hotplug") the idle code uses generic_check_cpu_restart(), but that
> function is not available when CONFIG_HOTPLUG_CPU is disabled.
>
> arch/powerpc/platforms/powernv/idle.c: In function ‘pnv_cpu_offline’:
> arch/powerpc/platforms/powernv/idle.c:286:11: error: implicit declaration of
> function ‘generic_check_cpu_restart’ [-Werror=implicit-function-declaration]
> while (!generic_check_cpu_restart(cpu)) {
> ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> The callers of pnv_cpu_offline are behind CONFIG_HOTPLUG_CPU, so fix the build
> error by putting this code behind the same gard.
>
> Fixes: 900612315788 ("powerpc/powernv/smp: Add busy-wait loop as fall back for CPU-Hotplug").
> Cc: <stable@vger.kernel.org> # 4.12
> Signed-off-by: Joel Stanley <joel@jms.id.au>
This was fixed upstream in commit 67d204180886, but I forgot to tag it
for stable.
https://git.kernel.org/torvalds/c/67d204180886
I've just sent mail to stable asking for it to be backported to 4.12.
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-10 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03 4:01 [PATCH] powerpc/powernv/idle: Put pnv_cpu_offline behind HOTPLUG_CPU Joel Stanley
2017-07-10 10:52 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).