mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yinghai.lu@amd.com>
To: "Andrew Morton" <akpm@linux-foundation.org>,
	"Andi Kleen" <ak@suse.de>, "Len Brown" <lenb@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] x86_64/acpi: make kernel to be compiled when CONFIG_ACPI_NUMA is set and power management with acpi is not enabled
Date: Tue, 3 Apr 2007 20:55:04 -0700	[thread overview]
Message-ID: <86802c440704032055q43691a64v9eefb2a625c095ed@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 27 bytes --]

please check the patch

YH

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: acpi_power_system.patch --]
[-- Type: text/x-patch; name=acpi_power_system.patch;  charset=ANSI_X3.4-1968, Size: 3240 bytes --]

[PATCH] x86_64/acpi: make kernel to be compiled when  CONFIG_ACPI_NUMA is set and power management with acpi is not enabled

when CONFIG_ACPI_NUMA is set, and power management with acpi is not used. the kernel can not be compiled.

drivers/acpi/bus.c: In function ‘acpi_bus_get_power’:
drivers/acpi/bus.c:160: warning: implicit declaration of function ‘acpi_power_get_inferred_state’
drivers/acpi/bus.c: In function ‘acpi_bus_set_power’:
drivers/acpi/bus.c:230: warning: implicit declaration of function ‘acpi_power_transition’
...

drivers/built-in.o: In function `acpi_bus_get_power':
: undefined reference to `acpi_power_get_inferred_state'
drivers/built-in.o: In function `acpi_bus_set_power':
: undefined reference to `acpi_power_transition'
drivers/built-in.o: In function `acpi_bus_set_power':
: undefined reference to `acpi_power_transition'
drivers/built-in.o: In function `acpi_bus_generate_event':

so use CONFIG_ACPI_POWER and CONFIG_ACPI_SYTEM to comment function about set/get power and event.

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com> 

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index dd49ea0..4d06885 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -121,6 +121,7 @@ int acpi_bus_get_status(struct acpi_device *device)
 
 EXPORT_SYMBOL(acpi_bus_get_status);
 
+#ifdef CONFIG_ACPI_POWER
 /* --------------------------------------------------------------------------
                                  Power Management
    -------------------------------------------------------------------------- */
@@ -269,7 +270,9 @@ int acpi_bus_set_power(acpi_handle handle, int state)
 }
 
 EXPORT_SYMBOL(acpi_bus_set_power);
+#endif
 
+#ifdef CONFIG_ACPI_SYSTEM
 /* --------------------------------------------------------------------------
                                 Event Management
    -------------------------------------------------------------------------- */
@@ -358,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
 }
 
 EXPORT_SYMBOL(acpi_bus_receive_event);
+#endif
 
 /* --------------------------------------------------------------------------
                              Notification Handling
diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index a064f36..c2a1ac9 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -255,7 +255,7 @@ static int acpi_pci_choose_state(struct pci_dev *pdev, pm_message_t state)
 
 	return -ENODEV;
 }
-
+#ifdef CONFIG_ACPI_POWER
 static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 {
 	acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
@@ -272,7 +272,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 		return -ENODEV;
 	return acpi_bus_set_power(handle, acpi_state);
 }
-
+#endif
 
 /* ACPI bus type */
 static int acpi_pci_find_device(struct device *dev, acpi_handle *handle)
@@ -321,7 +321,9 @@ static int __init acpi_pci_init(void)
 	if (ret)
 		return 0;
 	platform_pci_choose_state = acpi_pci_choose_state;
+#ifdef CONFIG_ACPI_POWER
 	platform_pci_set_power_state = acpi_pci_set_power_state;
+#endif
 	return 0;
 }
 arch_initcall(acpi_pci_init);

             reply	other threads:[~2007-04-04  3:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-04  3:55 Yinghai Lu [this message]
2007-04-04  4:02 ` Yinghai Lu
2007-04-06  1:16   ` Andrew Morton
2007-04-04 10:13 ` Andi Kleen
2007-04-04 17:43   ` Lu, Yinghai
2007-04-05 18:38     ` Lu, Yinghai
2007-04-10  8:32       ` Len Brown
2007-04-13 21:52         ` Lu, Yinghai
2007-04-25  1:42 Yinghai Lu

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=86802c440704032055q43691a64v9eefb2a625c095ed@mail.gmail.com \
    --to=yinghai.lu@amd.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®