From patchwork Tue Feb 20 15:05:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128910 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4735935ljc; Tue, 20 Feb 2018 07:06:06 -0800 (PST) X-Google-Smtp-Source: AH8x226sUbry8gXM+oDO+e+mx/E2D5OTOSjGbvpK6E5aJBJy0+3WNfVKtrG7rmpxmHVROWXDc/1n X-Received: by 10.99.158.84 with SMTP id r20mr14906915pgo.296.1519139166580; Tue, 20 Feb 2018 07:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519139166; cv=none; d=google.com; s=arc-20160816; b=x+e1AuAnAEFlbIHqRhbJSpslH/wP+amReOTlvy7iIB3of8oIEvwDNjTbQS2VPkM7mg YwyRWWZTW7uLTdMcbQ2/WwxR2IYSrZGbGABJDUT/Qb3J8LiYAk8srR8L7PCHEHnDXt0L KlNbiK0hUuCXq8ZoT/ZC7x69Vpp9DSP6D3sCgm94w9g0uqD+sJW4btIH2AkVFbHq7Ieg 1uQIls+aF8vzd9aS3bVPa6MHR20pOF+qNVpvVE3okqiTnVB74m5r6/HnGD81cBsuHA8h 600Juw4YQhoKtbcSZUAoFP3Iyd/rWT69j/3wI8AbabQbEG9doT/zAsTD0Jdgn4iGtpye kK1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=EjZQribI6pV7J84A2zvajb3Ckd2zi7lhNHi8jT0fais=; b=yTcBk0+3+PEi61by262F44NO2XjcMZ6PXJLryjo8BLKqquF+E0VqDlvXQ2qGeSk+Wd b+FTdXkpnathr4TIafoVwfvccNpE7NBRr83QnFAmCoChhefYIclfuRlpptE8anFF4odi frzn50XR3epbXUT4+mTkEObwLEc/mmMRFLq6TFJXRWSTqWvi/3dWMCnVeUhgF3VgDj8X IhzSDEh3xOdTfPkds/VFZiBlhLN1jSKukM4YV0ZpxNieOeF+ZXVf6NqlV/dln4b3MNl/ 9CgSndRHFwXmVy+j+7D6fdFiTtkJo4m1aIb0cXuvJlU5fXIOdKq0Ow+Vhcwj+FBOqc+L zT0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r76si7623275pfa.66.2018.02.20.07.06.06; Tue, 20 Feb 2018 07:06:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752222AbeBTPGF (ORCPT + 11 others); Tue, 20 Feb 2018 10:06:05 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:37621 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752220AbeBTPGE (ORCPT ); Tue, 20 Feb 2018 10:06:04 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MgNde-1f9eso3OXG-00NkSS; Tue, 20 Feb 2018 16:06:00 +0100 From: Arnd Bergmann To: "Rafael J. Wysocki" , Daniel Lezcano Cc: Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpuidle: stub out cpuidle_poll_state_init() without CONFIG_CPU_IDLE Date: Tue, 20 Feb 2018 16:05:44 +0100 Message-Id: <20180220150559.3182304-1-arnd@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/MTCUz2suQOJo6rvw3aA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Calling cpuidle_poll_state_init() from apm_init() results in a link failure since that directory is never entered without CONFIG_CPU_IDLE: arch/x86/kernel/apm_32.o: In function `apm_init': apm_32.c:(.init.text+0x62c): undefined reference to `cpuidle_poll_state_init' CONFIG_ARCH_HAS_CPU_RELAX can be set without CONFIG_CPU_IDLE but has no effect then, so we should treat that configuration the same as if CONFIG_ARCH_HAS_CPU_RELAX was not set at all. Fixes: 34c2f65b718d ("cpuidle: Move polling state initialization code to separate file") Signed-off-by: Arnd Bergmann --- include/linux/cpuidle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 871f9e21810c..0b3fc229086c 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -225,7 +225,7 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, } #endif -#ifdef CONFIG_ARCH_HAS_CPU_RELAX +#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX) void cpuidle_poll_state_init(struct cpuidle_driver *drv); #else static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}