* Re: [PATCH 110/112] ACPI: update intrd DSDT override console messages @ 2008-02-07 11:06 Eric Piel 2008-02-07 18:44 ` Len Brown 0 siblings, 1 reply; 3+ messages in thread From: Eric Piel @ 2008-02-07 11:06 UTC (permalink / raw) To: Len Brown, linux-acpi (sorry for not keeping the message id, I'm not subscribed to linux-acpi) > From: Len Brown <len.brown@intel.com> > > also, address some checkpatch.pl violations > > Signed-off-by: Len Brown <len.brown@intel.com> > --- > drivers/acpi/osl.c | 33 ++++++++++++++++++--------------- > 1 files changed, 18 insertions(+), 15 deletions(-) : > > - printk(KERN_INFO PREFIX "Looking for DSDT in initramfs... "); > + printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT"); You need to also add a \n here. Otherwise in case of error it will look ugly ;-) See you, Eric ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 110/112] ACPI: update intrd DSDT override console messages 2008-02-07 11:06 [PATCH 110/112] ACPI: update intrd DSDT override console messages Eric Piel @ 2008-02-07 18:44 ` Len Brown 0 siblings, 0 replies; 3+ messages in thread From: Len Brown @ 2008-02-07 18:44 UTC (permalink / raw) To: Eric Piel; +Cc: linux-acpi On Thursday 07 February 2008 06:06, Eric Piel wrote: > (sorry for not keeping the message id, I'm not subscribed to linux-acpi) > > From: Len Brown <len.brown@intel.com> > > > > also, address some checkpatch.pl violations > > > > Signed-off-by: Len Brown <len.brown@intel.com> > > --- > > drivers/acpi/osl.c | 33 ++++++++++++++++++--------------- > > 1 files changed, 18 insertions(+), 15 deletions(-) > : > > > > - printk(KERN_INFO PREFIX "Looking for DSDT in initramfs... "); > > + printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT"); > You need to also add a \n here. Otherwise in case of error it will look > ugly ;-) got it. thanks, -len ^ permalink raw reply [flat|nested] 3+ messages in thread
* ACPI patches for 2.6.25-rc0 @ 2008-02-07 9:33 Len Brown 2008-02-07 9:33 ` [PATCH 001/112] ACPI: add control method tracing support Len Brown 0 siblings, 1 reply; 3+ messages in thread From: Len Brown @ 2008-02-07 9:33 UTC (permalink / raw) To: linux-acpi This is the ACPI patch queue for 2.6.25-rc0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 001/112] ACPI: add control method tracing support 2008-02-07 9:33 ACPI patches for 2.6.25-rc0 Len Brown @ 2008-02-07 9:33 ` Len Brown 2008-02-07 9:35 ` [PATCH 110/112] ACPI: update intrd DSDT override console messages Len Brown 0 siblings, 1 reply; 3+ messages in thread From: Len Brown @ 2008-02-07 9:33 UTC (permalink / raw) To: linux-acpi; +Cc: Zhang Rui, Len Brown From: Zhang Rui <rui.zhang@intel.com> Add debug tracing support during certain AML method execution. Four more module parameters are created under /sys/module/acpi/parameters/: trace_method_name: the AML method name that user wants to trace trace_debug_layer: the temporary debug_layer used when tracing the method. Using 0xffffffff by default if it is 0. trace_debug_level: the temporary debug_level used when tracing the method. Using 0x00ffffff by default if it is 0. trace_state: The status of the tracing feature. "enabled" means this feature is enabled and the AML method is traced every time it's executed. "1" means this feature is enabled and the AML method will only be traced during the next execution. "disabled" means this feature is disabled. Users can enable/disable this debug tracing feature by "echo string > /sys/module/acpi/parameters/trace_state". "string" should be one of "enable", "disable" and "1". http://bugzilla.kernel.org/show_bug.cgi?id=6629 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> --- drivers/acpi/debug.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 57 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c index bf513e0..6df564f 100644 --- a/drivers/acpi/debug.c +++ b/drivers/acpi/debug.c @@ -130,6 +130,63 @@ static int param_get_debug_level(char *buffer, struct kernel_param *kp) { module_param_call(debug_layer, param_set_uint, param_get_debug_layer, &acpi_dbg_layer, 0644); module_param_call(debug_level, param_set_uint, param_get_debug_level, &acpi_dbg_level, 0644); +static char trace_method_name[6]; +module_param_string(trace_method_name, trace_method_name, 6, 0644); +static unsigned int trace_debug_layer; +module_param(trace_debug_layer, uint, 0644); +static unsigned int trace_debug_level; +module_param(trace_debug_level, uint, 0644); + +static int param_set_trace_state(const char *val, struct kernel_param *kp) +{ + int result = 0; + + if (!strncmp(val, "enable", strlen("enable") - 1)) { + result = acpi_debug_trace(trace_method_name, trace_debug_level, + trace_debug_layer, 0); + if (result) + result = -EBUSY; + goto exit; + } + + if (!strncmp(val, "disable", strlen("disable") - 1)) { + int name = 0; + result = acpi_debug_trace((char *)&name, trace_debug_level, + trace_debug_layer, 0); + if (result) + result = -EBUSY; + goto exit; + } + + if (!strncmp(val, "1", 1)) { + result = acpi_debug_trace(trace_method_name, trace_debug_level, + trace_debug_layer, 1); + if (result) + result = -EBUSY; + goto exit; + } + + result = -EINVAL; +exit: + return result; +} + +static int param_get_trace_state(char *buffer, struct kernel_param *kp) +{ + if (!acpi_gbl_trace_method_name) + return sprintf(buffer, "disable"); + else { + if (acpi_gbl_trace_flags & 1) + return sprintf(buffer, "1"); + else + return sprintf(buffer, "enable"); + } + return 0; +} + +module_param_call(trace_state, param_set_trace_state, param_get_trace_state, + NULL, 0644); + /* -------------------------------------------------------------------------- FS Interface (/proc) -------------------------------------------------------------------------- */ -- 1.5.4.23.gef5b9 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 110/112] ACPI: update intrd DSDT override console messages 2008-02-07 9:33 ` [PATCH 001/112] ACPI: add control method tracing support Len Brown @ 2008-02-07 9:35 ` Len Brown 0 siblings, 0 replies; 3+ messages in thread From: Len Brown @ 2008-02-07 9:35 UTC (permalink / raw) To: linux-acpi; +Cc: Len Brown From: Len Brown <len.brown@intel.com> also, address some checkpatch.pl violations Signed-off-by: Len Brown <len.brown@intel.com> --- drivers/acpi/osl.c | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 2b41bdd..2a400e0 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -326,49 +326,50 @@ struct acpi_table_header *acpi_find_dsdt_initrd(void) struct kstat stat; char *ramfs_dsdt_name = "/DSDT.aml"; - printk(KERN_INFO PREFIX "Looking for DSDT in initramfs... "); + printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT"); /* * Never do this at home, only the user-space is allowed to open a file. - * The clean way would be to use the firmware loader. But this code must be run - * before there is any userspace available. So we need a static/init firmware - * infrastructure, which doesn't exist yet... + * The clean way would be to use the firmware loader. + * But this code must be run before there is any userspace available. + * A static/init firmware infrastructure doesn't exist yet... */ - if (vfs_stat(ramfs_dsdt_name, &stat) < 0) { - printk("not found.\n"); + if (vfs_stat(ramfs_dsdt_name, &stat) < 0) return ret; - } len = stat.size; /* check especially against empty files */ if (len <= 4) { - printk("error, file is too small: only %lu bytes.\n", len); + printk(KERN_ERR PREFIX "Failed: DSDT only %lu bytes.\n", len); return ret; } firmware_file = filp_open(ramfs_dsdt_name, O_RDONLY, 0); if (IS_ERR(firmware_file)) { - printk("error, could not open file %s.\n", ramfs_dsdt_name); + printk(KERN_ERR PREFIX "Failed to open %s.\n", ramfs_dsdt_name); return ret; } - dsdt_buffer = ACPI_ALLOCATE(len); + dsdt_buffer = kmalloc(len, GFP_ATOMIC); if (!dsdt_buffer) { - printk("error when allocating %lu bytes of memory.\n", len); + printk(KERN_ERR PREFIX "Failed to allocate %lu bytes.\n", len); goto err; } oldfs = get_fs(); set_fs(KERNEL_DS); - len2 = vfs_read(firmware_file, (char __user *)dsdt_buffer, len, &firmware_file->f_pos); + len2 = vfs_read(firmware_file, (char __user *)dsdt_buffer, len, + &firmware_file->f_pos); set_fs(oldfs); if (len2 < len) { - printk("error trying to read %lu bytes from %s.\n", len, ramfs_dsdt_name); + printk(KERN_ERR PREFIX "Failed to read %lu bytes from %s.\n", + len, ramfs_dsdt_name); ACPI_FREE(dsdt_buffer); goto err; } - printk("successfully read %lu bytes from %s.\n", len, ramfs_dsdt_name); + printk(KERN_INFO PREFIX "Found %lu byte DSDT in %s.\n", + len, ramfs_dsdt_name); ret = dsdt_buffer; err: filp_close(firmware_file, NULL); @@ -392,7 +393,9 @@ acpi_os_table_override(struct acpi_table_header * existing_table, #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD if ((strncmp(existing_table->signature, "DSDT", 4) == 0) && !acpi_no_initrd_override) { - struct acpi_table_header *initrd_table = acpi_find_dsdt_initrd(); + struct acpi_table_header *initrd_table; + + initrd_table = acpi_find_dsdt_initrd(); if (initrd_table) *new_table = initrd_table; } -- 1.5.4.23.gef5b9 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-07 18:44 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-02-07 11:06 [PATCH 110/112] ACPI: update intrd DSDT override console messages Eric Piel 2008-02-07 18:44 ` Len Brown -- strict thread matches above, loose matches on Subject: below -- 2008-02-07 9:33 ACPI patches for 2.6.25-rc0 Len Brown 2008-02-07 9:33 ` [PATCH 001/112] ACPI: add control method tracing support Len Brown 2008-02-07 9:35 ` [PATCH 110/112] ACPI: update intrd DSDT override console messages Len Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox