[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v8 10/28] build: convert HAS_ACPI use to Kconfig



Use the Kconfig generated CONFIG_HAS_ACPI defines in the code base.

CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/Rules.mk             | 1 -
 xen/arch/x86/Kconfig     | 1 +
 xen/arch/x86/Rules.mk    | 1 -
 xen/common/sysctl.c      | 2 +-
 xen/drivers/Kconfig      | 2 ++
 xen/drivers/Makefile     | 2 +-
 xen/drivers/acpi/Kconfig | 4 ++++
 7 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 xen/drivers/acpi/Kconfig

diff --git a/xen/Rules.mk b/xen/Rules.mk
index b12ad73..09783e7 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
-CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
 CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index c13ef29..5e6c6c9 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
        def_bool y
+       select HAS_ACPI
        select HAS_IOPORTS
        select HAS_NS16550
        select HAS_PASSTHROUGH
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 151ed25..166deb9 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -1,7 +1,6 @@
 ########################################
 # x86-specific definitions
 
-HAS_ACPI := y
 HAS_NUMA := y
 HAS_VGA  := y
 HAS_VIDEO  := y
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 47d115e..a3007b8 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -171,7 +171,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) 
u_sysctl)
         op->u.availheap.avail_bytes <<= PAGE_SHIFT;
         break;
 
-#ifdef HAS_ACPI
+#ifdef CONFIG_HAS_ACPI
     case XEN_SYSCTL_get_pmstat:
         ret = do_get_pm_info(&op->u.get_pmstat);
         break;
diff --git a/xen/drivers/Kconfig b/xen/drivers/Kconfig
index fe6fcca..eb01d47 100644
--- a/xen/drivers/Kconfig
+++ b/xen/drivers/Kconfig
@@ -1,5 +1,7 @@
 menu "Device Drivers"
 
+source "drivers/acpi/Kconfig"
+
 source "drivers/char/Kconfig"
 
 source "drivers/passthrough/Kconfig"
diff --git a/xen/drivers/Makefile b/xen/drivers/Makefile
index eb32d69..9f6c18b 100644
--- a/xen/drivers/Makefile
+++ b/xen/drivers/Makefile
@@ -2,5 +2,5 @@ subdir-y += char
 subdir-$(HAS_CPUFREQ) += cpufreq
 subdir-$(CONFIG_HAS_PCI) += pci
 subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough
-subdir-$(HAS_ACPI) += acpi
+subdir-$(CONFIG_HAS_ACPI) += acpi
 subdir-$(HAS_VIDEO) += video
diff --git a/xen/drivers/acpi/Kconfig b/xen/drivers/acpi/Kconfig
new file mode 100644
index 0000000..11ab5e4
--- /dev/null
+++ b/xen/drivers/acpi/Kconfig
@@ -0,0 +1,4 @@
+
+# Select HAS_ACPI if ACPI is supported
+config HAS_ACPI
+       bool
-- 
2.4.10


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.