]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ACPI: introduce module parameter acpi.aml_debug_output
authorZhang Rui <rui.zhang@intel.com>
Thu, 15 Jul 2010 02:46:17 +0000 (10:46 +0800)
committerLen Brown <len.brown@intel.com>
Sun, 15 Aug 2010 03:02:14 +0000 (23:02 -0400)
Introduce module parameter acpi.aml_debug_output.

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

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

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Documentation/acpi/method-customizing.txt
drivers/acpi/acpica/acglobal.h
drivers/acpi/debugfs.c
include/acpi/acpixf.h

index e628cd23ca8093315b6d3e31ccd4d0e3204df17d..3e1d25aee3fb2037b34af127214a1652691fa2f2 100644 (file)
@@ -19,6 +19,8 @@ Note: Only ACPI METHOD can be overridden, any other object types like
       "Device", "OperationRegion", are not recognized.
 Note: The same ACPI control method can be overridden for many times,
       and it's always the latest one that used by Linux/kernel.
+Note: To get the ACPI debug object output (Store (AAAA, Debug)),
+      please run "echo 1 > /sys/module/acpi/parameters/aml_debug_output".
 
 1. override an existing method
    a) get the ACPI table via ACPI sysfs I/F. e.g. to get the DSDT,
index 899d68afc3c5e0bde9be08338ec14399e52c7d32..92122292ef1f60eddc5d70f3814137681ff58153 100644 (file)
@@ -115,7 +115,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
 /*
  * 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 abfcf9f6e766be1ac97594f5059c23b09f6c6c9d..7de27d49c4b9fca8fe773e2444ba8e240417585d 100644 (file)
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
 ACPI_MODULE_NAME("debugfs");
 
+
+/* /sys/modules/acpi/parameters/aml_debug_output */
+
+module_param_named(aml_debug_output, acpi_gbl_enable_aml_debug_object,
+                  bool, 0644);
+MODULE_PARM_DESC(aml_debug_output,
+                "To enable/disable the ACPI Debug Object output.");
+
 /* /sys/kernel/debug/acpi/custom_method */
 
 static ssize_t cm_write(struct file *file, const char __user * user_buf,
index 1371cc997393a83224beb5ff8809e0a22e968b67..a6ea2ac40b9cdfe21be9a7a7a849b3fdbaa32db5 100644 (file)
@@ -67,7 +67,7 @@ extern u8 acpi_gbl_leave_wake_gpes_disabled;
 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 u8 acpi_gbl_truncate_io_addresses;