[PATCH 5/5] ACPI: introduce module parameter acpi.aml_debug

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

 



Introduce module parameter acpi.aml_debug.

With acpi.aml_debug set, we can get AML debug object
output (Store (AAA, Debug)), even with CONFIG_ACPI_DEBUG
cleared.

Together with the runtime custom method,
we can debug AML code problems without rebuilding the kernel.

Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
---
 drivers/acpi/acpica/acglobal.h |    2 +-
 drivers/acpi/sysfs.c           |    4 ++++
 include/acpi/acpixf.h          |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/acpi/sysfs.c
===================================================================
--- linux-2.6.orig/drivers/acpi/sysfs.c
+++ linux-2.6/drivers/acpi/sysfs.c
@@ -219,6 +219,10 @@ static int param_get_acpica_version(char
 
 module_param_call(acpica_version, NULL, param_get_acpica_version, NULL, 0444);
 
+/* /sys/module/acpi/parameters/aml_debug */
+
+module_param_named(aml_debug, acpi_gbl_enable_aml_debug_object, uint, 0644);
+
 /* /sys/firmware/acpi/tables/ */
 static LIST_HEAD(acpi_table_attr_list);
 static struct kobject *tables_kobj;
Index: linux-2.6/drivers/acpi/acpica/acglobal.h
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/acglobal.h
+++ linux-2.6/drivers/acpi/acpica/acglobal.h
@@ -115,7 +115,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default
 /*
  * Optionally enable output from the AML Debug Object.
  */
-u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
+u32 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
 
 /*
  * Optionally copy the entire DSDT to local memory (instead of simply
Index: linux-2.6/include/acpi/acpixf.h
===================================================================
--- linux-2.6.orig/include/acpi/acpixf.h
+++ linux-2.6/include/acpi/acpixf.h
@@ -67,7 +67,7 @@ extern u8 acpi_gbl_leave_wake_gpes_disab
 extern u8 acpi_gbl_use_default_register_widths;
 extern acpi_name acpi_gbl_trace_method_name;
 extern u32 acpi_gbl_trace_flags;
-extern u8 acpi_gbl_enable_aml_debug_object;
+extern u32 acpi_gbl_enable_aml_debug_object;
 extern u8 acpi_gbl_copy_dsdt_locally;
 
 extern u32 acpi_current_gpe_count;


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux