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

[Xen-devel] [PATCH v2 37/41] arm : acpi add acpi parameter to enable/disable acpi



ACPI will be disabled by default. Define new
command line parameter "acpi" for enabling it.

Signed-off-by: Parth Dixit <parth.dixit@xxxxxxxxxx>
---
 xen/arch/arm/setup.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 1b2d74c..80364bb 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -58,6 +58,12 @@ static unsigned long opt_xenheap_megabytes __initdata;
 integer_param("xenheap_megabytes", opt_xenheap_megabytes);
 #endif
 
+#ifdef CONFIG_ACPI
+/* "acpi=force" : Enables acpi */
+static void parse_acpi_param(char *s);
+custom_param("acpi", parse_acpi_param);
+#endif
+
 static __used void init_done(void)
 {
     free_init_memory();
@@ -83,6 +89,25 @@ static const char * __initdata processor_implementers[] = {
     ['i'] = "Intel Corporation",
 };
 
+#ifdef CONFIG_ACPI
+static char __initdata acpi_param[10] = "";
+static void __init parse_acpi_param(char *s)
+{
+    /* Save the parameter so it can be propagated to domain0. */
+    safe_strcpy(acpi_param, s);
+
+    /* Interpret the parameter for use within Xen. */
+    if ( !parse_bool(s) )
+    {
+        disable_acpi();
+    }
+    else if ( !strcmp(s, "force") )
+    {
+        acpi_disabled = 0;
+    }
+}
+#endif
+
 static void __init processor_id(void)
 {
     const char *implementer = "Unknown";
@@ -731,6 +756,7 @@ void __init start_xen(unsigned long boot_phys_offset,
         + (fdt_paddr & ((1 << SECOND_SHIFT) - 1));
     fdt_size = boot_fdt_info(device_tree_flattened, fdt_paddr);
 
+    disable_acpi();
     cmdline = boot_fdt_cmdline(device_tree_flattened);
     printk("Command line: %s\n", cmdline);
     cmdline_parse(cmdline);
-- 
1.9.1


_______________________________________________
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®.