From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750835AbdGCECF (ORCPT ); Mon, 3 Jul 2017 00:02:05 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35694 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750727AbdGCECD (ORCPT ); Mon, 3 Jul 2017 00:02:03 -0400 From: Joel Stanley To: Michael Ellerman , "Gautham R . Shenoy" Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] powerpc/powernv/idle: Put pnv_cpu_offline behind HOTPLUG_CPU Date: Mon, 3 Jul 2017 13:31:52 +0930 Message-Id: <20170703040152.5144-1-joel@jms.id.au> X-Mailer: git-send-email 2.13.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: # 4.12 Signed-off-by: Joel Stanley --- 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