Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3498589imd; Mon, 29 Oct 2018 08:03:09 -0700 (PDT) X-Google-Smtp-Source: AJdET5fmdLxAx5g3+BTBmIAqdeXiBgPBcwsOqGU68vRKjZuICOtsYOzl2/TxmqQKrYXeXvL5ge8q X-Received: by 2002:a17:902:1681:: with SMTP id h1-v6mr3528095plh.88.1540825388836; Mon, 29 Oct 2018 08:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540825388; cv=none; d=google.com; s=arc-20160816; b=S5g4EGHrpAhISKLxfBG0P1GXQurak5CMYQ8Aj1O6/qmWxcOPDOYVunFxe6tzhBpa70 jaYcehG1+afsj0Sc58hlKM/fjmLUbL/HQxJgyHnrH05B5X6yeWm7QkCF+MWRkeNopk68 HjuESgLJRH5HqC2WqapQG37tDkqS1V4KZNVZR6s5EjXpwq6uTUJGF8lyCNshOSsb7kfW MajAHv/DXWbE2VjGbjcaI18xaFq/I7Aw9JyFLvtqjSCmlo1t6IB1BRqkbTt7gYMP9U77 beWWVgBvBxpTo735l9LRcKdE4cBz1HHRm3mpNRsHsh/5jBs+/Hxk07rTM91m6LpL1Sl5 WIew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=voA5PavNJS0jeCJZKr04s6j2bmqiIxouMt1jYlc7kkk=; b=phx5UmpxC/j0CZFUS5LibmdU3pMAzVczkQfPww+aLDp0ItWBr1oHAAbIKW3wn/cJOl R3i40WjWeDuauJz8hzc+AhOsI+g4m5v3MIM7TH997qECHAWoBWQdLqRAamYilRoK5mu+ BQQw/zX5ARr5c8O2cNfwjspFWHuuN5T8HnfMbUSzXRbFxa0PQA3Zk0gSPLbCfxja5sXU ND3++U0JThcaaKTyjh7D4/QG0jQgD2IcorgSy8w6LZkT4m5s5GP6RBpxpLYa6ElqU5jK 5Phe6DmOl/GqWAqu+d5JMmDbIPwrFatYgWs7BM5kiEDfNKZOcJASoSqfvM3/XIOl2OFq OZTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 f6-v6si20962959pgg.182.2018.10.29.08.02.42; Mon, 29 Oct 2018 08:03:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727456AbeJ2Xua (ORCPT + 99 others); Mon, 29 Oct 2018 19:50:30 -0400 Received: from isilmar-4.linta.de ([136.243.71.142]:49994 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727381AbeJ2Xua (ORCPT ); Mon, 29 Oct 2018 19:50:30 -0400 Received: by isilmar-4.linta.de (Postfix, from userid 1000) id 67AAB200910; Mon, 29 Oct 2018 15:01:28 +0000 (UTC) Date: Mon, 29 Oct 2018 16:01:28 +0100 From: Dominik Brodowski To: Thomas-Mich Richter Cc: Linux Kernel Mailing List , Martin Schwidefsky , Heiko Carstens , rjw@rjwysocki.net Subject: Re: Linux 4.19.0 Build Error when CONFIG_ACPI not set. Message-ID: <20181029150128.wbjtyfxwxxb7ckg4@isilmar-4.linta.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 29, 2018 at 11:53:38AM +0100, Thomas-Mich Richter wrote: > When I compile the 4.19.0 Linux kernel, I get this build error: > > [root@f28 linux]# fgrep -r CONFIG_ACPI .config > # CONFIG_ACPI is not set > [root@f28 linux]# > > [root@f28 linux]# make > CALL scripts/checksyscalls.sh > DESCEND objtool > CHK include/generated/compile.h > CC drivers/cpufreq/intel_pstate.o > drivers/cpufreq/intel_pstate.c: In function ‘show_base_frequency’: > drivers/cpufreq/intel_pstate.c:726:10: error: implicit declaration of > function ‘intel_pstate_get_cppc_guranteed’; > did you mean ‘intel_pstate_get_epp’? > [-Werror=implicit-function-declaration] > ratio = intel_pstate_get_cppc_guranteed(policy->cpu); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > intel_pstate_get_epp > cc1: some warnings being treated as errors > make[2]: *** [scripts/Makefile.build:306: drivers/cpufreq/intel_pstate.o] > Error 1 > make[1]: *** [scripts/Makefile.build:546: drivers/cpufreq] Error 2 > make: *** [Makefile:1052: drivers] Error 2 > [root@f28 linux]# > > I am building on a virtual machine. > > This was introduced with > commit 86d333a8cc7f ("cpufreq: intel_pstate: Add base_frequency attribute") > > The function intel_pstate_get_cppc_guranteed() is called but the function > definition is within #ifdef CONFIG_ACPI/#endif conditional compile. > > Any ideas how to fix this? This isn't in 4.19.0, but in current mainline, and can be fixed by this patch which is already on its way upstream. https://patchwork.kernel.org/patch/10653593/ Thanks, Dominik ---- Date: Tue, 23 Oct 2018 21:54:03 +0200 From: Dominik Brodowski Subject: [PATCH v2] cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI While at it, add a few comments which config options #ifdef and #else statements refer to. Fixes: 86d333a8cc7f ("cpufreq: intel_pstate: Add base_frequency attribute") Cc: Srinivas Pandruvada Cc: Rafael J. Wysocki Signed-off-by: Dominik Brodowski diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 49c0abf2d48f..9578312e43f2 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -386,16 +386,11 @@ static int intel_pstate_get_cppc_guranteed(int cpu) return cppc_perf.guaranteed_perf; } -#else +#else /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_set_itmt_prio(int cpu) { } - -static int intel_pstate_get_cppc_guranteed(int cpu) -{ - return -ENOTSUPP; -} -#endif +#endif /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy) { @@ -477,7 +472,7 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy) acpi_processor_unregister_performance(policy->cpu); } -#else +#else /* CONFIG_ACPI */ static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy) { } @@ -490,7 +485,14 @@ static inline bool intel_pstate_acpi_pm_profile_server(void) { return false; } -#endif +#endif /* CONFIG_ACPI */ + +#ifndef CONFIG_ACPI_CPPC_LIB +static int intel_pstate_get_cppc_guranteed(int cpu) +{ + return -ENOTSUPP; +} +#endif /* CONFIG_ACPI_CPPC_LIB */ static inline void update_turbo_state(void) {