Re: sparc64 allmodconfig build failure...
From: Sven Wegener
Date: Tue Oct 14 2008 - 04:30:47 EST
On Mon, 13 Oct 2008, David Miller wrote:
> sparc64 allmodconfig started failing to build recently:
>
> MODPOST 1946 modules
> ERROR: "cpufreq_gov_performance" [arch/sparc64/kernel/us3_cpufreq.ko] undefined!
>
> It seems to be caused by the following commit:
>
> commit c4d14bc0bb5d13e316890651ae4518b764c3344c
> Author: Sven Wegener <sven.wegener@xxxxxxxxxxx>
> Date: Sat Sep 20 16:50:08 2008 +0200
>
> [CPUFREQ] Don't export governors for default governor
>
> We don't need to export the governors for use as the default governor,
> because the default governor will be built-in anyway and we can access
> the symbol directly.
Uhm, we could resolve this dependency with the patch below. Although we
might as well revert the above commit or introduce an exported function
that sets the default governor on a policy.
Subject: [CPUFREQ] Fix build failure on sparc64
Commit c4d14bc0bb5d13e316890651ae4518b764c3344c ("[CPUFREQ] Don't export
governors for default governor") caused a build failure, because there are
several architectures that have cpufreq code that can be built as a
module, but the code also requires access to the default governor. Export
the default governor so that it can be accessed by these module.
Reported-by: David Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Sven Wegener <sven.wegener@xxxxxxxxxxx>
---
drivers/cpufreq/cpufreq_conservative.c | 4 +++-
drivers/cpufreq/cpufreq_ondemand.c | 4 +++-
drivers/cpufreq/cpufreq_performance.c | 4 +++-
drivers/cpufreq/cpufreq_powersave.c | 4 +++-
drivers/cpufreq/cpufreq_userspace.c | 4 +++-
5 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index e265783..65297e3 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -576,7 +576,9 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
return 0;
}
-#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
+EXPORT_SYMBOL(cpufreq_gov_conservative);
+#else
static
#endif
struct cpufreq_governor cpufreq_gov_conservative = {
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 2ab3c12..78348b3 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -626,7 +626,9 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
return 0;
}
-#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
+EXPORT_SYMBOL(cpufreq_gov_ondemand);
+#else
static
#endif
struct cpufreq_governor cpufreq_gov_ondemand = {
diff --git a/drivers/cpufreq/cpufreq_performance.c b/drivers/cpufreq/cpufreq_performance.c
index 7e2e515..799bfd1 100644
--- a/drivers/cpufreq/cpufreq_performance.c
+++ b/drivers/cpufreq/cpufreq_performance.c
@@ -36,7 +36,9 @@ static int cpufreq_governor_performance(struct cpufreq_policy *policy,
return 0;
}
-#ifdef CONFIG_CPU_FREQ_GOV_PERFORMANCE_MODULE
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
+EXPORT_SYMBOL(cpufreq_gov_performance);
+#elif defined(CONFIG_CPU_FREQ_GOV_PERFORMANCE_MODULE)
static
#endif
struct cpufreq_governor cpufreq_gov_performance = {
diff --git a/drivers/cpufreq/cpufreq_powersave.c b/drivers/cpufreq/cpufreq_powersave.c
index e6db5fa..9db749d 100644
--- a/drivers/cpufreq/cpufreq_powersave.c
+++ b/drivers/cpufreq/cpufreq_powersave.c
@@ -35,7 +35,9 @@ static int cpufreq_governor_powersave(struct cpufreq_policy *policy,
return 0;
}
-#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
+EXPORT_SYMBOL(cpufreq_gov_powersave);
+#else
static
#endif
struct cpufreq_governor cpufreq_gov_powersave = {
diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c
index 1442bba..fb47b29 100644
--- a/drivers/cpufreq/cpufreq_userspace.c
+++ b/drivers/cpufreq/cpufreq_userspace.c
@@ -187,7 +187,9 @@ static int cpufreq_governor_userspace(struct cpufreq_policy *policy,
}
-#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
+EXPORT_SYMBOL(cpufreq_gov_userspace);
+#else
static
#endif
struct cpufreq_governor cpufreq_gov_userspace = {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/