linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: "Randy.Dunlap" <rddunlap@osdl.org>, Dave Jones <davej@codemonkey.org.uk>
Cc: limaunion@fibertel.com.ar, linux-kernel@vger.kernel.org,
	cpufreq@www.linux.org.uk, water modem <lundby@ameritech.net>
Subject: [patch] Re: 2.6.7-mm2 build errors...
Date: Fri, 2 Jul 2004 23:50:24 +0200	[thread overview]
Message-ID: <20040702215024.GL28324@fs.tum.de> (raw)
In-Reply-To: <20040702140322.2ab47867.rddunlap@osdl.org>

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)

  reply	other threads:[~2004-07-02 21:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-26  3:39 2.6.7-mm2 build errors limaunion
2004-07-02 20:51 ` Adrian Bunk
2004-07-02 21:03   ` Randy.Dunlap
2004-07-02 21:50     ` Adrian Bunk [this message]
2004-07-03 11:39       ` [patch] " Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040702215024.GL28324@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=cpufreq@www.linux.org.uk \
    --cc=davej@codemonkey.org.uk \
    --cc=limaunion@fibertel.com.ar \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lundby@ameritech.net \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).