Commit 90e4d99d authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] fix CONFIG_ACPI_PROCESSOR="m", CONFIG_X86_POWERNOW_K{7,8}="y" build issue

Fix the build dependency between powernow-k{7,8} and acpi/processor.o by
adding a CONFIG_X86_POWERNOW_K{7,8}_ACPI bool, just like SPEEDSTEP_CENTRINO
does it. See http://forums.gentoo.org/viewtopic.php?t=186887 for a
bugreport.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent ee724e62
...@@ -88,6 +88,11 @@ config X86_POWERNOW_K7 ...@@ -88,6 +88,11 @@ config X86_POWERNOW_K7
If in doubt, say N. If in doubt, say N.
config X86_POWERNOW_K7_ACPI
bool
depends on ((X86_POWERNOW_K7 = "m" && ACPI_PROCESSOR) || (X86_POWERNOW_K7 = "y" && ACPI_PROCESSOR = "y"))
default y
config X86_POWERNOW_K8 config X86_POWERNOW_K8
tristate "AMD Opteron/Athlon64 PowerNow!" tristate "AMD Opteron/Athlon64 PowerNow!"
depends on CPU_FREQ && EXPERIMENTAL depends on CPU_FREQ && EXPERIMENTAL
...@@ -98,6 +103,11 @@ config X86_POWERNOW_K8 ...@@ -98,6 +103,11 @@ config X86_POWERNOW_K8
If in doubt, say N. If in doubt, say N.
config X86_POWERNOW_K8_ACPI
bool
depends on ((X86_POWERNOW_K8 = "m" && ACPI_PROCESSOR) || (X86_POWERNOW_K8 = "y" && ACPI_PROCESSOR = "y"))
default y
config X86_GX_SUSPMOD config X86_GX_SUSPMOD
tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation"
depends on CPU_FREQ depends on CPU_FREQ
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) #ifdef CONFIG_X86_POWERNOW_K7_ACPI
#include <linux/acpi.h> #include <linux/acpi.h>
#include <acpi/processor.h> #include <acpi/processor.h>
#endif #endif
...@@ -54,7 +54,7 @@ struct pst_s { ...@@ -54,7 +54,7 @@ struct pst_s {
u8 numpstates; u8 numpstates;
}; };
#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) #ifdef CONFIG_X86_POWERNOW_K7_ACPI
union powernow_acpi_control_t { union powernow_acpi_control_t {
struct { struct {
unsigned long fid:5, unsigned long fid:5,
...@@ -196,7 +196,7 @@ static int get_ranges (unsigned char *pst) ...@@ -196,7 +196,7 @@ static int get_ranges (unsigned char *pst)
speed = powernow_table[j].frequency; speed = powernow_table[j].frequency;
if ((fid_codes[fid] % 10)==5) { if ((fid_codes[fid] % 10)==5) {
#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) #ifdef CONFIG_X86_POWERNOW_K7_ACPI
if (have_a0 == 1) if (have_a0 == 1)
powernow_table[j].frequency = CPUFREQ_ENTRY_INVALID; powernow_table[j].frequency = CPUFREQ_ENTRY_INVALID;
#endif #endif
...@@ -300,7 +300,7 @@ static void change_speed (unsigned int index) ...@@ -300,7 +300,7 @@ static void change_speed (unsigned int index)
} }
#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) #ifdef CONFIG_X86_POWERNOW_K7_ACPI
struct acpi_processor_performance *acpi_processor_perf; struct acpi_processor_performance *acpi_processor_perf;
...@@ -674,7 +674,7 @@ static int __init powernow_init (void) ...@@ -674,7 +674,7 @@ static int __init powernow_init (void)
static void __exit powernow_exit (void) static void __exit powernow_exit (void)
{ {
#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) #ifdef CONFIG_X86_POWERNOW_K7_ACPI
if (acpi_processor_perf) { if (acpi_processor_perf) {
acpi_processor_unregister_performance(acpi_processor_perf, 0); acpi_processor_unregister_performance(acpi_processor_perf, 0);
kfree(acpi_processor_perf); kfree(acpi_processor_perf);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/delay.h> #include <asm/delay.h>
#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) #ifdef CONFIG_X86_POWERNOW_K8_ACPI
#include <linux/acpi.h> #include <linux/acpi.h>
#include <acpi/processor.h> #include <acpi/processor.h>
#endif #endif
...@@ -664,7 +664,7 @@ static int find_psb_table(struct powernow_k8_data *data) ...@@ -664,7 +664,7 @@ static int find_psb_table(struct powernow_k8_data *data)
return -ENODEV; return -ENODEV;
} }
#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) #ifdef CONFIG_X86_POWERNOW_K8_ACPI
static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index)
{ {
if (!data->acpi_data.state_count) if (!data->acpi_data.state_count)
......
...@@ -41,4 +41,9 @@ config X86_POWERNOW_K8 ...@@ -41,4 +41,9 @@ config X86_POWERNOW_K8
If in doubt, say N. If in doubt, say N.
config X86_POWERNOW_K8_ACPI
bool
depends on ((X86_POWERNOW_K8 = "m" && ACPI_PROCESSOR) || (X86_POWERNOW_K8 = "y" && ACPI_PROCESSOR = "y"))
default y
endmenu endmenu
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment