linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux 4.19.0 Build Error when CONFIG_ACPI not set.
@ 2018-10-29 10:53 Thomas-Mich Richter
  2018-10-29 15:01 ` Dominik Brodowski
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas-Mich Richter @ 2018-10-29 10:53 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Martin Schwidefsky, Heiko Carstens

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?
Thanks

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Linux 4.19.0 Build Error when CONFIG_ACPI not set.
  2018-10-29 10:53 Linux 4.19.0 Build Error when CONFIG_ACPI not set Thomas-Mich Richter
@ 2018-10-29 15:01 ` Dominik Brodowski
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Brodowski @ 2018-10-29 15:01 UTC (permalink / raw)
  To: Thomas-Mich Richter
  Cc: Linux Kernel Mailing List, Martin Schwidefsky, Heiko Carstens, rjw


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 <linux@dominikbrodowski.net>
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 <srinivas.pandruvada@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

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)
 {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-29 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 10:53 Linux 4.19.0 Build Error when CONFIG_ACPI not set Thomas-Mich Richter
2018-10-29 15:01 ` Dominik Brodowski

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).