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

[Xen-devel] [PATCH 1/3] x86: Drop CONFIG_ACPI_SLEEP



This option is hardcoded to 1, and the #ifdef-ary doesn't exclude wakeup.S,
which makes it useless code noise.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>

An alternative would be to wire it into Kconfig properly and properly exclude
wakeup.S, but that is more complicated than I have time for.  Thoughts?
---
 xen/arch/x86/acpi/boot.c     | 4 ----
 xen/arch/x86/dmi_scan.c      | 7 ++-----
 xen/include/asm-x86/acpi.h   | 4 ----
 xen/include/asm-x86/config.h | 1 -
 4 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 1382b4dcd0..15542a9bdf 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -332,7 +332,6 @@ static int __init acpi_invalidate_bgrt(struct 
acpi_table_header *table)
        return 0;
 }
 
-#ifdef CONFIG_ACPI_SLEEP
 #define acpi_fadt_copy_address(dst, src, len) do {                     \
        if (fadt->header.revision >= FADT2_REVISION_ID &&               \
            fadt->header.length >= ACPI_FADT_V2_SIZE)                   \
@@ -457,7 +456,6 @@ acpi_fadt_parse_sleep_info(struct acpi_table_fadt *fadt)
        memset(&acpi_sinfo.sleep_status + 1, 0,
               (long)(&acpi_sinfo + 1) - (long)(&acpi_sinfo.sleep_status + 1));
 }
-#endif
 
 static int __init acpi_parse_fadt(struct acpi_table_header *table)
 {
@@ -501,9 +499,7 @@ static int __init acpi_parse_fadt(struct acpi_table_header 
*table)
        acpi_enable_value  = fadt->acpi_enable;
        acpi_disable_value = fadt->acpi_disable;
 
-#ifdef CONFIG_ACPI_SLEEP
        acpi_fadt_parse_sleep_info(fadt);
-#endif
 
        return 0;
 }
diff --git a/xen/arch/x86/dmi_scan.c b/xen/arch/x86/dmi_scan.c
index 31caad133e..7063c2c799 100644
--- a/xen/arch/x86/dmi_scan.c
+++ b/xen/arch/x86/dmi_scan.c
@@ -488,14 +488,12 @@ static int __init ich10_bios_quirk(struct dmi_system_id 
*d)
     return 0;
 }
 
-#ifdef CONFIG_ACPI_SLEEP
 static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
 {
-       /* See acpi_wakeup.S */
+       /* See wakeup.S */
        acpi_video_flags |= 2;
        return 0;
 }
-#endif
 
 static __init int dmi_disable_acpi(struct dmi_blacklist *d) 
 { 
@@ -541,12 +539,11 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
                        MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
                        NO_MATCH, NO_MATCH, NO_MATCH
                        } },
-#ifdef CONFIG_ACPI_SLEEP
+
        { reset_videomode_after_s3, "Toshiba Satellite 4030cdt", { /* Reset 
video mode after returning from ACPI S3 sleep */
                        MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
                        NO_MATCH, NO_MATCH, NO_MATCH
                        } },
-#endif
 
        { ich10_bios_quirk, "Intel board & BIOS",
                /*
diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h
index a105d1186c..7032f3a001 100644
--- a/xen/include/asm-x86/acpi.h
+++ b/xen/include/asm-x86/acpi.h
@@ -105,8 +105,6 @@ extern s8 acpi_numa;
 extern int acpi_scan_nodes(u64 start, u64 end);
 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
 
-#ifdef CONFIG_ACPI_SLEEP
-
 extern struct acpi_sleep_info acpi_sinfo;
 #define acpi_video_flags bootsym(video_flags)
 struct xenpf_enter_acpi_sleep;
@@ -134,8 +132,6 @@ struct acpi_sleep_info {
     bool_t sleep_extended;
 };
 
-#endif /* CONFIG_ACPI_SLEEP */
-
 #define MAX_MADT_ENTRIES       MAX(256, 2 * NR_CPUS)
 extern u32 x86_acpiid_to_apicid[];
 #define MAX_LOCAL_APIC         MAX(256, 4 * NR_CPUS)
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 9ef9d03ca7..6e4f28d934 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -34,7 +34,6 @@
 /* Intel P4 currently has largest cache line (L2 line size is 128 bytes). */
 #define CONFIG_X86_L1_CACHE_SHIFT 7
 
-#define CONFIG_ACPI_SLEEP 1
 #define CONFIG_ACPI_NUMA 1
 #define CONFIG_ACPI_SRAT 1
 #define CONFIG_ACPI_CSTATE 1
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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