lkml.org 
[lkml]   [2004]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] Re: 2.6.7-mm2 build errors...
On Fri, Jul 02, 2004 at 02:03:22PM -0700, Randy.Dunlap wrote:
> On Fri, 2 Jul 2004 22:51:29 +0200 Adrian Bunk wrote:
>
> | On Sat, Jun 26, 2004 at 12:39:39AM -0300, limaunion wrote:
> |
> | > LD .tmp_vmlinux1
> | > arch/i386/kernel/built-in.o(.text+0xbe14): In function `powernow_acpi_init':
> | > : undefined reference to `acpi_processor_register_performance'
> | > arch/i386/kernel/built-in.o(.text+0xbe3b): In function `powernow_acpi_init':
> | > : undefined reference to `acpi_processor_unregister_performance'
> | > arch/i386/kernel/built-in.o(.exit.text+0x3b): In function `powernow_exit':
> | > : undefined reference to `acpi_processor_unregister_performance'
> | > make: *** [.tmp_vmlinux1] Error 1
> | >
> | > This also happens in 2.6.7-mm1, I'm wondering if this is my fault or
> | > something's wrong?
> |
> | It seems something is/was wrong.
> |
> | Can you still reproduce it in 2.6.7-mm5?
> | If yes, please send your .config.
>
> Same as this problem report:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=108752330915120&w=2
>
> but my patch was insufficient:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=108753512102539&w=2
>
> See reply from Dave Jones. And I see what he means, but I don't
> see how to express it in Kconfig language.

What about the patch below?

> ~Randy

cu
Adrian


Fix compile errors with X86_POWERNOW_K{7,8}=y and ACPI_PROCESSOR=m.

diffstat output:
arch/i386/kernel/cpu/cpufreq/Kconfig | 10 ++++++++++
arch/i386/kernel/cpu/cpufreq/powernow-k7.c | 10 +++++-----
arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 4 ++--
arch/i386/kernel/cpu/cpufreq/powernow-k8.h | 2 +-
4 files changed, 18 insertions(+), 8 deletions(-)


Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

--- linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/Kconfig.old 2004-07-02 23:21:22.000000000 +0200
+++ linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/Kconfig 2004-07-02 23:39:15.000000000 +0200
@@ -88,6 +88,11 @@

If in doubt, say N.

+config X86_POWERNOW_K7_ACPI
+ bool
+ default y
+ depends on (X86_POWERNOW_K7=m && ACPI_PROCESSOR) || (X86_POWERNOW_K7=y && ACPI_PROCESSOR=y)
+
config X86_POWERNOW_K8
tristate "AMD Opteron/Athlon64 PowerNow!"
depends on CPU_FREQ && EXPERIMENTAL
@@ -98,6 +103,11 @@

If in doubt, say N.

+config X86_POWERNOW_K8_ACPI
+ bool
+ default y
+ depends on (X86_POWERNOW_K8=m && ACPI_PROCESSOR) || (X86_POWERNOW_K8=y && ACPI_PROCESSOR=y)
+
config X86_GX_SUSPMOD
tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation"
depends on CPU_FREQ
--- linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/powernow-k7.c.old 2004-07-02 23:25:47.000000000 +0200
+++ linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2004-07-02 23:37:05.000000000 +0200
@@ -29,7 +29,7 @@
#include <asm/io.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 <acpi/processor.h>
#endif
@@ -64,7 +64,7 @@
u8 numpstates;
};

-#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
+#ifdef CONFIG_X86_POWERNOW_K7_ACPI
union powernow_acpi_control_t {
struct {
unsigned long fid:5,
@@ -190,7 +190,7 @@
speed = powernow_table[j].frequency;

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)
powernow_table[j].frequency = CPUFREQ_ENTRY_INVALID;
#endif
@@ -294,7 +294,7 @@
}


-#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
+#ifdef CONFIG_X86_POWERNOW_K7_ACPI

struct acpi_processor_performance *acpi_processor_perf;

@@ -668,7 +668,7 @@

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) {
acpi_processor_unregister_performance(acpi_processor_perf, 0);
kfree(acpi_processor_perf);
--- linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.h.old 2004-07-02 23:33:50.000000000 +0200
+++ linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.h 2004-07-02 23:34:21.000000000 +0200
@@ -29,7 +29,7 @@
* frequency is in kHz */
struct cpufreq_frequency_table *powernow_table;

-#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
+#ifdef CONFIG_X86_POWERNOW_K8_ACPI
/* the acpi table needs to be kept. it's only available if ACPI was
* used to determine valid frequency/vid/fid states */
struct acpi_processor_performance acpi_data;
--- linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.c.old 2004-07-02 23:26:42.000000000 +0200
+++ linux-2.6.7-mm5-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2004-07-02 23:36:48.000000000 +0200
@@ -32,7 +32,7 @@
#include <asm/io.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 <acpi/processor.h>
#endif
@@ -664,7 +664,7 @@
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)
{
if (!data->acpi_data.state_count)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.999 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site