ACPI & Power Management Patches for Linux-3.6-merge - part 1
Subsystems (14)
Len Brown
maintainerHere is my initial queue of patches for Linux 3.6. Please let me know if you see troubles with any of them.
thanks,
Len Brown, Intel Open Source Technology Center
Len Brown
maintainerPATCH 1/52 ACPICA: AML Parser: Fix two possible memory leaks in error path
From: Jesper Juhl <[email protected]>
Fixes a couple of memory leaks in the error recovery path.
--- drivers/acpi/acpica/psargs.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/acpica/psargs.c +2 -0
@@ -618,6 +618,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state arg =acpi_ps_alloc_op (AML_INT_BYTELIST_OP );if (!arg) { +acpi_ps_free_op (field);return_PTR (NULL ); }
@@ -662,6 +663,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state }else { arg =acpi_ps_alloc_op (AML_INT_NAMEPATH_OP );if (!arg) { +acpi_ps_free_op (field);return_PTR (NULL ); }
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 2/52 ACPICA: Object dump routines: Use common function for string output
In reply to Len BrownFrom: Bob Moore <[email protected]>
For ACPI string objects, always use the common string dump function, acpi_ut_print_string. This function surrounds the string with quotes and handles allowed escape sequences.
--- drivers/acpi/acpica/exdump.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/acpi/acpica/exdump.c +1 -3
@@ -926,9 +926,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,case ACPI_TYPE_STRING :acpi_os_printf ("[String] Value: " ); -for (i =0 ; i < obj_desc->string.length; i++) { -acpi_os_printf ("%c" , obj_desc->string.pointer[i]); - } +acpi_ut_print_string (obj_desc->string.pointer,ACPI_UINT8_MAX );acpi_os_printf ("\n" );break ;
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 3/52 ACPICA: Lint fixes for acpi_write, no functional changes
In reply to Len BrownFrom: Bob Moore <[email protected]>
acpi_write was widened to 64-bit data, this change eliminates some lint warnings.
--- drivers/acpi/acpica/hwesleep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/acpi/acpica/hwesleep.c +5 -4
@@ -117,7 +117,8 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags)/* Clear wake status (WAK_STS) */ - status =acpi_write (ACPI_X_WAKE_STATUS , &acpi_gbl_FADT.sleep_status); + status = +acpi_write ((u64 )ACPI_X_WAKE_STATUS , &acpi_gbl_FADT.sleep_status);if (ACPI_FAILURE (status)) {return_ACPI_STATUS (status); }
@@ -147,7 +148,7 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) ((acpi_gbl_sleep_type_a <<ACPI_X_SLEEP_TYPE_POSITION ) &ACPI_X_SLEEP_TYPE_MASK ); - status =acpi_write ((sleep_type_value |ACPI_X_SLEEP_ENABLE ), + status =acpi_write ((u64)(sleep_type_value |ACPI_X_SLEEP_ENABLE ), &acpi_gbl_FADT.sleep_control);if (ACPI_FAILURE (status)) {return_ACPI_STATUS (status);
@@ -195,7 +196,7 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) ((acpi_gbl_sleep_type_a <<ACPI_X_SLEEP_TYPE_POSITION ) &ACPI_X_SLEEP_TYPE_MASK ); - (void )acpi_write ((sleep_type_value |ACPI_X_SLEEP_ENABLE ), + (void )acpi_write ((u64)(sleep_type_value |ACPI_X_SLEEP_ENABLE ), &acpi_gbl_FADT.sleep_control); }
@@ -239,7 +240,7 @@ acpi_status acpi_hw_extended_wake(u8 sleep_state, u8 flags)* and use it to determine whether the system is rebooting or * resuming. Clear WAK_STS for compatibility. */ - (void )acpi_write (ACPI_X_WAKE_STATUS , &acpi_gbl_FADT.sleep_status); + (void )acpi_write ((u64 )ACPI_X_WAKE_STATUS , &acpi_gbl_FADT.sleep_status); acpi_gbl_system_awake_and_running = TRUE;acpi_hw_execute_sleep_method (METHOD_PATHNAME__SST ,ACPI_SST_WORKING );
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 4/52 ACPICA: Add support for multiple notify handlers
In reply to Len BrownFrom: Bob Moore <[email protected]>
This change adds support to allow multiple notify handlers on Device, ThermalZone, and Processor objects. Also re-worked and restructured the entire notify support code for handler installation, handler removal, notify event queuing, and notify dispatch to handler.
Extends and updates original commit 3f0be67("ACPI / ACPICA: Multiple system notify handlers per device") by Rafael Wysocki.
--- drivers/acpi/acpica/acglobal.h | 3 +- drivers/acpi/acpica/aclocal.h | 13 +- drivers/acpi/acpica/acobject.h | 9 +- drivers/acpi/acpica/evmisc.c | 185 +++++++---------- drivers/acpi/acpica/evxface.c | 440 ++++++++++++++--------------------------- drivers/acpi/acpica/exdump.c | 25 ++- drivers/acpi/acpica/utdelete.c | 24 ++- drivers/acpi/acpica/utglobal.c | 4 +- include/acpi/actypes.h | 4 + 9 files changed, 266 insertions(+), 441 deletions(-)
drivers/acpi/acpica/acglobal.h +1 -2
@@ -278,8 +278,7 @@ ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;/* Global handlers */ -ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify; -ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; +ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2]; ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; ACPI_EXTERN acpi_tbl_handler acpi_gbl_table_handler;
drivers/acpi/acpica/aclocal.h +11 -2
@@ -600,13 +600,22 @@ acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state,typedef acpi_status (*acpi_parse_upwards ) (struct acpi_walk_state * walk_state); +/* Global handlers for AML Notifies */ + +struct acpi_global_notify_handler { +acpi_notify_handler handler; +void *context; +}; +/* * Notify info - used to pass info to the deferred notify * handler/dispatcher. */ struct acpi_notify_info { - ACPI_STATE_COMMON struct acpi_namespace_node *node; -union acpi_operand_object *handler_obj; + ACPI_STATE_COMMON u8 handler_list_id; +struct acpi_namespace_node *node; +union acpi_operand_object *handler_list_head; +struct acpi_global_notify_handler *global; };/* Generic state is union of structs above */
drivers/acpi/acpica/acobject.h +4 -5
@@ -206,8 +206,7 @@ struct acpi_object_method {* Common fields for objects that support ASL notifications */ #define ACPI_COMMON_NOTIFY_INFO \ - union acpi_operand_object *system_notify;/* Handler for system notifies */ \ -union acpi_operand_object *device_notify;/* Handler for driver notifies */ \ + union acpi_operand_object *notify_list[2];/* Handlers for system/device notifies */ \union acpi_operand_object *handler;/* Handler for Address space */ struct acpi_object_notify_common {/* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
@@ -296,10 +295,10 @@ struct acpi_object_buffer_field {struct acpi_object_notify_handler { ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */ -u32 handler_type; -acpi_notify_handler handler; +u32 handler_type;/* Type: Device/System/Both */ +acpi_notify_handler handler;/* Handler address */ void *context; -struct acpi_object_notify_handler *next; +union acpi_operand_object *next[2 ];/* Device and System handler lists */ };struct acpi_object_addr_handler {
drivers/acpi/acpica/evmisc.c +67 -118
229 lines not on this page · raw message
drivers/acpi/acpica/evxface.c +145 -295
568 lines not on this page · raw message
drivers/acpi/acpica/exdump.c +15 -10
@@ -109,9 +109,9 @@ static struct acpi_exdump_info acpi_ex_dump_package[5] = {static struct acpi_exdump_info acpi_ex_dump_device[4 ] = { {ACPI_EXD_INIT ,ACPI_EXD_TABLE_SIZE (acpi_ex_dump_device),NULL }, {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (device.handler),"Handler" }, - {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (device.system_notify), + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (device.notify_list[0 ]),"System Notify" }, - {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (device.device_notify), + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (device.notify_list[1 ]),"Device Notify" } };
@@ -158,9 +158,9 @@ static struct acpi_exdump_info acpi_ex_dump_power[5] = { "System Level"}, {ACPI_EXD_UINT32 ,ACPI_EXD_OFFSET (power_resource.resource_order), "Resource Order"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.system_notify), + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[0]), "System Notify"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.device_notify), + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[1]), "Device Notify"} };
@@ -169,18 +169,18 @@ static struct acpi_exdump_info acpi_ex_dump_processor[7] = { {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.length), "Length"}, {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.system_notify), + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.notify_list[0]), "System Notify"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.device_notify), + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.notify_list[1]), "Device Notify"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.handler), "Handler"} };static struct acpi_exdump_info acpi_ex_dump_thermal[4 ] = { {ACPI_EXD_INIT ,ACPI_EXD_TABLE_SIZE (acpi_ex_dump_thermal),NULL }, - {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (thermal_zone.system_notify), + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (thermal_zone.notify_list[0 ]),"System Notify" }, - {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (thermal_zone.device_notify), + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (thermal_zone.notify_list[1 ]),"Device Notify" }, {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (thermal_zone.handler),"Handler" } };
@@ -241,10 +241,15 @@ static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = { {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} }; -static struct acpi_exdump_info acpi_ex_dump_notify[3 ] = { +static struct acpi_exdump_info acpi_ex_dump_notify[7 ] = { {ACPI_EXD_INIT ,ACPI_EXD_TABLE_SIZE (acpi_ex_dump_notify),NULL }, {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (notify.node),"Node" }, - {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (notify.context),"Context" } + {ACPI_EXD_UINT32 ,ACPI_EXD_OFFSET (notify.handler_type),"Handler Type" }, + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (notify.handler),"Handler" }, + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (notify.context),"Context" }, + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (notify.next[0 ]), +"Next System Notify" }, + {ACPI_EXD_POINTER ,ACPI_EXD_OFFSET (notify.next[1 ]),"Next Device Notify" } };/* Miscellaneous tables */
drivers/acpi/acpica/utdelete.c +17 -7
@@ -152,7 +152,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)case ACPI_TYPE_PROCESSOR :case ACPI_TYPE_THERMAL : -/* Walk the notify handler list for this object */ +/* Walk the address handler list for this object */ handler_desc = object->common_notify.handler;while (handler_desc) {
@@ -480,6 +480,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)acpi_status status =AE_OK ;union acpi_generic_state *state_list =NULL ;union acpi_operand_object *next_object =NULL ; +union acpi_operand_object *prev_object;union acpi_generic_state *state;u32 i;
@@ -505,12 +506,21 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)case ACPI_TYPE_POWER :case ACPI_TYPE_THERMAL : -/* Update the notify objects for these types (if present) */ - -acpi_ut_update_ref_count (object->common_notify. - system_notify, action); -acpi_ut_update_ref_count (object->common_notify. - device_notify, action); +/* +* Update the notify objects for these types (if present) +* Two lists, system and device notify handlers. +*/ +for (i =0 ; i <ACPI_NUM_NOTIFY_TYPES ; i++) { + prev_object = + object->common_notify.notify_list[i]; +while (prev_object) { + next_object = + prev_object->notify.next[i]; +acpi_ut_update_ref_count (prev_object, + action); + prev_object = next_object; + } + }break ;case ACPI_TYPE_PACKAGE :
drivers/acpi/acpica/utglobal.c +2 -2
@@ -304,8 +304,8 @@ acpi_status acpi_ut_init_globals(void)/* Global handlers */ - acpi_gbl_system_notify.handler =NULL ; - acpi_gbl_device_notify.handler =NULL ; + acpi_gbl_global_notify[0 ].handler =NULL ; + acpi_gbl_global_notify[1 ].handler =NULL ; acpi_gbl_exception_handler =NULL ; acpi_gbl_init_handler =NULL ; acpi_gbl_table_handler =NULL ;
include/acpi/actypes.h +4 -0
@@ -706,10 +706,14 @@ typedef u32 acpi_event_status;#define ACPI_DEVICE_NOTIFY 0x2#define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)#define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 +#define ACPI_NUM_NOTIFY_TYPES 2#define ACPI_MAX_SYS_NOTIFY 0x7F#define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF +#define ACPI_SYSTEM_HANDLER_LIST 0/* Used as index, must be SYSTEM_NOTIFY -1 */ +#define ACPI_DEVICE_HANDLER_LIST 1/* Used as index, must be DEVICE_NOTIFY -1 */ +/* Address Space (Operation Region) Types */ typedef u8 acpi_adr_space_type ;
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 5/52 ACPICA: Update to version 20120420
In reply to Len BrownFrom: Bob Moore <[email protected]>
Version 20120420.
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -47,7 +47,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20120320 +#define ACPI_CA_VERSION 0x20120420#include "acconfig.h" #include "actypes.h"
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 6/52 ACPICA: Disassembler: Add support for Operation Region externals
In reply to Len BrownFrom: Bob Moore <[email protected]>
Adds missing support for operation regions defined in another table, but referenced via a Field or BankField operator. Generate the correct External statement.
--- drivers/acpi/acpica/dsfield.c | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
drivers/acpi/acpica/dsfield.c +81 -0
@@ -53,11 +53,79 @@ACPI_MODULE_NAME ("dsfield" ) /* Local prototypes */ +#ifdef ACPI_ASL_COMPILER +#include "acdisasm.h" +static acpi_status +acpi_ds_create_external_region (acpi_status lookup_status, +union acpi_parse_object *op, +char *path, +struct acpi_walk_state *walk_state, +struct acpi_namespace_node **node); +#endif +static acpi_status acpi_ds_get_field_names (struct acpi_create_field_info *info,struct acpi_walk_state *walk_state,union acpi_parse_object *arg); +#ifdef ACPI_ASL_COMPILER +/******************************************************************************* +* +* FUNCTION: acpi_ds_create_external_region (i_aSL Disassembler only) +* +* PARAMETERS: lookup_status - Status from ns_lookup operation +* Op - Op containing the Field definition and args +* Path - Pathname of the region +* ` walk_state - Current method state +* Node - Where the new region node is returned +* +* RETURN: Status +* +* DESCRIPTION: Add region to the external list if NOT_FOUND. Create a new +* region node/object. +* +******************************************************************************/ + +static acpi_status +acpi_ds_create_external_region (acpi_status lookup_status, +union acpi_parse_object *op, +char *path, +struct acpi_walk_state *walk_state, +struct acpi_namespace_node **node) +{ +acpi_status status; +union acpi_operand_object *obj_desc; + +if (lookup_status !=AE_NOT_FOUND ) { +return (lookup_status); + } + +/* +* Table disassembly: +* operation_region not found. Generate an External for it, and +* insert the name into the namespace. +*/ +acpi_dm_add_to_external_list (op, path,ACPI_TYPE_REGION ,0 ); + status =acpi_ns_lookup (walk_state->scope_info, path,ACPI_TYPE_REGION , +ACPI_IMODE_LOAD_PASS1 ,ACPI_NS_SEARCH_PARENT , + walk_state, node); +if (ACPI_FAILURE (status)) { +return (status); + } + +/* Must create and install a region object for the new node */ + + obj_desc =acpi_ut_create_internal_object (ACPI_TYPE_REGION ); +if (!obj_desc) { +return (AE_NO_MEMORY ); + } + + obj_desc->region.node = *node; + status =acpi_ns_attach_object (*node, obj_desc,ACPI_TYPE_REGION ); +return (status); +} +#endif +/******************************************************************************* * * FUNCTION: acpi_ds_create_buffer_field
@@ -413,12 +481,19 @@ acpi_ds_create_field(union acpi_parse_object *op,/* First arg is the name of the parent op_region (must already exist) */ arg = op->common.value.arg; +if (!region_node) { status =acpi_ns_lookup (walk_state->scope_info, arg->common.value.name,ACPI_TYPE_REGION ,ACPI_IMODE_EXECUTE ,ACPI_NS_SEARCH_PARENT , walk_state, ®ion_node); +#ifdef ACPI_ASL_COMPILER + status =acpi_ds_create_external_region (status, arg, + arg->common.value.name, + walk_state, + ®ion_node); +#endif if (ACPI_FAILURE (status)) {ACPI_ERROR_NAMESPACE (arg->common.value.name, status);return_ACPI_STATUS (status);
@@ -591,6 +666,12 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, arg->common.value.name,ACPI_TYPE_REGION ,ACPI_IMODE_EXECUTE ,ACPI_NS_SEARCH_PARENT , walk_state, ®ion_node); +#ifdef ACPI_ASL_COMPILER + status =acpi_ds_create_external_region (status, arg, + arg->common.value.name, + walk_state, + ®ion_node); +#endif if (ACPI_FAILURE (status)) {ACPI_ERROR_NAMESPACE (arg->common.value.name, status);return_ACPI_STATUS (status);
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 7/52 ACPICA: ACPI 5/iASL: Add support for PCC keyword
In reply to Len BrownFrom: Bob Moore <[email protected]>
Adds support for the PCC keyword for the Register() resource descriptor macro.
--- include/acpi/actypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/acpi/actypes.h +2 -1
@@ -728,8 +728,9 @@ typedef u8 acpi_adr_space_type;#define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7#define ACPI_ADR_SPACE_GPIO (acpi_adr_space_type) 8#define ACPI_ADR_SPACE_GSBUS (acpi_adr_space_type) 9 +#define ACPI_ADR_SPACE_PLATFORM_COMM (acpi_adr_space_type) 10 -#define ACPI_NUM_PREDEFINED_REGIONS 10 +#define ACPI_NUM_PREDEFINED_REGIONS 11/* * Special Address Spaces
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 8/52 ACPICA: iASL: Improved pathname support
In reply to Len BrownFrom: Bob Moore <[email protected]>
For include files, merge the prefix pathname with the file pathname. Convert backslashes in all pathnames to forward slashes, for readability. Include file pathname changes affect both #include and Include() type operators.
--- drivers/acpi/acpica/acutils.h | 2 ++ drivers/acpi/acpica/utmisc.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+)
drivers/acpi/acpica/acutils.h +2 -0
@@ -460,6 +460,8 @@ acpi_ut_short_divide(u64 in_dividend,/* * utmisc */ +void ut_convert_backslashes (char *pathname); +const char *acpi_ut_validate_exception (acpi_status status);u8 acpi_ut_is_pci_root_bridge (char *id);
drivers/acpi/acpica/utmisc.c +29 -0
@@ -52,6 +52,34 @@ ACPI_MODULE_NAME("utmisc")/******************************************************************************* * +* FUNCTION: ut_convert_backslashes +* +* PARAMETERS: Pathname - File pathname string to be converted +* +* RETURN: Modifies the input Pathname +* +* DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within +* the entire input file pathname string. +* +******************************************************************************/ +void ut_convert_backslashes (char *pathname) +{ + +if (!pathname) { +return ; + } + +while (*pathname) { +if (*pathname =='\\' ) { + *pathname ='/' ; + } + + pathname++; + } +} + +/******************************************************************************* +* * FUNCTION: acpi_ut_validate_exception * * PARAMETERS: Status - The acpi_status code to be formatted
@@ -63,6 +91,7 @@ ACPI_MODULE_NAME("utmisc")* an ASCII string. * ******************************************************************************/ +const char *acpi_ut_validate_exception (acpi_status status) {u32 sub_status;
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 9/52 ACPICA: Remove argument of acpi_os_wait_events_complete
In reply to Len BrownFrom: Lin Ming <[email protected]>
Remove the unused argument of acpi_os_wait_events_complete.
--- drivers/acpi/acpica/evxface.c | 4 ++-- drivers/acpi/osl.c | 4 ++-- drivers/acpi/sleep.c | 2 +- include/acpi/acpiosxf.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/acpi/acpica/evxface.c +2 -2
@@ -251,7 +251,7 @@ acpi_remove_notify_handler(acpi_handle device, }/* Make sure all deferred tasks are completed */ -acpi_os_wait_events_complete (NULL ); +acpi_os_wait_events_complete (); status =acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE );if (ACPI_FAILURE (status)) {
@@ -699,7 +699,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,/* Make sure all deferred tasks are completed */ -acpi_os_wait_events_complete (NULL ); +acpi_os_wait_events_complete (); status =acpi_ut_acquire_mutex (ACPI_MTX_EVENTS );if (ACPI_FAILURE (status)) {
drivers/acpi/osl.c +2 -2
@@ -891,7 +891,7 @@ static void acpi_os_execute_deferred(struct work_struct *work) struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);if (dpc->wait) -acpi_os_wait_events_complete (NULL ); +acpi_os_wait_events_complete (); dpc->function (dpc->context);kfree (dpc);
@@ -987,7 +987,7 @@ acpi_status acpi_os_hotplug_execute(acpi_osd_exec_callback function,return __acpi_os_execute (0 , function, context,1 ); } -void acpi_os_wait_events_complete (void *context) +void acpi_os_wait_events_complete (void ) {flush_workqueue (kacpid_wq);flush_workqueue (kacpi_notify_wq);
drivers/acpi/sleep.c +1 -1
@@ -144,7 +144,7 @@ void __init acpi_old_suspend_ordering(void)static int acpi_pm_freeze (void ) {acpi_disable_all_gpes (); -acpi_os_wait_events_complete (NULL ); +acpi_os_wait_events_complete ();acpi_ec_block_transactions ();return 0 ; }
include/acpi/acpiosxf.h +1 -1
@@ -205,7 +205,7 @@ acpi_os_execute(acpi_execute_type type,acpi_status acpi_os_hotplug_execute (acpi_osd_exec_callback function,void *context); -void acpi_os_wait_events_complete (void *context); +void acpi_os_wait_events_complete (void );void acpi_os_sleep (u64 milliseconds);
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 10/52 ACPICA: Add FADT error message for GAS BitWidth overflow
In reply to Len BrownFrom: Bob Moore <[email protected]>
Error for possible overflow during conversion from 32-bit legacy register addresses to GAS format. The GAS struct contains a one-byte BitWidth field, meaning that the maximum length of a register is 255 bits. ACPICA BZ 953.
https://www.acpica.org/bugzilla/show_bug.cgi?id=953
--- drivers/acpi/acpica/tbfadt.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-)
drivers/acpi/acpica/tbfadt.c +25 -7
@@ -49,9 +49,10 @@ACPI_MODULE_NAME ("tbfadt" ) /* Local prototypes */ -static ACPI_INLINE void +static void acpi_tb_init_generic_address (struct acpi_generic_address *generic_address, -u8 space_id,u8 byte_width,u64 address); +u8 space_id, +u8 byte_width,u64 address,char *register_name);static void acpi_tb_convert_fadt (void );
@@ -182,10 +183,25 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = {* ******************************************************************************/ -static ACPI_INLINE void +static void acpi_tb_init_generic_address (struct acpi_generic_address *generic_address, -u8 space_id,u8 byte_width,u64 address) +u8 space_id, +u8 byte_width,u64 address,char *register_name) { +u8 bit_width; + +/* Bit width field in the GAS is only one byte long, 255 max */ + + bit_width = (u8)(byte_width *8 ); + +if (byte_width >31 ) {/* (31*8)=248 */ +ACPI_ERROR ((AE_INFO , +"%s - 32-bit FADT register is too long (%u bytes, %u bits) " +"to convert to GAS struct - 255 bits max, truncating" , + register_name, byte_width, (byte_width *8 ))); + + bit_width =255 ; + }/* * The 64-bit Address field is non-aligned in the byte packed
@@ -196,7 +212,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,/* All other fields are byte-wide */ generic_address->space_id = space_id; - generic_address->bit_width = (u8 )ACPI_MUL_8 (byte_width); + generic_address->bit_width = bit_width; generic_address->bit_offset =0 ; generic_address->access_width =0 ;/* Access width ANY */ }
@@ -456,7 +472,8 @@ static void acpi_tb_convert_fadt(void) &acpi_gbl_FADT, fadt_info_table [i].length), - (u64) address32); + (u64 ) address32, + fadt_info_table[i].name); } } }
@@ -670,7 +687,8 @@ static void acpi_tb_setup_fadt_registers(void) source64->address + (fadt_pm_info_table[i]. register_num * - pm1_register_byte_width)); + pm1_register_byte_width), + "PmRegisters"); } } }
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 11/52 ACPICA: Update to version 20120518
In reply to Len BrownFrom: Bob Moore <[email protected]>
Version string 20120518.
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -47,7 +47,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20120420 +#define ACPI_CA_VERSION 0x20120518#include "acconfig.h" #include "actypes.h"
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 12/52 cpuidle: remove unused hrtimer_peek_ahead_timers() call
In reply to Len BrownFrom: Sergey Senozhatsky <[email protected]>
commit 9a6558371bcd01c2973b7638181db4ccc34eab4f
Author: Arjan van de Ven <[email protected]>
Date: Sun Nov 9 12:45:10 2008 -0800
regression: disable timer peek-ahead for 2.6.28
It's showing up as regressions; disabling it very likely just papers over an underlying issue, but time is running out for 2.6.28, lets get back to this for 2.6.29
Many years has passed since 2008, so it seems ok to remove whole `#if 0' block.
--- drivers/cpuidle/cpuidle.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/cpuidle/cpuidle.c +0 -9
@@ -124,15 +124,6 @@ int cpuidle_idle_call(void)if (!dev || !dev->enabled)return -EBUSY ; -#if 0 -/* shows regressions, re-enable for 2.6.29 */ -/* -* run any timers that can be run now, at this point -* before calculating the idle duration etc. -*/ -hrtimer_peek_ahead_timers (); -#endif -/* ask the governor for the next state */ next_state = cpuidle_curr_governor->select (drv, dev);if (need_resched ()) {
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 13/52 cpuidle: add checks to avoid NULL pointer dereference
In reply to Len BrownFrom: "Srivatsa S. Bhat" <[email protected]>
The existing check for dev == NULL in __cpuidle_register_device() is rendered useless because dev is dereferenced before the check itself. Moreover, correctly speaking, it is the job of the callers of this function, i.e., cpuidle_register_device() & cpuidle_enable_device() (which also happen to be exported functions) to ensure that __cpuidle_register_device() is called with a non-NULL dev.
So add the necessary dev == NULL checks in the two callers and remove the (useless) check from __cpuidle_register_device().
--- drivers/cpuidle/cpuidle.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/cpuidle/cpuidle.c +6 -2
@@ -285,6 +285,9 @@ int cpuidle_enable_device(struct cpuidle_device *dev)int ret, i;struct cpuidle_driver *drv =cpuidle_get_driver (); +if (!dev) +return -EINVAL ; +if (dev->enabled)return 0 ;if (!drv || !cpuidle_curr_governor)
@@ -369,8 +372,6 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)struct device *cpu_dev =get_cpu_device ((unsigned long )dev->cpu);struct cpuidle_driver *cpuidle_driver =cpuidle_get_driver (); -if (!dev) -return -EINVAL ;if (!try_module_get (cpuidle_driver->owner))return -EINVAL ;
@@ -395,6 +396,9 @@ int cpuidle_register_device(struct cpuidle_device *dev) {int ret; +if (!dev) +return -EINVAL ; +mutex_lock (&cpuidle_lock);if ((ret =__cpuidle_register_device (dev))) {
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 14/52 ACPI Battery: Added capacity
In reply to Len BrownFrom: srinivas pandruvada <[email protected]>
Added Capacity field, which is a pre-defined power_supply property. Calculating capacity using current charge/energy and full charge/energy.
Some user mode implementations are relying on capacity field to show battery strength and power down decision.
--- drivers/acpi/battery.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/acpi/battery.c +9 -0
@@ -250,6 +250,13 @@ static int acpi_battery_get_property(struct power_supply *psy,else val->intval = battery->capacity_now *1000 ;break ; +case POWER_SUPPLY_PROP_CAPACITY : +if (battery->capacity_now && battery->full_charge_capacity) + val->intval = battery->capacity_now *100 / + battery->full_charge_capacity; +else + val->intval =0 ; +break ;case POWER_SUPPLY_PROP_MODEL_NAME : val->strval = battery->model_number;break ;
@@ -276,6 +283,7 @@ static enum power_supply_property charge_battery_props[] = {POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN ,POWER_SUPPLY_PROP_CHARGE_FULL ,POWER_SUPPLY_PROP_CHARGE_NOW , +POWER_SUPPLY_PROP_CAPACITY ,POWER_SUPPLY_PROP_MODEL_NAME ,POWER_SUPPLY_PROP_MANUFACTURER , POWER_SUPPLY_PROP_SERIAL_NUMBER,
@@ -292,6 +300,7 @@ static enum power_supply_property energy_battery_props[] = {POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN ,POWER_SUPPLY_PROP_ENERGY_FULL ,POWER_SUPPLY_PROP_ENERGY_NOW , +POWER_SUPPLY_PROP_CAPACITY ,POWER_SUPPLY_PROP_MODEL_NAME ,POWER_SUPPLY_PROP_MANUFACTURER , POWER_SUPPLY_PROP_SERIAL_NUMBER,
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 15/52 cpuidle: refactor out cpuidle_enter_state
In reply to Len BrownFrom: Colin Cross <[email protected]>
Split the code to enter a state and update the stats into a helper function, cpuidle_enter_state, and export it. This function will be called by the coupled state code to handle entering the safe state and the final coupled state.
--- drivers/cpuidle/cpuidle.c | 42 +++++++++++++++++++++++++++++------------- drivers/cpuidle/cpuidle.h | 2 ++ 2 files changed, 31 insertions(+), 13 deletions(-)
drivers/cpuidle/cpuidle.c +29 -13
@@ -103,6 +103,34 @@ int cpuidle_play_dead(void) }/** +* cpuidle_enter_state - enter the state and update stats +* @dev: cpuidle device for this cpu +* @drv: cpuidle driver for this cpu +* @next_state: index into drv->states of the state to enter +*/ +int cpuidle_enter_state (struct cpuidle_device *dev,struct cpuidle_driver *drv, +int next_state) +{ +int entered_state; + + entered_state =cpuidle_enter_ops (dev, drv, next_state); + +if (entered_state >=0 ) { +/* Update cpuidle counters */ +/* This can be moved to within driver enter routine +* but that results in multiple copies of same code. +*/ + dev->states_usage[entered_state].time += + (unsigned long long )dev->last_residency; + dev->states_usage[entered_state].usage++; + }else { + dev->last_residency =0 ; + } + +return entered_state; +} + +/** * cpuidle_idle_call - the main idle loop * * NOTE: no locks or semaphores should be used here
@@ -143,23 +171,11 @@ int cpuidle_idle_call(void)trace_power_start_rcuidle (POWER_CSTATE , next_state, dev->cpu);trace_cpu_idle_rcuidle (next_state, dev->cpu); - entered_state =cpuidle_enter_ops (dev, drv, next_state); + entered_state =cpuidle_enter_state (dev, drv, next_state);trace_power_end_rcuidle (dev->cpu);trace_cpu_idle_rcuidle (PWR_EVENT_EXIT , dev->cpu); -if (entered_state >=0 ) { -/* Update cpuidle counters */ -/* This can be moved to within driver enter routine -* but that results in multiple copies of same code. -*/ - dev->states_usage[entered_state].time += - (unsigned long long )dev->last_residency; - dev->states_usage[entered_state].usage++; - }else { - dev->last_residency =0 ; - } -/* give the governor an opportunity to reflect on the outcome */ if (cpuidle_curr_governor->reflect) cpuidle_curr_governor->reflect (dev, entered_state);
drivers/cpuidle/cpuidle.h +2 -0
@@ -14,6 +14,8 @@ extern struct list_head cpuidle_detected_devices;extern struct mutex cpuidle_lock;extern spinlock_t cpuidle_driver_lock;extern int cpuidle_disabled (void ); +extern int cpuidle_enter_state (struct cpuidle_device *dev, +struct cpuidle_driver *drv,int next_state);/* idle loop */ extern void cpuidle_install_idle_handler (void );
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 16/52 cpuidle: fix error handling in __cpuidle_register_device
In reply to Len BrownFrom: Colin Cross <[email protected]>
Fix the error handling in __cpuidle_register_device to include the missing list_del. Move it to a label, which will simplify the error handling when coupled states are added.
--- drivers/cpuidle/cpuidle.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/cpuidle/cpuidle.c +9 -4
@@ -403,13 +403,18 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)per_cpu (cpuidle_devices, dev->cpu) = dev;list_add (&dev->device_list, &cpuidle_detected_devices); -if ((ret =cpuidle_add_sysfs (cpu_dev))) { -module_put (cpuidle_driver->owner); -return ret; - } + ret =cpuidle_add_sysfs (cpu_dev); +if (ret) + goto err_sysfs; dev->registered =1 ;return 0 ; + +err_sysfs: +list_del (&dev->device_list); +per_cpu (cpuidle_devices, dev->cpu) =NULL ; +module_put (cpuidle_driver->owner); +return ret; }/**
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 17/52 cpuidle: add support for states that affect multiple cpus
In reply to Len BrownFrom: Colin Cross <[email protected]>
On some ARM SMP SoCs (OMAP4460, Tegra 2, and probably more), the cpus cannot be independently powered down, either due to sequencing restrictions (on Tegra 2, cpu 0 must be the last to power down), or due to HW bugs (on OMAP4460, a cpu powering up will corrupt the gic state unless the other cpu runs a work around). Each cpu has a power state that it can enter without coordinating with the other cpu (usually Wait For Interrupt, or WFI), and one or more "coupled" power states that affect blocks shared between the cpus (L2 cache, interrupt controller, and sometimes the whole SoC). Entering a coupled power state must be tightly controlled on both cpus.
The easiest solution to implementing coupled cpu power states is to hotplug all but one cpu whenever possible, usually using a cpufreq governor that looks at cpu load to determine when to enable the secondary cpus. This causes problems, as hotplug is an expensive operation, so the number of hotplug transitions must be minimized, leading to very slow response to loads, often on the order of seconds.
This file implements an alternative solution, where each cpu will wait in the WFI state until all cpus are ready to enter a coupled state, at which point the coupled state function will be called on all cpus at approximately the same time.
Once all cpus are ready to enter idle, they are woken by an smp cross call. At this point, there is a chance that one of the cpus will find work to do, and choose not to enter idle. A final pass is needed to guarantee that all cpus will call the power state enter function at the same time. During this pass, each cpu will increment the ready counter, and continue once the ready counter matches the number of online coupled cpus. If any cpu exits idle, the other cpus will decrement their counter and retry.
To use coupled cpuidle states, a cpuidle driver must:
Set struct cpuidle_device.coupled_cpus to the mask of all coupled cpus, usually the same as cpu_possible_mask if all cpus are part of the same cluster. The coupled_cpus mask must be set in the struct cpuidle_device for each cpu.
Set struct cpuidle_device.safe_state to a state that is not a coupled state. This is usually WFI.
Set CPUIDLE_FLAG_COUPLED in struct cpuidle_state.flags for each state that affects multiple cpus.
Provide a struct cpuidle_state.enter function for each state that affects multiple cpus. This function is guaranteed to be called on all cpus at approximately the same time. The driver should ensure that the cpus all abort together if any cpu tries to abort once the function is called.
update1:
cpuidle: coupled: fix count of online cpus
online_count was never incremented on boot, and was also counting cpus that were not part of the coupled set. Fix both issues by introducting a new function that counts online coupled cpus, and call it from register as well as the hotplug notifier.
update2:
cpuidle: coupled: fix decrementing ready count
cpuidle_coupled_set_not_ready sometimes refuses to decrement the ready count in order to prevent a race condition. This makes it unsuitable for use when finished with idle. Add a new function cpuidle_coupled_set_done that decrements both the ready count and waiting count, and call it after idle is complete.
--- drivers/cpuidle/Kconfig | 3 + drivers/cpuidle/Makefile | 1 + drivers/cpuidle/coupled.c | 678 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/cpuidle/cpuidle.c | 15 +- drivers/cpuidle/cpuidle.h | 30 ++ include/linux/cpuidle.h | 7 + 6 files changed, 733 insertions(+), 1 deletion(-) create mode 100644 drivers/cpuidle/coupled.c
drivers/cpuidle/Kconfig +3 -0
@@ -18,3 +18,6 @@ config CPU_IDLE_GOV_MENU bool depends on CPU_IDLE && NO_HZ default y + +config ARCH_NEEDS_CPU_IDLE_COUPLED + def_bool n
drivers/cpuidle/Makefile +1 -0
@@ -3,3 +3,4 @@ # obj-y += cpuidle.o driver.o governor.o sysfs.o governors/ +obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o
drivers/cpuidle/coupled.c new file +678 -0
678 lines not on this page · raw message
drivers/cpuidle/cpuidle.c +14 -1
@@ -171,7 +171,11 @@ int cpuidle_idle_call(void)trace_power_start_rcuidle (POWER_CSTATE , next_state, dev->cpu);trace_cpu_idle_rcuidle (next_state, dev->cpu); - entered_state =cpuidle_enter_state (dev, drv, next_state); +if (cpuidle_state_is_coupled (dev, drv, next_state)) + entered_state =cpuidle_enter_state_coupled (dev, drv, + next_state); +else + entered_state =cpuidle_enter_state (dev, drv, next_state);trace_power_end_rcuidle (dev->cpu);trace_cpu_idle_rcuidle (PWR_EVENT_EXIT , dev->cpu);
@@ -407,9 +411,16 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)if (ret) goto err_sysfs; + ret =cpuidle_coupled_register_device (dev); +if (ret) + goto err_coupled; + dev->registered =1 ;return 0 ; +err_coupled: +cpuidle_remove_sysfs (cpu_dev); +wait_for_completion (&dev->kobj_unregister); err_sysfs:list_del (&dev->device_list);per_cpu (cpuidle_devices, dev->cpu) =NULL ;
@@ -464,6 +475,8 @@ void cpuidle_unregister_device(struct cpuidle_device *dev)wait_for_completion (&dev->kobj_unregister);per_cpu (cpuidle_devices, dev->cpu) =NULL ; +cpuidle_coupled_unregister_device (dev); +cpuidle_resume_and_unlock ();module_put (cpuidle_driver->owner);
drivers/cpuidle/cpuidle.h +30 -0
@@ -32,4 +32,34 @@ extern void cpuidle_remove_state_sysfs(struct cpuidle_device *device);extern int cpuidle_add_sysfs (struct device *dev);extern void cpuidle_remove_sysfs (struct device *dev); +#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED +bool cpuidle_state_is_coupled (struct cpuidle_device *dev, +struct cpuidle_driver *drv,int state); +int cpuidle_enter_state_coupled (struct cpuidle_device *dev, +struct cpuidle_driver *drv,int next_state); +int cpuidle_coupled_register_device (struct cpuidle_device *dev); +void cpuidle_coupled_unregister_device (struct cpuidle_device *dev); +#else +static inline bool cpuidle_state_is_coupled (struct cpuidle_device *dev, +struct cpuidle_driver *drv,int state) +{ +return false; +} + +static inline int cpuidle_enter_state_coupled (struct cpuidle_device *dev, +struct cpuidle_driver *drv,int next_state) +{ +return -1 ; +} + +static inline int cpuidle_coupled_register_device (struct cpuidle_device *dev) +{ +return 0 ; +} + +static inline void cpuidle_coupled_unregister_device (struct cpuidle_device *dev) +{ +} +#endif +#endif /* __DRIVER_CPUIDLE_H */
include/linux/cpuidle.h +7 -0
@@ -57,6 +57,7 @@ struct cpuidle_state {/* Idle State Flags */ #define CPUIDLE_FLAG_TIME_VALID (0x01)/* is residency time measurable? */ +#define CPUIDLE_FLAG_COUPLED (0x02)/* state applies to multiple cpus */ #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
@@ -100,6 +101,12 @@ struct cpuidle_device {struct list_head device_list;struct kobject kobj;struct completion kobj_unregister; + +#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED +int safe_state_index; +cpumask_t coupled_cpus; +struct cpuidle_coupled *coupled; +#endif }; DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 18/52 cpuidle: coupled: add parallel barrier function
In reply to Len BrownFrom: Colin Cross <[email protected]>
Adds cpuidle_coupled_parallel_barrier, which can be used by coupled cpuidle state enter functions to handle resynchronization after determining if any cpu needs to abort. The normal use case will be:
static bool abort_flag;
static atomic_t abort_barrier;
int arch_cpuidle_enter(struct cpuidle_device *dev, ...)
{
if (arch_turn_off_irq_controller()) {
/* returns an error if an irq is pending and would be lost
if idle continued and turned off power */
abort_flag = true;
}
cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
if (abort_flag) {
/* One of the cpus didn't turn off it's irq controller */
arch_turn_on_irq_controller();
return -EINTR;
}
/* continue with idle */
...
}This will cause all cpus to abort idle together if one of them needs to abort.
--- drivers/cpuidle/coupled.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/cpuidle.h | 4 ++++ 2 files changed, 41 insertions(+)
drivers/cpuidle/coupled.c +37 -0
@@ -130,6 +130,43 @@ static DEFINE_PER_CPU(struct call_single_data, cpuidle_coupled_poke_cb);static cpumask_t cpuidle_coupled_poked_mask;/** +* cpuidle_coupled_parallel_barrier - synchronize all online coupled cpus +* @dev: cpuidle_device of the calling cpu +* @a: atomic variable to hold the barrier +* +* No caller to this function will return from this function until all online +* cpus in the same coupled group have called this function. Once any caller +* has returned from this function, the barrier is immediately available for +* reuse. +* +* The atomic variable a must be initialized to 0 before any cpu calls +* this function, will be reset to 0 before any cpu returns from this function. +* +* Must only be called from within a coupled idle state handler +* (state.enter when state.flags has CPUIDLE_FLAG_COUPLED set). +* +* Provides full smp barrier semantics before and after calling. +*/ +void cpuidle_coupled_parallel_barrier (struct cpuidle_device *dev,atomic_t *a) +{ +int n = dev->coupled->online_count; + +smp_mb__before_atomic_inc (); +atomic_inc (a); + +while (atomic_read (a) < n) +cpu_relax (); + +if (atomic_inc_return (a) == n *2 ) { +atomic_set (a,0 ); +return ; + } + +while (atomic_read (a) > n) +cpu_relax (); +} + +/** * cpuidle_state_is_coupled - check if a state is part of a coupled set * @dev: struct cpuidle_device for the current cpu * @drv: struct cpuidle_driver for the platform
include/linux/cpuidle.h +4 -0
@@ -183,6 +183,10 @@ static inline int cpuidle_play_dead(void) {return -ENODEV; }#endif +#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED +void cpuidle_coupled_parallel_barrier (struct cpuidle_device *dev,atomic_t *a); +#endif +/****************************** * CPUIDLE GOVERNOR INTERFACE * ******************************/
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 19/52 drivers/thermal/spear_thermal.c: add Device Tree probing capability
In reply to Len BrownFrom: Viresh Kumar <[email protected]>
SPEAr platforms now support DT and so must convert all drivers to support DT. This patch adds DT probing support for SPEAr thermal sensor driver and updates its documentation too.
Also, as SPEAr is the only user of this driver and is only available with DT, make this an only DT driver. So, platform_data is completely removed and passed via DT now.
--- .../devicetree/bindings/thermal/spear-thermal.txt | 14 ++++++++++++ drivers/thermal/Kconfig | 1 + drivers/thermal/spear_thermal.c | 26 +++++++++++++--------- include/linux/platform_data/spear_thermal.h | 26 ---------------------- 4 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/thermal/spear-thermal.txt delete mode 100644 include/linux/platform_data/spear_thermal.h
Documentation/devicetree/bindings/thermal/spear-thermal.txt new file +14 -0
@@ -0,0 +1,14 @@ +* SPEAr Thermal + +Required properties: +- compatible : "st,thermal-spear1340" +- reg : Address range of the thermal registers +- st,thermal-flags: flags used to enable thermal sensor + +Example: + + thermal@fc000000 { + compatible = "st,thermal-spear1340"; + reg = <0xfc000000 0x1000>; + st,thermal-flags = <0x7000>; + };
drivers/thermal/Kconfig +1 -0
@@ -23,6 +23,7 @@ config SPEAR_THERMAL bool "SPEAr thermal sensor driver" depends on THERMAL depends on PLAT_SPEAR + depends on OF help Enable this to plug the SPEAr thermal sensor driver into the Linux thermal framework
drivers/thermal/spear_thermal.c +16 -10
@@ -20,9 +20,9 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/of.h> #include <linux/module.h> #include <linux/platform_device.h> -#include <linux/platform_data/spear_thermal.h> #include <linux/thermal.h> #define MD_FACTOR 1000
@@ -103,21 +103,20 @@ static int spear_thermal_probe(struct platform_device *pdev) {struct thermal_zone_device *spear_thermal =NULL ;struct spear_thermal_dev *stdev; -struct spear_thermal_pdata *pdata; -int ret =0 ; +struct device_node *np = pdev->dev.of_node;struct resource *stres =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +int ret =0 , val; + +if (!np || !of_property_read_u32 (np,"st,thermal-flags" , &val)) { +dev_err (&pdev->dev,"Failed: DT Pdata not passed\n" ); +return -EINVAL ; + }if (!stres) {dev_err (&pdev->dev,"memory resource missing\n" );return -ENODEV ; } - pdata =dev_get_platdata (&pdev->dev); -if (!pdata) { -dev_err (&pdev->dev,"platform data is NULL\n" ); -return -EINVAL ; - } - stdev =devm_kzalloc (&pdev->dev,sizeof (*stdev),GFP_KERNEL );if (!stdev) {dev_err (&pdev->dev,"kzalloc fail\n" );
@@ -144,7 +143,7 @@ static int spear_thermal_probe(struct platform_device *pdev) goto put_clk; } - stdev->flags = pdata->thermal_flags; + stdev->flags = val;writel_relaxed (stdev->flags, stdev->thermal_base); spear_thermal = thermal_zone_device_register("spear_thermal", 0,
@@ -189,6 +188,12 @@ static int spear_thermal_exit(struct platform_device *pdev)return 0 ; } +static const struct of_device_id spear_thermal_id_table[] = { + { .compatible ="st,thermal-spear1340" }, + {} +}; +MODULE_DEVICE_TABLE (of, spear_thermal_id_table); +static struct platform_driver spear_thermal_driver = { .probe = spear_thermal_probe, .remove = spear_thermal_exit,
@@ -196,6 +201,7 @@ static struct platform_driver spear_thermal_driver = { .name = "spear_thermal", .owner = THIS_MODULE, .pm = &spear_thermal_pm_ops, + .of_match_table = of_match_ptr(spear_thermal_id_table), }, };
include/linux/platform_data/spear_thermal.h deleted +0 -26
@@ -1,26 +0,0 @@ -/* -* SPEAr thermal driver platform data. -* -* Copyright (C) 2011-2012 ST Microelectronics -* Author: Vincenzo Frascino <[email protected]> -* -* This software is licensed under the terms of the GNU General Public -* License version 2, as published by the Free Software Foundation, and -* may be copied, distributed, and modified under those terms. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ -#ifndef SPEAR_THERMAL_H -#define SPEAR_THERMAL_H - -/* SPEAr Thermal Sensor Platform Data */ -struct spear_thermal_pdata { -/* flags used to enable thermal sensor */ -unsigned int thermal_flags; -}; - -#endif /* SPEAR_THERMAL_H */
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 20/52 ACPI: Add an interface to evaluate _OST
In reply to Len BrownFrom: Toshi Kani <[email protected]>
Added acpi_evaluate_hotplug_opt(). All ACPI hotplug handlers must call this function when evaluating _OST for hotplug operations. If the platform does not support _OST, this function returns AE_NOT_FOUND and has no effect on the platform.
ACPI_HOTPLUG_OST is defined when all relevant ACPI hotplug operations, such as CPU, memory and container hotplug, are enabled. This assures consistent behavior among the hotplug operations with regarding the _OST support. When ACPI_HOTPLUG_OST is not defined, this function is a no-op.
ACPI PCI hotplug is not enhanced to support _OST at this time since it is a legacy method being replaced by PCIe native hotplug. _OST support for ACPI PCI hotplug may be added in future if necessary.
Some platforms may require the OS to support _OST in order to support ACPI hotplug operations. For example, if a platform has the management console where user can request a hotplug operation from, this _OST support would be required for the management console to show the result of the hotplug request to user.
Added macro definitions of _OST source events and status codes. Also renamed OSC_SB_CPUHP_OST_SUPPORT to OSC_SB_HOTPLUG_OST_SUPPORT since this _OSC bit is not specific to CPU hotplug. This bit is defined in Table 6-147 of ACPI 5.0 as follows.
Bits: 3
Field Name: Insertion / Ejection _OST Processing Support
Definition: This bit is set if OSPM will evaluate the _OST
object defined under a device when processing insertion and ejection source event codes.
--- drivers/acpi/utils.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/acpi/acpi_bus.h | 3 +++ include/linux/acpi.h | 40 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 84 insertions(+), 1 deletion(-)
drivers/acpi/utils.c +42 -0
@@ -412,3 +412,45 @@ out:return status; }EXPORT_SYMBOL (acpi_get_physical_device_location); + +/** +* acpi_evaluate_hotplug_ost: Evaluate _OST for hotplug operations +* @handle: ACPI device handle +* @source_event: source event code +* @status_code: status code +* @status_buf: optional detailed information (NULL if none) +* +* Evaluate _OST for hotplug operations. All ACPI hotplug handlers +* must call this function when evaluating _OST for hotplug operations. +* When the platform does not support _OST, this function has no effect. +*/ +acpi_status +acpi_evaluate_hotplug_ost (acpi_handle handle,u32 source_event, +u32 status_code,struct acpi_buffer *status_buf) +{ +#ifdef ACPI_HOTPLUG_OST +union acpi_object params[3 ] = { + {.type =ACPI_TYPE_INTEGER ,}, + {.type =ACPI_TYPE_INTEGER ,}, + {.type =ACPI_TYPE_BUFFER ,} + }; +struct acpi_object_list arg_list = {3 , params}; +acpi_status status; + + params[0 ].integer.value = source_event; + params[1 ].integer.value = status_code; +if (status_buf !=NULL ) { + params[2 ].buffer.pointer = status_buf->pointer; + params[2 ].buffer.length = status_buf->length; + }else { + params[2 ].buffer.pointer =NULL ; + params[2 ].buffer.length =0 ; + } + + status =acpi_evaluate_object (handle,"_OST" , &arg_list,NULL ); +return status; +#else +return AE_OK ; +#endif +} +EXPORT_SYMBOL (acpi_evaluate_hotplug_ost);
include/acpi/acpi_bus.h +3 -0
@@ -50,6 +50,9 @@ acpi_evaluate_reference(acpi_handle handle,acpi_string pathname, struct acpi_object_list *arguments, struct acpi_handle_list *list); +acpi_status +acpi_evaluate_hotplug_ost (acpi_handle handle,u32 source_event, +u32 status_code,struct acpi_buffer *status_buf);struct acpi_pld {unsigned int revision:7 ;/* 0 */
include/linux/acpi.h +39 -1
@@ -277,7 +277,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);#define OSC_SB_PAD_SUPPORT 1#define OSC_SB_PPC_OST_SUPPORT 2#define OSC_SB_PR3_SUPPORT 4 -#define OSC_SB_CPUHP_OST_SUPPORT 8 +#define OSC_SB_HOTPLUG_OST_SUPPORT 8#define OSC_SB_APEI_SUPPORT 16extern bool osc_sb_apei_support_acked;
@@ -309,6 +309,44 @@ extern bool osc_sb_apei_support_acked;extern acpi_status acpi_pci_osc_control_set (acpi_handle handle,u32 *mask,u32 req); + +/* Enable _OST when all relevant hotplug operations are enabled */ +#if defined(CONFIG_ACPI_HOTPLUG_CPU ) && \ + (defined(CONFIG_ACPI_HOTPLUG_MEMORY ) || \ + defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE )) && \ + (defined(CONFIG_ACPI_CONTAINER ) || \ + defined(CONFIG_ACPI_CONTAINER_MODULE )) +#define ACPI_HOTPLUG_OST +#endif + +/* _OST Source Event Code (OSPM Action) */ +#define ACPI_OST_EC_OSPM_SHUTDOWN 0x100 +#define ACPI_OST_EC_OSPM_EJECT 0x103 +#define ACPI_OST_EC_OSPM_INSERTION 0x200 + +/* _OST General Processing Status Code */ +#define ACPI_OST_SC_SUCCESS 0x0 +#define ACPI_OST_SC_NON_SPECIFIC_FAILURE 0x1 +#define ACPI_OST_SC_UNRECOGNIZED_NOTIFY 0x2 + +/* _OST OS Shutdown Processing (0x100) Status Code */ +#define ACPI_OST_SC_OS_SHUTDOWN_DENIED 0x80 +#define ACPI_OST_SC_OS_SHUTDOWN_IN_PROGRESS 0x81 +#define ACPI_OST_SC_OS_SHUTDOWN_COMPLETED 0x82 +#define ACPI_OST_SC_OS_SHUTDOWN_NOT_SUPPORTED 0x83 + +/* _OST Ejection Request (0x3, 0x103) Status Code */ +#define ACPI_OST_SC_EJECT_NOT_SUPPORTED 0x80 +#define ACPI_OST_SC_DEVICE_IN_USE 0x81 +#define ACPI_OST_SC_DEVICE_BUSY 0x82 +#define ACPI_OST_SC_EJECT_DEPENDENCY_BUSY 0x83 +#define ACPI_OST_SC_EJECT_IN_PROGRESS 0x84 + +/* _OST Insertion Request (0x200) Status Code */ +#define ACPI_OST_SC_INSERT_IN_PROGRESS 0x80 +#define ACPI_OST_SC_DRIVER_LOAD_FAILURE 0x81 +#define ACPI_OST_SC_INSERT_NOT_SUPPORTED 0x82 +extern void acpi_early_init (void );extern int acpi_nvs_register (__u64 start,__u64 size);
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 21/52 ACPI: Add _OST support for sysfs eject
In reply to Len BrownFrom: Toshi Kani <[email protected]>
Changed acpi_bus_hot_remove_device() to support _OST. This function is also changed to global so that it can be called from hotplug notify handlers to perform hot-remove operation.
Changed acpi_eject_store(), which is the sysfs eject handler. It checks eject_pending to see if the request was originated from ACPI eject notification. If not, it calls _OST(0x103,84,) per Figure 6-37 in ACPI 5.0 spec.
Added eject_pending bit to acpi_device_flags. This bit is set when the kernel has received an ACPI eject notification, but does not initiate its hot-remove operation by itself.
Added struct acpi_eject_event. This structure is used to pass extended information to acpi_bus_hot_remove_device(), which has a single argument to support asynchronous call
--- drivers/acpi/scan.c | 58 +++++++++++++++++++++++++++++++++++++++++-------- include/acpi/acpi_bus.h | 9 +++++++- 2 files changed, 57 insertions(+), 10 deletions(-)
drivers/acpi/scan.c +49 -9
@@ -83,19 +83,29 @@ acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, cha } static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); -static void acpi_bus_hot_remove_device (void *context) +/** +* acpi_bus_hot_remove_device: hot-remove a device and its children +* @context: struct acpi_eject_event pointer (freed in this func) +* +* Hot-remove a device and its children. This function frees up the +* memory space passed by arg context, so that the caller may call +* this function asynchronously through acpi_os_hotplug_execute(). +*/ +void acpi_bus_hot_remove_device (void *context) { +struct acpi_eject_event *ej_event = (struct acpi_eject_event *) context;struct acpi_device *device; -acpi_handle handle = context; +acpi_handle handle = ej_event->handle;struct acpi_object_list arg_list;union acpi_object arg;acpi_status status =AE_OK ; +u32 ost_code =ACPI_OST_SC_NON_SPECIFIC_FAILURE ;/* default */ if (acpi_bus_get_device (handle, &device)) -return ; + goto err_out;if (!device) -return ; + goto err_out;ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Hot-removing device %s...\n" ,dev_name (&device->dev)));
@@ -103,7 +113,7 @@ static void acpi_bus_hot_remove_device(void *context)if (acpi_bus_trim (device,1 )) { printk(KERN_ERR PREFIX "Removing device failed\n"); -return ; + goto err_out; }/* power off device */
@@ -129,10 +139,21 @@ static void acpi_bus_hot_remove_device(void *context)* TBD: _EJD support. */ status =acpi_evaluate_object (handle,"_EJ0" , &arg_list,NULL ); -if (ACPI_FAILURE (status)) - printk(KERN_WARNING PREFIX -"Eject device failed\n" ); +if (ACPI_FAILURE (status)) { +if (status !=AE_NOT_FOUND ) + printk(KERN_WARNING PREFIX +"Eject device failed\n" ); + goto err_out; + } + +kfree (context); +return ; +err_out: +/* Inform firmware the hot-remove operation has completed w/ error */ + (void )acpi_evaluate_hotplug_ost (handle, + ej_event->event, ost_code,NULL ); +kfree (context);return ; }
@@ -144,6 +165,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,acpi_status status;acpi_object_type type =0 ;struct acpi_device *acpi_device =to_acpi_device (d); +struct acpi_eject_event *ej_event;if ((!count) || (buf[0 ] !='1' )) {return -EINVAL ;
@@ -160,7 +182,25 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, goto err; } -acpi_os_hotplug_execute (acpi_bus_hot_remove_device, acpi_device->handle); + ej_event =kmalloc (sizeof (*ej_event),GFP_KERNEL ); +if (!ej_event) { + ret = -ENOMEM ; + goto err; + } + + ej_event->handle = acpi_device->handle; +if (acpi_device->flags.eject_pending) { +/* event originated from ACPI eject notification */ + ej_event->event =ACPI_NOTIFY_EJECT_REQUEST ; + acpi_device->flags.eject_pending =0 ; + }else { +/* event originated from user */ + ej_event->event =ACPI_OST_EC_OSPM_EJECT ; + (void )acpi_evaluate_hotplug_ost (ej_event->handle, + ej_event->event,ACPI_OST_SC_EJECT_IN_PROGRESS ,NULL ); + } + +acpi_os_hotplug_execute (acpi_bus_hot_remove_device, (void *)ej_event); err:return ret; }
include/acpi/acpi_bus.h +8 -1
@@ -182,7 +182,8 @@ struct acpi_device_flags { u32 suprise_removal_ok:1; u32 power_manageable:1; u32 performance_manageable:1; - u32 reserved:24; + u32 eject_pending:1; + u32 reserved:23; };/* File System */
@@ -334,6 +335,11 @@ struct acpi_bus_event {u32 data; }; +struct acpi_eject_event { +acpi_handle handle; +u32 event; +}; +extern struct kobject *acpi_kobj;extern int acpi_bus_generate_netlink_event (const char *,const char *,u8 ,int );void acpi_bus_private_data_handler (acpi_handle ,void *);
@@ -371,6 +377,7 @@ int acpi_bus_register_driver(struct acpi_driver *driver);void acpi_bus_unregister_driver (struct acpi_driver *driver);int acpi_bus_add (struct acpi_device **child,struct acpi_device *parent,acpi_handle handle,int type); +void acpi_bus_hot_remove_device (void *context);int acpi_bus_trim (struct acpi_device *start,int rmdevice);int acpi_bus_start (struct acpi_device *device);acpi_status acpi_bus_get_ejd (acpi_handle handle,acpi_handle * ejd);
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 22/52 ACPI: Add _OST support for ACPI CPU hotplug
In reply to Len BrownFrom: Toshi Kani <[email protected]>
Changed acpi_processor_hotplug_notify() to call ACPI _OST method when ACPI CPU hotplug operation has completed.
--- drivers/acpi/processor_driver.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
drivers/acpi/processor_driver.c +20 -8
@@ -701,9 +701,9 @@ static void acpi_processor_hotplug_notify(acpi_handle handle, {struct acpi_processor *pr;struct acpi_device *device =NULL ; +u32 ost_code =ACPI_OST_SC_NON_SPECIFIC_FAILURE ;/* default */ int result; -switch (event) {case ACPI_NOTIFY_BUS_CHECK :case ACPI_NOTIFY_DEVICE_CHECK :
@@ -715,14 +715,18 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,if (!is_processor_present (handle))break ; -if (acpi_bus_get_device (handle, &device)) { - result =acpi_processor_device_add (handle, &device); -if (result) - printk(KERN_ERR PREFIX -"Unable to add the device\n" ); +if (!acpi_bus_get_device (handle, &device)) +break ; + + result =acpi_processor_device_add (handle, &device); +if (result) { + printk(KERN_ERR PREFIX "Unable to add the device\n");break ; } + + ost_code =ACPI_OST_SC_SUCCESS ;break ; +case ACPI_NOTIFY_EJECT_REQUEST :ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"received ACPI_NOTIFY_EJECT_REQUEST\n" ));
@@ -736,15 +740,23 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,if (!pr) { printk(KERN_ERR PREFIX "Driver data is NULL, dropping EJECT\n"); -return ; +break ; } + +/* REVISIT: update when eject is supported */ + ost_code =ACPI_OST_SC_EJECT_NOT_SUPPORTED ;break ; +default :ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Unsupported event [0x%x]\n" , event)); -break ; + +/* non-hotplug event; possibly handled by other handler */ +return ; } +/* Inform firmware that the hotplug operation has completed */ + (void )acpi_evaluate_hotplug_ost (handle, event, ost_code,NULL );return ; }
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 23/52 ACPI: Add _OST support for ACPI memory hotplug
In reply to Len BrownFrom: Toshi Kani <[email protected]>
Changed acpi_memory_device_notify() to call ACPI _OST method when ACPI memory hotplug operation has completed.
--- drivers/acpi/acpi_memhotplug.c | 43 +++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-)
drivers/acpi/acpi_memhotplug.c +32 -11
@@ -341,7 +341,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) {struct acpi_memory_device *mem_device;struct acpi_device *device; - +u32 ost_code =ACPI_OST_SC_NON_SPECIFIC_FAILURE ;/* default */ switch (event) {case ACPI_NOTIFY_BUS_CHECK :
@@ -354,15 +354,20 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) "\nReceived DEVICE CHECK notification for device\n"));if (acpi_memory_get_device (handle, &mem_device)) { printk(KERN_ERR PREFIX "Cannot find driver data\n"); -return ; +break ; } -if (!acpi_memory_check_device (mem_device)) { -if (acpi_memory_enable_device (mem_device)) - printk(KERN_ERR PREFIX -"Cannot enable memory device\n" ); +if (acpi_memory_check_device (mem_device)) +break ; + +if (acpi_memory_enable_device (mem_device)) { + printk(KERN_ERR PREFIX "Cannot enable memory device\n"); +break ; } + + ost_code =ACPI_OST_SC_SUCCESS ;break ; +case ACPI_NOTIFY_EJECT_REQUEST :ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"\nReceived EJECT REQUEST notification for device\n" ));
@@ -383,19 +388,35 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)* TBD: Can also be disabled by Callback registration * with generic sysfs driver */ -if (acpi_memory_disable_device (mem_device)) - printk(KERN_ERR PREFIX -"Disable memory device\n" ); +if (acpi_memory_disable_device (mem_device)) { + printk(KERN_ERR PREFIX "Disable memory device\n"); +/* +* If _EJ0 was called but failed, _OST is not +* necessary. +*/ +if (mem_device->state ==MEMORY_INVALID_STATE ) +return ; + +break ; + } +/* * TBD: Invoke acpi_bus_remove to cleanup data structures */ -break ; + +/* _EJ0 succeeded; _OST is not necessary */ +return ; +default :ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Unsupported event [0x%x]\n" , event)); -break ; + +/* non-hotplug event; possibly handled by other handler */ +return ; } +/* Inform firmware that the hotplug operation has completed */ + (void )acpi_evaluate_hotplug_ost (handle, event, ost_code,NULL );return ; }
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 24/52 ACPI: Add _OST support for ACPI container hotplug
In reply to Len BrownFrom: Toshi Kani <[email protected]>
Changed container_notify_cb() to call ACPI _OST method when ACPI container hotplug operation has completed. Slightly restructured the code with the same logic. The function sets eject_pending bit for an eject request since it does not initiate hot-remove operation. This bit is checked by the sysfs eject handler to determine if the request is originated from an ACPI eject notification.
--- drivers/acpi/container.c | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-)
drivers/acpi/container.c +28 -15
@@ -158,9 +158,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)int result;int present;acpi_status status; - - - present =is_device_present (handle); +u32 ost_code =ACPI_OST_SC_NON_SPECIFIC_FAILURE ;/* default */ switch (type) {case ACPI_NOTIFY_BUS_CHECK :
@@ -169,32 +167,47 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)printk (KERN_WARNING "Container driver received %s event\n" , (type ==ACPI_NOTIFY_BUS_CHECK ) ?"ACPI_NOTIFY_BUS_CHECK" :"ACPI_NOTIFY_DEVICE_CHECK" ); + + present =is_device_present (handle); status =acpi_bus_get_device (handle, &device); -if (present) { -if (ACPI_FAILURE (status) || !device) { - result =container_device_add (&device, handle); -if (!result) -kobject_uevent (&device->dev.kobj, -KOBJ_ONLINE ); -else -printk (KERN_WARNING -"Failed to add container\n" ); - } - }else { +if (!present) {if (ACPI_SUCCESS (status)) {/* device exist and this is a remove request */ + device->flags.eject_pending =1 ;kobject_uevent (&device->dev.kobj,KOBJ_OFFLINE ); +return ; } +break ; + } + +if (!ACPI_FAILURE (status) || device) +break ; + + result =container_device_add (&device, handle); +if (result) { +printk (KERN_WARNING "Failed to add container\n" ); +break ; } + +kobject_uevent (&device->dev.kobj,KOBJ_ONLINE ); + ost_code =ACPI_OST_SC_SUCCESS ;break ; +case ACPI_NOTIFY_EJECT_REQUEST :if (!acpi_bus_get_device (handle, &device) && device) { + device->flags.eject_pending =1 ;kobject_uevent (&device->dev.kobj,KOBJ_OFFLINE ); +return ; }break ; +default : -break ; +/* non-hotplug event; possibly handled by other handler */ +return ; } + +/* Inform firmware that the hotplug operation has completed */ + (void )acpi_evaluate_hotplug_ost (handle, type, ost_code,NULL );return ; }
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 25/52 ACPI: Set hotplug _OST support bit to _OSC
In reply to Len BrownFrom: Toshi Kani <[email protected]>
When ACPI_HOTPLUG_OST is defined, set hotplug _OST support bit OSC_SB_HOTPLUG_OST_SUPPORT to indicate that the OS supports hotplug _OST by calling the platform-wide ACPI Operating System Capabilities (_OSC).
--- drivers/acpi/bus.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/acpi/bus.c +4 -0
@@ -548,6 +548,10 @@ static void acpi_bus_osc_support(void) capbuf[OSC_SUPPORT_TYPE ] |=OSC_SB_PPC_OST_SUPPORT ;#endif +#ifdef ACPI_HOTPLUG_OST + capbuf[OSC_SUPPORT_TYPE ] |=OSC_SB_HOTPLUG_OST_SUPPORT ; +#endif +if (!ghes_disable) capbuf[OSC_SUPPORT_TYPE ] |=OSC_SB_APEI_SUPPORT ;if (ACPI_FAILURE (acpi_get_handle (NULL ,"\\_SB" , &handle)))
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 26/52 ACPI, PM, Specify lowest allowed state for device sleep state
In reply to Len BrownFrom: Huang Ying <[email protected]>
Lower device sleep state can save more power, but has more exit latency too. Sometimes, to satisfy some power QoS and other requirement, we need to constrain the lowest device sleep state.
In this patch, a parameter to specify lowest allowed state for acpi_pm_device_sleep_state is added. So that the caller can enforce the constraint via the parameter.
This is needed by PCIe D3cold support, where the lowest power state allowed may be D3_HOT instead of default D3_COLD.
Changelog:
v2:
- Minor change per Rafeal's comments
--- drivers/acpi/sleep.c | 24 +++++++++++++++++++----- drivers/pci/pci-acpi.c | 3 ++- drivers/pnp/pnpacpi/core.c | 4 ++-- include/acpi/acpi_bus.h | 6 +++--- 4 files changed, 26 insertions(+), 11 deletions(-)
drivers/acpi/sleep.c +19 -5
@@ -675,8 +675,9 @@ int acpi_suspend(u32 acpi_state)* @dev: device to examine; its driver model wakeup flags control * whether it should be able to wake up the system * @d_min_p: used to store the upper limit of allowed states range -* Return value: preferred power state of the device on success, -ENODEV on -* failure (ie. if there's no 'struct acpi_device' for @dev) +* @d_max_in: specify the lowest allowed states +* Return value: preferred power state of the device on success, -ENODEV +* (ie. if there's no 'struct acpi_device' for @dev) or -EINVAL on failure * * Find the lowest power (highest number) ACPI device power state that * device @dev can be in while the system is in the sleep state represented
@@ -691,13 +692,15 @@ int acpi_suspend(u32 acpi_state)* via @wake. */ -int acpi_pm_device_sleep_state (struct device *dev,int *d_min_p) +int acpi_pm_device_sleep_state (struct device *dev,int *d_min_p,int d_max_in) {acpi_handle handle =DEVICE_ACPI_HANDLE (dev);struct acpi_device *adev;char acpi_method[] ="_SxD" ;unsigned long long d_min, d_max; +if (d_max_in <ACPI_STATE_D0 || d_max_in >ACPI_STATE_D3 ) +return -EINVAL ;if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) {printk (KERN_DEBUG "ACPI handle has no context!\n" );return -ENODEV ;
@@ -705,8 +708,10 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p) acpi_method[2 ] ='0' + acpi_target_sleep_state;/* -* If the sleep state is S0, we will return D3, but if the device has -* _S0W, we will use the value from _S0W +* If the sleep state is S0, the lowest limit from ACPI is D3, +* but if the device has _S0W, we will use the value from _S0W +* as the lowest limit from ACPI. Finally, we will constrain +* the lowest limit with the specified one. */ d_min =ACPI_STATE_D0 ; d_max =ACPI_STATE_D3 ;
@@ -750,8 +755,17 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p) } } +if (d_max_in < d_min) +return -EINVAL ;if (d_min_p) *d_min_p = d_min; +/* constrain d_max with specified lowest limit (max number) */ +if (d_max > d_max_in) { +for (d_max = d_max_in; d_max > d_min; d_max--) { +if (adev->power.states[d_max].flags.valid) +break ; + } + }return d_max; }#endif /* CONFIG_PM */
drivers/pci/pci-acpi.c +2 -1
@@ -189,7 +189,8 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev) {int acpi_state; - acpi_state =acpi_pm_device_sleep_state (&pdev->dev,NULL ); + acpi_state =acpi_pm_device_sleep_state (&pdev->dev,NULL , +ACPI_STATE_D3 );if (acpi_state <0 )return PCI_POWER_ERROR ;
drivers/pnp/pnpacpi/core.c +2 -2
@@ -170,8 +170,8 @@ static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state) }if (acpi_bus_power_manageable (handle)) { -int power_state =acpi_pm_device_sleep_state (&dev->dev,NULL ); - +int power_state =acpi_pm_device_sleep_state (&dev->dev,NULL , +ACPI_STATE_D3 );if (power_state <0 ) power_state = (state.event ==PM_EVENT_ON ) ?ACPI_STATE_D0 :ACPI_STATE_D3 ;
include/acpi/acpi_bus.h +3 -3
@@ -414,13 +414,13 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);int acpi_disable_wakeup_device_power (struct acpi_device *dev);#ifdef CONFIG_PM -int acpi_pm_device_sleep_state (struct device *,int *); +int acpi_pm_device_sleep_state (struct device *,int *,int );#else -static inline int acpi_pm_device_sleep_state (struct device *d,int *p) +static inline int acpi_pm_device_sleep_state (struct device *d,int *p,int m) {if (p) *p =ACPI_STATE_D0 ; -return ACPI_STATE_D3 ; +return (m >=ACPI_STATE_D0 && m <=ACPI_STATE_D3 ) ? m :ACPI_STATE_D0 ; }#endif
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 27/52 intel_idle: initial IVB support
In reply to Len BrownFrom: Len Brown <[email protected]>
Quoted 1 line
From an OS point of view, IVB looks like SNB, but quicker.
--- drivers/idle/intel_idle.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
drivers/idle/intel_idle.c +37 -0
@@ -169,6 +169,38 @@ static struct cpuidle_state snb_cstates[MWAIT_MAX_NUM_CSTATES] = { .enter = &intel_idle }, }; +static struct cpuidle_state ivb_cstates[MWAIT_MAX_NUM_CSTATES ] = { + {/* MWAIT C0 */ }, + {/* MWAIT C1 */ + .name ="C1-IVB" , + .desc ="MWAIT 0x00" , + .flags =CPUIDLE_FLAG_TIME_VALID , + .exit_latency =1 , + .target_residency =1 , + .enter = &intel_idle }, + {/* MWAIT C2 */ + .name ="C3-IVB" , + .desc ="MWAIT 0x10" , + .flags =CPUIDLE_FLAG_TIME_VALID |CPUIDLE_FLAG_TLB_FLUSHED , + .exit_latency =59 , + .target_residency =156 , + .enter = &intel_idle }, + {/* MWAIT C3 */ + .name ="C6-IVB" , + .desc ="MWAIT 0x20" , + .flags =CPUIDLE_FLAG_TIME_VALID |CPUIDLE_FLAG_TLB_FLUSHED , + .exit_latency =80 , + .target_residency =300 , + .enter = &intel_idle }, + {/* MWAIT C4 */ + .name ="C7-IVB" , + .desc ="MWAIT 0x30" , + .flags =CPUIDLE_FLAG_TIME_VALID |CPUIDLE_FLAG_TLB_FLUSHED , + .exit_latency =87 , + .target_residency =300 , + .enter = &intel_idle }, +}; +static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES ] = { {/* MWAIT C0 */ }, {/* MWAIT C1 */
@@ -347,6 +379,10 @@ static const struct idle_cpu idle_cpu_snb = { .state_table = snb_cstates, }; +static const struct idle_cpu idle_cpu_ivb = { + .state_table = ivb_cstates, +}; +#define ICPU (model, cpu) \ { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu }
@@ -362,6 +398,7 @@ static const struct x86_cpu_id intel_idle_ids[] = {ICPU (0x2f , idle_cpu_nehalem),ICPU (0x2a , idle_cpu_snb),ICPU (0x2d , idle_cpu_snb), +ICPU (0x3a , idle_cpu_ivb), {} };MODULE_DEVICE_TABLE (x86cpu, intel_idle_ids);
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 28/52 ACPI: remove acpi_pad MAINTAINERS entry
In reply to Len BrownFrom: Len Brown <[email protected]>
As Shaohua is no longer in this neck of the woods, and thus treat the acpi_pad driver as just another part of drivers/acpi/
--- MAINTAINERS | 7 ------- 1 file changed, 7 deletions(-)
MAINTAINERS +0 -7
@@ -242,13 +242,6 @@ W: http://www.lesswatts.org/projects/acpi/ S: Supported F: drivers/acpi/fan.c -ACPI PROCESSOR AGGREGATOR DRIVER -M: Shaohua Li <[email protected]> -L: [email protected] -W: http://www.lesswatts.org/projects/acpi/ -S: Supported -F: drivers/acpi/acpi_pad.c - ACPI THERMAL DRIVER M: Zhang Rui <[email protected]> L: [email protected]
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 29/52 ACPI: acpi_pad: rename "power_saving" thread to "acpi_pad" thread
In reply to Len BrownFrom: Len Brown <[email protected]>
"acpi_pad/%d" is a better thread name than
generic "power_saving/%d" because users who see
these threads will know the name of the driver
that caused them.
--- drivers/acpi/acpi_pad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpi_pad.c +1 -1
@@ -234,7 +234,7 @@ static int create_power_saving_task(void) ps_tsks[ps_tsk_num] =kthread_run (power_saving_thread, (void *)(unsigned long )ps_tsk_num, -"power_saving/%d" , ps_tsk_num); +"acpi_pad/%d" , ps_tsk_num); rc =IS_ERR (ps_tsks[ps_tsk_num]) ?PTR_ERR (ps_tsks[ps_tsk_num]) :0 ;if (!rc) ps_tsk_num++;
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 30/52 ACPI, APEI: Fixup common access width firmware bug
In reply to Len BrownFrom: Jean Delvare <[email protected]>
Many firmwares have a common register definition bug where 8-bit access width is specified for a 32-bit register. Ideally this should be fixed in the BIOS, but earlier versions of the kernel did not complain, so fix that up silently.
This closes kernel bug #43282:
https://bugzilla.kernel.org/show_bug.cgi?id=43282
--- drivers/acpi/apei/apei-base.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/acpi/apei/apei-base.c +5 -0
@@ -586,6 +586,11 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr, } *access_bit_width =1UL << (access_size_code +2 ); +/* Fixup common BIOS bug */ +if (bit_width ==32 && bit_offset ==0 && (*paddr &0x03 ) ==0 && + *access_bit_width <32 ) + *access_bit_width =32 ; +if ((bit_width + bit_offset) > *access_bit_width) { pr_warning(FW_BUG APEI_PFX "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n",
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 31/52 ACPICA: Disassembler: Emit descriptions for ACPI predefined names
In reply to Len BrownFrom: Bob Moore <[email protected]>
For each predefined name, emit a short description within a comment.
https://www.acpica.org/bugzilla/show_bug.cgi?id=959
--- drivers/acpi/acpica/acglobal.h | 8 ++++++++ drivers/acpi/acpica/aclocal.h | 15 +++++++++++++++ 2 files changed, 23 insertions(+)
drivers/acpi/acpica/acglobal.h +8 -0
@@ -462,4 +462,12 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;#endif /* ACPI_DEBUGGER */ +/***************************************************************************** +* +* Info/help support +* +****************************************************************************/ + +extern const struct ah_predefined_name asl_predefined_info[]; +#endif /* __ACGLOBAL_H__ */
drivers/acpi/acpica/aclocal.h +15 -0
@@ -796,6 +796,7 @@ struct acpi_parse_state {#define ACPI_PARSEOP_IGNORE 0x01#define ACPI_PARSEOP_PARAMLIST 0x02#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 +#define ACPI_PARSEOP_PREDEF_CHECKED 0x08#define ACPI_PARSEOP_SPECIAL 0x10/*****************************************************************************
@@ -1084,4 +1085,18 @@ struct acpi_debug_mem_block {#define ACPI_MEM_LIST_MAX 1#define ACPI_NUM_MEM_LISTS 2 +/***************************************************************************** +* +* Info/help support +* +****************************************************************************/ + +struct ah_predefined_name { +char *name; +char *description; +#ifndef ACPI_ASL_COMPILER +char *action; +#endif +}; +#endif /* __ACLOCAL_H__ */
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 32/52 ACPICA: Utilities: conditionally compile backslash removal function
In reply to Len BrownFrom: Bob Moore <[email protected]>
Only used for iASL and AcpiExec.
--- drivers/acpi/acpica/utmisc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/acpica/utmisc.c +2 -0
@@ -50,6 +50,7 @@#define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utmisc") +#if definedACPI_ASL_COMPILER || definedACPI_EXEC_APP /******************************************************************************* * * FUNCTION: ut_convert_backslashes
@@ -77,6 +78,7 @@ void ut_convert_backslashes(char *pathname) pathname++; } } +#endif /******************************************************************************* *
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 33/52 ACPICA: Update comments; no functional change
In reply to Len BrownFrom: Bob Moore <[email protected]>
Cleanup a couple of comments.
--- drivers/acpi/acpica/acpredef.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/acpica/acpredef.h +3 -3
@@ -511,14 +511,14 @@ static const union acpi_predefined_info predefined_names[] = {{"_TMP", 0, ACPI_RTYPE_INTEGER}}, {{"_TPC", 0, ACPI_RTYPE_INTEGER}}, {{"_TPT", 1, 0}}, - {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2_ref/6_int */ + {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2 Ref/6 Int */ {{{ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2, ACPI_RTYPE_INTEGER}, 6, 0}}, - {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5_int with count */ + {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int with count */ {{{ACPI_PTYPE2_COUNT,ACPI_RTYPE_INTEGER, 5,0}, 0,0}}, {{"_TSP", 0, ACPI_RTYPE_INTEGER}}, - {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5_int */ + {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int */ {{{ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5,0}, 0,0}}, {{"_TST", 0, ACPI_RTYPE_INTEGER}},
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 34/52 ACPICA: Add support for implicit notify on multiple devices
In reply to Len BrownFrom: Bob Moore <[email protected]>
Adds basic support to allow multiple devices to be implicitly notified.
This change is partially derived from original commit 981858b("ACPI /
ACPICA: Implicit notify for multiple devices") by Rafael.
--- drivers/acpi/acpica/aclocal.h | 11 ++++- drivers/acpi/acpica/evgpe.c | 22 ++++----- drivers/acpi/acpica/evgpeutil.c | 20 ++++++++ drivers/acpi/acpica/evxfgpe.c | 106 ++++++++++++++++++++++++++-------------- 4 files changed, 109 insertions(+), 50 deletions(-)
drivers/acpi/acpica/aclocal.h +9 -2
@@ -404,6 +404,13 @@ struct acpi_gpe_handler_info {u8 originally_enabled;/* True if GPE was originally enabled */ }; +/* Notify info for implicit notify, multiple device objects */ + +struct acpi_gpe_notify_info { +struct acpi_namespace_node *device_node;/* Device to be notified */ +struct acpi_gpe_notify_info *next; +}; +struct acpi_gpe_notify_object {struct acpi_namespace_node *node;struct acpi_gpe_notify_object *next;
@@ -412,7 +419,7 @@ struct acpi_gpe_notify_object {union acpi_gpe_dispatch_info {struct acpi_namespace_node *method_node;/* Method node for this GPE level */ struct acpi_gpe_handler_info *handler;/* Installed GPE handler */ -struct acpi_gpe_notify_object device;/* List of _PRW devices for implicit notify */ +struct acpi_gpe_notify_info *notify_list;/* List of _PRW devices for implicit notifies */ };/*
@@ -420,7 +427,7 @@ union acpi_gpe_dispatch_info {* NOTE: Important to keep this struct as small as possible. */ struct acpi_gpe_event_info { -union acpi_gpe_dispatch_info dispatch;/* Either Method or Handler */ +union acpi_gpe_dispatch_info dispatch;/* Either Method, Handler, or notify_list */ struct acpi_gpe_register_info *register_info;/* Backpointer to register info */ u8 flags;/* Misc info about this GPE */ u8 gpe_number;/* This GPE */
drivers/acpi/acpica/evgpe.c +11 -11
@@ -466,7 +466,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)acpi_status status;struct acpi_gpe_event_info *local_gpe_event_info;struct acpi_evaluate_info *info; -struct acpi_gpe_notify_object *notify_object; +struct acpi_gpe_notify_info *notify;ACPI_FUNCTION_TRACE (ev_asynch_execute_gpe_method);
@@ -517,17 +517,17 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)* completes. The notify handlers are NOT invoked synchronously * from this thread -- because handlers may in turn run other * control methods. +* +* June 2012: Expand implicit notify mechanism to support +* notifies on multiple device objects. */ - status =acpi_ev_queue_notify_request ( - local_gpe_event_info->dispatch.device.node, -ACPI_NOTIFY_DEVICE_WAKE ); - - notify_object = local_gpe_event_info->dispatch.device.next; -while (ACPI_SUCCESS (status) && notify_object) { - status =acpi_ev_queue_notify_request ( - notify_object->node, -ACPI_NOTIFY_DEVICE_WAKE ); - notify_object = notify_object->next; + notify = local_gpe_event_info->dispatch.notify_list; +while (ACPI_SUCCESS (status) && notify) { + status = +acpi_ev_queue_notify_request (notify->device_node, +ACPI_NOTIFY_DEVICE_WAKE ); + + notify = notify->next; }break ;
drivers/acpi/acpica/evgpeutil.c +20 -0
@@ -347,6 +347,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, void *context) {struct acpi_gpe_event_info *gpe_event_info; +struct acpi_gpe_notify_info *notify; +struct acpi_gpe_notify_info *next;u32 i;u32 j;
@@ -365,10 +367,28 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,if ((gpe_event_info->flags &ACPI_GPE_DISPATCH_MASK ) ==ACPI_GPE_DISPATCH_HANDLER ) { + +/* Delete an installed handler block */ +ACPI_FREE (gpe_event_info->dispatch.handler); gpe_event_info->dispatch.handler =NULL ; gpe_event_info->flags &= ~ACPI_GPE_DISPATCH_MASK ; + }else if ((gpe_event_info-> + flags &ACPI_GPE_DISPATCH_MASK ) == +ACPI_GPE_DISPATCH_NOTIFY ) { + +/* Delete the implicit notification device list */ + + notify = gpe_event_info->dispatch.notify_list; +while (notify) { + next = notify->next; +ACPI_FREE (notify); + notify = next; + } + gpe_event_info->dispatch.notify_list =NULL ; + gpe_event_info->flags &= + ~ACPI_GPE_DISPATCH_MASK ; } } }
drivers/acpi/acpica/evxfgpe.c +69 -37
144 lines not on this page · raw message
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 35/52 ACPICA: Update to version 20120620
In reply to Len BrownFrom: Bob Moore <[email protected]>
Version 20120620.
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -47,7 +47,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20120518 +#define ACPI_CA_VERSION 0x20120620#include "acconfig.h" #include "actypes.h"
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 36/52 ACPI: acpi_pad: tune round_robin_time
In reply to Len BrownFrom: Len Brown <[email protected]>
In an effort to be fair to bound processes, acpi_pad periodically moves its forced-idle threads.
The default interval for moving the threads is 10 seconds. Measurements show that reducing this to 1 second has no power or performance impact, so reduce default to 1 second.
--- drivers/acpi/acpi_pad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpi_pad.c +1 -1
@@ -144,7 +144,7 @@ static void exit_round_robin(unsigned int tsk_index) }static unsigned int idle_pct =5 ;/* percentage */ -static unsigned int round_robin_time =10 ;/* second */ +static unsigned int round_robin_time =1 ;/* second */ static int power_saving_thread (void *data) {struct sched_param param = {.sched_priority =1 };
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 37/52 ACPICA: Split exception code utilities to a new file, utexcep.c
In reply to Len BrownFrom: Bob Moore <[email protected]>
Simplifies sharing of these functions.
--- drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/acglobal.h | 8 --- drivers/acpi/acpica/utdecode.c | 35 ---------- drivers/acpi/acpica/utexcep.c | 153 +++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utmisc.c | 69 ------------------- include/acpi/acexcep.h | 5 +- 6 files changed, 157 insertions(+), 114 deletions(-) create mode 100644 drivers/acpi/acpica/utexcep.c
drivers/acpi/acpica/Makefile +1 -0
@@ -140,6 +140,7 @@ acpi-y += \ utaddress.o \ utalloc.o \ utcopy.o \ + utexcep.o \ utdebug.o \ utdecode.o \ utdelete.o \
drivers/acpi/acpica/acglobal.h +0 -8
@@ -326,14 +326,6 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];#endif -/* Exception codes */ - -extern char const *acpi_gbl_exception_names_env[]; -extern char const *acpi_gbl_exception_names_pgm[]; -extern char const *acpi_gbl_exception_names_tbl[]; -extern char const *acpi_gbl_exception_names_aml[]; -extern char const *acpi_gbl_exception_names_ctrl[]; -/***************************************************************************** * * Namespace globals
drivers/acpi/acpica/utdecode.c +0 -35
@@ -49,41 +49,6 @@#define _COMPONENT ACPI_UTILITIESACPI_MODULE_NAME ("utdecode" ) -/******************************************************************************* -* -* FUNCTION: acpi_format_exception -* -* PARAMETERS: Status - The acpi_status code to be formatted -* -* RETURN: A string containing the exception text. A valid pointer is -* always returned. -* -* DESCRIPTION: This function translates an ACPI exception into an ASCII string -* It is here instead of utxface.c so it is always present. -* - ******************************************************************************/ -const char *acpi_format_exception (acpi_status status) -{ -const char *exception =NULL ; - -ACPI_FUNCTION_ENTRY (); - - exception =acpi_ut_validate_exception (status); -if (!exception) { - -/* Exception code was not recognized */ - -ACPI_ERROR ((AE_INFO , -"Unknown exception code: 0x%8.8X" , status)); - - exception ="UNKNOWN_STATUS_CODE" ; - } - - return (ACPI_CAST_PTR(const char, exception)); -} - -ACPI_EXPORT_SYMBOL (acpi_format_exception) -/* * Properties of the ACPI Object Types, both internal and external. * The table is indexed by values of acpi_object_type
drivers/acpi/acpica/utexcep.c new file +153 -0
153 lines not on this page · raw message
drivers/acpi/acpica/utmisc.c +0 -69
75 lines not on this page · raw message
include/acpi/acexcep.h +3 -2
@@ -52,6 +52,7 @@#define AE_CODE_ACPI_TABLES 0x2000#define AE_CODE_AML 0x3000#define AE_CODE_CONTROL 0x4000 +#define AE_CODE_MAX 0x4000#define AE_CODE_MASK 0xF000#define ACPI_SUCCESS (a) (!(a))
@@ -181,7 +182,7 @@/* Exception strings for acpi_format_exception */ -#ifdef DEFINE_ACPI_GLOBALS +#ifdef ACPI_DEFINE_EXCEPTION_TABLE /* * String versions of the exception codes above
@@ -295,6 +296,6 @@ char const *acpi_gbl_exception_names_ctrl[] = {"AE_CTRL_PARSE_PENDING" }; -#endif /* ACPI GLOBALS */ +#endif /* EXCEPTION_TABLE */ #endif /* __ACEXCEP_H__ */
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 38/52 ACPICA: Add new interfaces for BIOS(firmware) errors and warnings
In reply to Len BrownFrom: Bob Moore <[email protected]>
These new interfaces will be deployed across ACPICA in order to point a finger directly at any detected BIOS issues -- such as issues with ACPI tables, etc.
https://www.acpica.org/bugzilla/show_bug.cgi?id=843
--- drivers/acpi/acpica/utxferror.c | 68 +++++++++++++++++++++++++++++++++++++++++ include/acpi/acoutput.h | 4 +++ include/acpi/acpixf.h | 8 +++++ 3 files changed, 80 insertions(+)
drivers/acpi/acpica/utxferror.c +68 -0
@@ -82,6 +82,8 @@ extern FILE *acpi_gbl_output_file;#define ACPI_MSG_EXCEPTION "ACPI Exception: "#define ACPI_MSG_WARNING "ACPI Warning: "#define ACPI_MSG_INFO "ACPI: " +#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Bug: Error: " +#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Bug: Warning: "/* * Common message suffix */
@@ -218,6 +220,72 @@ acpi_info(const char *module_name, u32 line_number, const char *format, ...)ACPI_EXPORT_SYMBOL (acpi_info) +/******************************************************************************* +* +* FUNCTION: acpi_bios_error +* +* PARAMETERS: module_name - Caller's module name (for error output) +* line_number - Caller's line number (for error output) +* format - Printf format string + additional args +* +* RETURN: None +* +* DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version +* info +* +******************************************************************************/ +void ACPI_INTERNAL_VAR_XFACE +acpi_bios_error (const char *module_name, +u32 line_number,const char *format, ...) +{ +va_list arg_list; + +ACPI_MSG_REDIRECT_BEGIN ; +acpi_os_printf (ACPI_MSG_BIOS_ERROR ); + +va_start (arg_list, format); +acpi_os_vprintf (format, arg_list); +ACPI_MSG_SUFFIX ; +va_end (arg_list); + +ACPI_MSG_REDIRECT_END ; +} + +ACPI_EXPORT_SYMBOL (acpi_bios_error) + +/******************************************************************************* +* +* FUNCTION: acpi_bios_warning +* +* PARAMETERS: module_name - Caller's module name (for error output) +* line_number - Caller's line number (for error output) +* format - Printf format string + additional args +* +* RETURN: None +* +* DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version +* info +* +******************************************************************************/ +void ACPI_INTERNAL_VAR_XFACE +acpi_bios_warning (const char *module_name, +u32 line_number,const char *format, ...) +{ +va_list arg_list; + +ACPI_MSG_REDIRECT_BEGIN ; +acpi_os_printf (ACPI_MSG_BIOS_WARNING ); + +va_start (arg_list, format); +acpi_os_vprintf (format, arg_list); +ACPI_MSG_SUFFIX ; +va_end (arg_list); + +ACPI_MSG_REDIRECT_END ; +} + +ACPI_EXPORT_SYMBOL (acpi_bios_warning) +/* * The remainder of this module contains internal error functions that may * be configured out.
include/acpi/acoutput.h +4 -0
@@ -213,6 +213,8 @@#define ACPI_WARNING (plist) acpi_warning plist#define ACPI_EXCEPTION (plist) acpi_exception plist#define ACPI_ERROR (plist) acpi_error plist +#define ACPI_BIOS_WARNING (plist) acpi_bios_warning plist +#define ACPI_BIOS_ERROR (plist) acpi_bios_error plist#define ACPI_DEBUG_OBJECT (obj,l,i) acpi_ex_do_debug_object(obj,l,i)#else
@@ -223,6 +225,8 @@#define ACPI_WARNING (plist)#define ACPI_EXCEPTION (plist)#define ACPI_ERROR (plist) +#define ACPI_BIOS_WARNING (plist) +#define ACPI_BIOS_ERROR (plist)#define ACPI_DEBUG_OBJECT (obj,l,i)#endif /* ACPI_NO_ERROR_MESSAGES */
include/acpi/acpixf.h +8 -0
@@ -529,6 +529,14 @@ void ACPI_INTERNAL_VAR_XFACE acpi_info(const char *module_name, u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); +void ACPI_INTERNAL_VAR_XFACE +acpi_bios_error(const char *module_name, + u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); + +void ACPI_INTERNAL_VAR_XFACE +acpi_bios_warning(const char *module_name, + u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); +/* * Debug output */
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 39/52 ACPICA: Table manager: deploy new firmware error/warning interfaces
In reply to Len BrownFrom: Bob Moore <[email protected]>
Emit firmware error/warning messages where appropriate for table and FADT errors.
--- drivers/acpi/acpica/tbfadt.c | 102 +++++++++++++++++++++-------------------- drivers/acpi/acpica/tbinstal.c | 15 +++--- drivers/acpi/acpica/tbutils.c | 34 ++++++++------ drivers/acpi/acpica/tbxfroot.c | 2 +- 4 files changed, 80 insertions(+), 73 deletions(-)
drivers/acpi/acpica/tbfadt.c +52 -50
@@ -303,11 +303,11 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)* a warning. */ if (length >sizeof (struct acpi_table_fadt )) { -ACPI_WARNING ((AE_INFO , -"FADT (revision %u) is longer than ACPI 5.0 version, " -"truncating length %u to %u" , - table->revision, length, - (u32 )sizeof (struct acpi_table_fadt ))); +ACPI_BIOS_WARNING ((AE_INFO , +"FADT (revision %u) is longer than ACPI 5.0 version, " +"truncating length %u to %u" , + table->revision, length, + (u32 )sizeof (struct acpi_table_fadt ))); }/* Clear the entire local FADT */
@@ -452,11 +452,13 @@ static void acpi_tb_convert_fadt(void)* they must match. */ if (address64->address && address32 && - (address64->address != (u64 ) address32)) { -ACPI_ERROR ((AE_INFO , -"32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32" , - fadt_info_table[i].name, address32, -ACPI_FORMAT_UINT64 (address64->address))); + (address64->address != (u64 )address32)) { +ACPI_BIOS_ERROR ((AE_INFO , +"32/64X address mismatch in FADT/%s: " +"0x%8.8X/0x%8.8X%8.8X, using 32" , + fadt_info_table[i].name, address32, +ACPI_FORMAT_UINT64 (address64-> + address))); }/* Always use 32-bit address if it is valid (non-null) */
@@ -511,25 +513,25 @@ static void acpi_tb_validate_fadt(void)* DSDT/X_DSDT) would indicate the presence of two FACS or two DSDT tables. */ if (acpi_gbl_FADT.facs && - (acpi_gbl_FADT.Xfacs != (u64 ) acpi_gbl_FADT.facs)) { -ACPI_WARNING ((AE_INFO , -"32/64X FACS address mismatch in FADT - " -"0x%8.8X/0x%8.8X%8.8X, using 32" , - acpi_gbl_FADT.facs, -ACPI_FORMAT_UINT64 (acpi_gbl_FADT.Xfacs))); - - acpi_gbl_FADT.Xfacs = (u64 ) acpi_gbl_FADT.facs; + (acpi_gbl_FADT.Xfacs != (u64 )acpi_gbl_FADT.facs)) { +ACPI_BIOS_WARNING ((AE_INFO , +"32/64X FACS address mismatch in FADT - " +"0x%8.8X/0x%8.8X%8.8X, using 32" , + acpi_gbl_FADT.facs, +ACPI_FORMAT_UINT64 (acpi_gbl_FADT.Xfacs))); + + acpi_gbl_FADT.Xfacs = (u64 )acpi_gbl_FADT.facs; }if (acpi_gbl_FADT.dsdt && - (acpi_gbl_FADT.Xdsdt != (u64 ) acpi_gbl_FADT.dsdt)) { -ACPI_WARNING ((AE_INFO , -"32/64X DSDT address mismatch in FADT - " -"0x%8.8X/0x%8.8X%8.8X, using 32" , - acpi_gbl_FADT.dsdt, -ACPI_FORMAT_UINT64 (acpi_gbl_FADT.Xdsdt))); - - acpi_gbl_FADT.Xdsdt = (u64 ) acpi_gbl_FADT.dsdt; + (acpi_gbl_FADT.Xdsdt != (u64 )acpi_gbl_FADT.dsdt)) { +ACPI_BIOS_WARNING ((AE_INFO , +"32/64X DSDT address mismatch in FADT - " +"0x%8.8X/0x%8.8X%8.8X, using 32" , + acpi_gbl_FADT.dsdt, +ACPI_FORMAT_UINT64 (acpi_gbl_FADT.Xdsdt))); + + acpi_gbl_FADT.Xdsdt = (u64 )acpi_gbl_FADT.dsdt; }/* If Hardware Reduced flag is set, we are all done */
@@ -559,10 +561,10 @@ static void acpi_tb_validate_fadt(void)*/ if (address64->address && (address64->bit_width !=ACPI_MUL_8 (length))) { -ACPI_WARNING ((AE_INFO , -"32/64X length mismatch in %s: %u/%u" , - name,ACPI_MUL_8 (length), - address64->bit_width)); +ACPI_BIOS_WARNING ((AE_INFO , +"32/64X length mismatch in FADT/%s: %u/%u" , + name,ACPI_MUL_8 (length), + address64->bit_width)); }if (fadt_info_table[i].type &ACPI_FADT_REQUIRED ) {
@@ -571,13 +573,13 @@ static void acpi_tb_validate_fadt(void)* Both the address and length must be non-zero. */ if (!address64->address || !length) { -ACPI_ERROR ((AE_INFO , -"Required field %s has zero address and/or length:" -" 0x%8.8X%8.8X/0x%X" , - name, -ACPI_FORMAT_UINT64 (address64-> - address), - length)); +ACPI_BIOS_ERROR ((AE_INFO , +"Required FADT field %s has zero address and/or length: " +"0x%8.8X%8.8X/0x%X" , + name, +ACPI_FORMAT_UINT64 (address64-> + address), + length)); } }else if (fadt_info_table[i].type &ACPI_FADT_SEPARATE_LENGTH ) {/*
@@ -587,13 +589,13 @@ static void acpi_tb_validate_fadt(void)*/ if ((address64->address && !length) || (!address64->address && length)) { -ACPI_WARNING ((AE_INFO , -"Optional field %s has zero address or length: " -"0x%8.8X%8.8X/0x%X" , - name, -ACPI_FORMAT_UINT64 (address64-> - address), - length)); +ACPI_BIOS_WARNING ((AE_INFO , +"Optional FADT field %s has zero address or length: " +"0x%8.8X%8.8X/0x%X" , + name, +ACPI_FORMAT_UINT64 + (address64->address), + length)); } } }
@@ -638,12 +640,12 @@ static void acpi_tb_setup_fadt_registers(void) (fadt_info_table[i].default_length > 0) && (fadt_info_table[i].default_length != target64->bit_width)) { -ACPI_WARNING ((AE_INFO , -"Invalid length for %s: %u, using default %u" , - fadt_info_table[i].name, - target64->bit_width, - fadt_info_table[i]. - default_length)); +ACPI_BIOS_WARNING ((AE_INFO , +"Invalid length for FADT/%s: %u, using default %u" , + fadt_info_table[i].name, + target64->bit_width, + fadt_info_table[i]. + default_length));/* Incorrect size, set width to the default */
drivers/acpi/acpica/tbinstal.c +8 -7
@@ -138,13 +138,14 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)if ((table_desc->pointer->signature[0 ] !=0x00 ) && (!ACPI_COMPARE_NAME (table_desc->pointer->signature,ACPI_SIG_SSDT )) && (ACPI_STRNCMP (table_desc->pointer->signature,"OEM" ,3 ))) { -ACPI_ERROR ((AE_INFO , -"Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx" , -acpi_ut_valid_acpi_name (*(u32 *)table_desc-> - pointer-> - signature) ? table_desc-> - pointer->signature :"????" , - *(u32 *)table_desc->pointer->signature)); +ACPI_BIOS_ERROR ((AE_INFO , +"Table has invalid signature [%4.4s] (0x%8.8X), " +"must be SSDT or OEMx" , +acpi_ut_valid_acpi_name (*(u32 *)table_desc-> + pointer-> + signature) ? + table_desc->pointer->signature :"????" , + *(u32 *)table_desc->pointer->signature));return_ACPI_STATUS (AE_BAD_SIGNATURE ); }
drivers/acpi/acpica/tbutils.c +19 -15
@@ -317,10 +317,11 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)/* Checksum ok? (should be zero) */ if (checksum) { -ACPI_WARNING ((AE_INFO , -"Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X" , - table->signature, table->checksum, - (u8) (table->checksum - checksum))); +ACPI_BIOS_WARNING ((AE_INFO , +"Incorrect checksum in table [%4.4s] - 0x%2.2X, " +"should be 0x%2.2X" , + table->signature, table->checksum, + (u8)(table->checksum - checksum)));#if (ACPI_CHECKSUM_ABORT )
@@ -377,8 +378,9 @@ void acpi_tb_check_dsdt_header(void)if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length || acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) { -ACPI_ERROR ((AE_INFO , -"The DSDT has been corrupted or replaced - old, new headers below" )); +ACPI_BIOS_ERROR ((AE_INFO , +"The DSDT has been corrupted or replaced - " +"old, new headers below" ));acpi_tb_print_table_header (0 , &acpi_gbl_original_dsdt_header);acpi_tb_print_table_header (0 , acpi_gbl_DSDT);
@@ -480,9 +482,10 @@ acpi_tb_install_table(acpi_physical_address address,/* If a particular signature is expected (DSDT/FACS), it must match */ if (signature && !ACPI_COMPARE_NAME (table->signature, signature)) { -ACPI_ERROR ((AE_INFO , -"Invalid signature 0x%X for ACPI table, expected [%s]" , - *ACPI_CAST_PTR (u32, table->signature), signature)); +ACPI_BIOS_ERROR ((AE_INFO , +"Invalid signature 0x%X for ACPI table, expected [%s]" , + *ACPI_CAST_PTR (u32, table->signature), + signature)); goto unmap_and_exit; }
@@ -589,10 +592,10 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)/* Will truncate 64-bit address to 32 bits, issue warning */ -ACPI_WARNING ((AE_INFO , -"64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X)," -" truncating" , - ACPI_FORMAT_UINT64(address64))); +ACPI_BIOS_WARNING ((AE_INFO , +"64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X)," +" truncating" , + ACPI_FORMAT_UINT64(address64))); }#endif return ((acpi_physical_address) (address64));
@@ -694,8 +697,9 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address)acpi_os_unmap_memory (table,sizeof (struct acpi_table_header ));if (length <sizeof (struct acpi_table_header )) { -ACPI_ERROR ((AE_INFO ,"Invalid length 0x%X in RSDT/XSDT" , - length)); +ACPI_BIOS_ERROR ((AE_INFO , +"Invalid table length 0x%X in RSDT/XSDT" , + length));return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH ); }
drivers/acpi/acpica/tbxfroot.c +1 -1
@@ -216,7 +216,7 @@ acpi_status acpi_find_root_pointer(acpi_size *table_address)/* A valid RSDP was not found */ -ACPI_ERROR ((AE_INFO ,"A valid RSDP was not found" )); +ACPI_BIOS_ERROR ((AE_INFO ,"A valid RSDP was not found" ));return_ACPI_STATUS (AE_NOT_FOUND ); }
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 40/52 ACPICA: Fix some comment fields
In reply to Len BrownFrom: Bob Moore <[email protected]>
No functional change. Fixes some typos and linux divergences.
--- drivers/acpi/acpica/acmacros.h | 4 ++-- drivers/acpi/acpica/acobject.h | 4 ++-- drivers/acpi/acpica/exprep.c | 4 ++-- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exstore.c | 4 ++-- drivers/acpi/acpica/exutils.c | 2 +- drivers/acpi/acpica/rscreate.c | 6 +++--- drivers/acpi/acpica/utglobal.c | 5 +++-- drivers/acpi/acpica/utobject.c | 6 +++--- 9 files changed, 19 insertions(+), 18 deletions(-)
drivers/acpi/acpica/acmacros.h +2 -2
@@ -283,8 +283,8 @@#define ACPI_INSERT_BITS (target, mask, source) target = ((target & (~(mask))) | (source & mask))/* -* A struct acpi_namespace_node can appear in some contexts -* where a pointer to a union acpi_operand_object can also +* An object of type struct acpi_namespace_node can appear in some contexts +* where a pointer to an object of type union acpi_operand_object can also * appear. This macro is used to distinguish them. * * The "Descriptor" field is the first field in both structures.
drivers/acpi/acpica/acobject.h +2 -2
@@ -113,8 +113,8 @@ struct acpi_object_integer { };/* -* Note: The String and Buffer object must be identical through the Pointer -* and length elements. There is code that depends on this. +* Note: The String and Buffer object must be identical through the +* pointer and length elements. There is code that depends on this. * * Fields common to both Strings and Buffers */
drivers/acpi/acpica/exprep.c +2 -2
@@ -395,8 +395,8 @@ acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc,* * RETURN: Status * -* DESCRIPTION: Construct a union acpi_operand_object of type def_field and -* connect it to the parent Node. +* DESCRIPTION: Construct an object of type union acpi_operand_object with a +* subtype of def_field and connect it to the parent Node. * ******************************************************************************/
drivers/acpi/acpica/exresolv.c +1 -1
@@ -147,7 +147,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, stack_desc = *stack_ptr; -/* This is a union acpi_operand_object */ +/* This is an object of type union acpi_operand_object */ switch (stack_desc->common.type) {case ACPI_TYPE_LOCAL_REFERENCE :
drivers/acpi/acpica/exstore.c +2 -2
@@ -62,8 +62,8 @@ acpi_ex_store_object_to_index(union acpi_operand_object *val_desc,* FUNCTION: acpi_ex_store * * PARAMETERS: *source_desc - Value to be stored -* *dest_desc - Where to store it. Must be an NS node -* or a union acpi_operand_object of type +* *dest_desc - Where to store it. Must be an NS node +* or union acpi_operand_object of type * Reference; * walk_state - Current walk state *
drivers/acpi/acpica/exutils.c +1 -1
@@ -109,7 +109,7 @@ void acpi_ex_enter_interpreter(void)* * DESCRIPTION: Reacquire the interpreter execution region from within the * interpreter code. Failure to enter the interpreter region is a -* fatal system error. Used in conjunction with +* fatal system error. Used in conjunction with * relinquish_interpreter * ******************************************************************************/
drivers/acpi/acpica/rscreate.c +3 -3
@@ -190,8 +190,8 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer,* * FUNCTION: acpi_rs_create_pci_routing_table * -* PARAMETERS: package_object - Pointer to a union acpi_operand_object -* package +* PARAMETERS: package_object - Pointer to a package containing one +* of more ACPI_OPERAND_OBJECTs * output_buffer - Pointer to the user's buffer * * RETURN: Status AE_OK if okay, else a valid acpi_status code.
@@ -199,7 +199,7 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer,* AE_BUFFER_OVERFLOW and output_buffer->Length will point * to the size buffer needed. * -* DESCRIPTION: Takes the union acpi_operand_object package and creates a +* DESCRIPTION: Takes the union acpi_operand_object package and creates a * linked list of PCI interrupt descriptions * * NOTE: It is the caller's responsibility to ensure that the start of the
drivers/acpi/acpica/utglobal.c +3 -2
@@ -247,8 +247,9 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =* * RETURN: Status * -* DESCRIPTION: Init library globals. All globals that require specific -* initialization should be initialized here! +* DESCRIPTION: Initialize ACPICA globals. All globals that require specific +* initialization should be initialized here. This allows for +* a warm restart. * ******************************************************************************/
drivers/acpi/acpica/utobject.c +3 -3
@@ -327,7 +327,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)* * RETURN: TRUE if object is valid, FALSE otherwise * -* DESCRIPTION: Validate a pointer to be a union acpi_operand_object +* DESCRIPTION: Validate a pointer to be of type union acpi_operand_object * ******************************************************************************/
@@ -348,7 +348,7 @@ u8 acpi_ut_valid_internal_object(void *object)switch (ACPI_GET_DESCRIPTOR_TYPE (object)) {case ACPI_DESC_TYPE_OPERAND : -/* The object appears to be a valid union acpi_operand_object */ +/* The object appears to be a valid union acpi_operand_object */ return (TRUE);
@@ -419,7 +419,7 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object) {ACPI_FUNCTION_TRACE_PTR (ut_delete_object_desc, object); -/* Object must be a union acpi_operand_object */ +/* Object must be a union acpi_operand_object */ if (ACPI_GET_DESCRIPTOR_TYPE (object) !=ACPI_DESC_TYPE_OPERAND ) { ACPI_ERROR((AE_INFO,
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 41/52 ACPICA: Add PCC address space to space ID decode function
In reply to Len BrownFrom: Bob Moore <[email protected]>
ACPI 5.0 added PCC space ID.
--- drivers/acpi/acpica/utdecode.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
drivers/acpi/acpica/utdecode.c +11 -10
@@ -129,16 +129,17 @@ char acpi_ut_hex_to_ascii_char(u64 integer, u32 position)/* Region type decoding */ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS ] = { -"SystemMemory" , -"SystemIO" , -"PCI_Config" , -"EmbeddedControl" , -"SMBus" , -"SystemCMOS" , -"PCIBARTarget" , -"IPMI" , -"GeneralPurposeIo" , -"GenericSerialBus" +"SystemMemory" ,/* 0x00 */ +"SystemIO" ,/* 0x01 */ +"PCI_Config" ,/* 0x02 */ +"EmbeddedControl" ,/* 0x03 */ +"SMBus" ,/* 0x04 */ +"SystemCMOS" ,/* 0x05 */ +"PCIBARTarget" ,/* 0x06 */ +"IPMI" ,/* 0x07 */ +"GeneralPurposeIo" ,/* 0x08 */ +"GenericSerialBus" ,/* 0x09 */ +"PCC" /* 0x0A */ };char *acpi_ut_get_region_name (u8 space_id)
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 42/52 ACPICA: Split file: tbxface.c -> tbxfload.c
In reply to Len BrownFrom: Bob Moore <[email protected]>
Split out the table load functions in preparation for addition of new interfaces.
--- drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/tbxface.c | 165 +------------------------------- drivers/acpi/acpica/tbxfload.c | 211 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+), 164 deletions(-) create mode 100644 drivers/acpi/acpica/tbxfload.c
drivers/acpi/acpica/Makefile +1 -0
@@ -134,6 +134,7 @@ acpi-y += \ tbinstal.o \ tbutils.o \ tbxface.o \ + tbxfload.o \ tbxfroot.o acpi-y += \
drivers/acpi/acpica/tbxface.c +1 -164
191 lines not on this page · raw message
drivers/acpi/acpica/tbxfload.c new file +211 -0
211 lines not on this page · raw message
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 43/52 ACPICA: Add new ACPI table load/unload external interfaces
In reply to Len BrownFrom: Bob Moore <[email protected]>
Add acpi_load_table and acpi_unload_parent_table to support host-directed dynamic table load/unload. Intended to support hotplug addition and removal of SSDTs.
--- drivers/acpi/acpica/tbxface.c | 42 ---------- drivers/acpi/acpica/tbxfload.c | 178 +++++++++++++++++++++++++++++++++++++++++ include/acpi/acpixf.h | 13 ++- 3 files changed, 187 insertions(+), 46 deletions(-)
drivers/acpi/acpica/tbxface.c +0 -42
@@ -215,48 +215,6 @@ acpi_status acpi_reallocate_root_table(void)/******************************************************************************* * -* FUNCTION: acpi_load_table -* -* PARAMETERS: table_ptr - pointer to a buffer containing the entire -* table to be loaded -* -* RETURN: Status -* -* DESCRIPTION: This function is called to load a table from the caller's -* buffer. The buffer must contain an entire ACPI Table including -* a valid header. The header fields will be verified, and if it -* is determined that the table is invalid, the call will fail. -* -******************************************************************************/ -acpi_status acpi_load_table (struct acpi_table_header *table_ptr) -{ -acpi_status status; -u32 table_index; -struct acpi_table_desc table_desc; - -if (!table_ptr) -return AE_BAD_PARAMETER ; - -ACPI_MEMSET (&table_desc,0 ,sizeof (struct acpi_table_desc )); - table_desc.pointer = table_ptr; - table_desc.length = table_ptr->length; - table_desc.flags =ACPI_TABLE_ORIGIN_UNKNOWN ; - -/* -* Install the new table into the local data structures -*/ - status =acpi_tb_add_table (&table_desc, &table_index); -if (ACPI_FAILURE (status)) { -return status; - } - status =acpi_ns_load_table (table_index, acpi_gbl_root_node); -return status; -} - -ACPI_EXPORT_SYMBOL (acpi_load_table) - -/******************************************************************************* -* * FUNCTION: acpi_get_table_header * * PARAMETERS: Signature - ACPI signature of needed table
drivers/acpi/acpica/tbxfload.c +178 -0
184 lines not on this page · raw message
include/acpi/acpixf.h +9 -4
@@ -154,15 +154,20 @@ void *acpi_callocate(u32 size);void acpi_free (void *address);/* -* ACPI table manipulation interfaces +* ACPI table load/unload interfaces */ -acpi_status acpi_reallocate_root_table (void ); +acpi_status acpi_load_table (struct acpi_table_header *table); -acpi_status acpi_find_root_pointer (acpi_size *rsdp_address); +acpi_status acpi_unload_parent_table (acpi_handle object);acpi_status acpi_load_tables (void ); -acpi_status acpi_load_table (struct acpi_table_header *table_ptr); +/* +* ACPI table manipulation interfaces +*/ +acpi_status acpi_reallocate_root_table (void ); + +acpi_status acpi_find_root_pointer (acpi_size *rsdp_address);acpi_status acpi_unload_table_id (acpi_owner_id id);
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 44/52 ACPICA: Update header files copyrights to 2012
In reply to Len BrownFrom: Bob Moore <[email protected]>
--- include/acpi/acexcep.h | 2 +- include/acpi/acnames.h | 2 +- include/acpi/acoutput.h | 2 +- include/acpi/acpi.h | 2 +- include/acpi/acpiosxf.h | 2 +- include/acpi/acpixf.h | 2 +- include/acpi/acrestyp.h | 2 +- include/acpi/actbl.h | 2 +- include/acpi/actbl1.h | 2 +- include/acpi/actbl2.h | 2 +- include/acpi/actbl3.h | 2 +- include/acpi/actypes.h | 2 +- include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acgcc.h | 2 +- include/acpi/platform/aclinux.h | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)
include/acpi/acexcep.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/acnames.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/acoutput.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/acpi.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/acpiosxf.h +1 -1
@@ -8,7 +8,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/acpixf.h +1 -1
@@ -6,7 +6,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/acrestyp.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/actbl.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/actbl1.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/actbl2.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/actbl3.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/actypes.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/platform/acenv.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/platform/acgcc.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
include/acpi/platform/aclinux.h +1 -1
@@ -5,7 +5,7 @@*****************************************************************************/ /* -* Copyright (C) 2000 - 2011, Intel Corp. +* Copyright (C) 2000 - 2012, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 45/52 ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
In reply to Len BrownFrom: Bob Moore <[email protected]>
Fixes issues like this:
i_aSL -> iASL
00-7_f -> 00-7Flocal_fADT -> local_FADTexecute_oSI -> execute_OSI
Also, in function headers, the parameters are now translated to lower case (with underscores if necessary.)
--- drivers/acpi/acpica/acevents.h | 2 +- drivers/acpi/acpica/aclocal.h | 4 ++-- drivers/acpi/acpica/acmacros.h | 2 +- drivers/acpi/acpica/acobject.h | 2 +- drivers/acpi/acpica/acpredef.h | 2 +- drivers/acpi/acpica/acstruct.h | 2 +- drivers/acpi/acpica/amlcode.h | 4 ++-- drivers/acpi/acpica/amlresrc.h | 4 ++-- drivers/acpi/acpica/dsargs.c | 2 +- drivers/acpi/acpica/dscontrol.c | 4 ++-- drivers/acpi/acpica/dsfield.c | 30 ++++++++++++++-------------- drivers/acpi/acpica/dsinit.c | 4 ++-- drivers/acpi/acpica/dsmethod.c | 6 +++--- drivers/acpi/acpica/dsmthdat.c | 32 +++++++++++++++--------------- drivers/acpi/acpica/dsobject.c | 14 ++++++------- drivers/acpi/acpica/dsopcode.c | 12 +++++------ drivers/acpi/acpica/dsutils.c | 6 +++--- drivers/acpi/acpica/dswscope.c | 4 ++-- drivers/acpi/acpica/dswstate.c | 20 +++++++++---------- drivers/acpi/acpica/evevent.c | 2 +- drivers/acpi/acpica/evglock.c | 4 ++-- drivers/acpi/acpica/evgpeblk.c | 2 +- drivers/acpi/acpica/evgpeutil.c | 2 +- drivers/acpi/acpica/evmisc.c | 6 +++--- drivers/acpi/acpica/evregion.c | 24 +++++++++++----------- drivers/acpi/acpica/evrgnini.c | 28 +++++++++++++------------- drivers/acpi/acpica/evsci.c | 4 ++-- drivers/acpi/acpica/evxface.c | 30 ++++++++++++++-------------- drivers/acpi/acpica/evxfevnt.c | 8 ++++---- drivers/acpi/acpica/evxfgpe.c | 6 +++--- drivers/acpi/acpica/evxfregn.c | 18 ++++++++--------- drivers/acpi/acpica/exconfig.c | 8 ++++---- drivers/acpi/acpica/exconvrt.c | 10 +++++----- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exdebug.c | 4 ++-- drivers/acpi/acpica/exdump.c | 22 ++++++++++----------- drivers/acpi/acpica/exfldio.c | 14 ++++++------- drivers/acpi/acpica/exmisc.c | 26 ++++++++++++------------ drivers/acpi/acpica/exmutex.c | 6 +++--- drivers/acpi/acpica/exprep.c | 2 +- drivers/acpi/acpica/exregion.c | 38 +++++++++++++++++------------------ drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 10 +++++----- drivers/acpi/acpica/exstore.c | 2 +- drivers/acpi/acpica/exstorob.c | 2 +- drivers/acpi/acpica/exsystem.c | 8 ++++---- drivers/acpi/acpica/exutils.c | 8 ++++---- drivers/acpi/acpica/hwacpi.c | 2 +- drivers/acpi/acpica/hwesleep.c | 6 +++--- drivers/acpi/acpica/hwregs.c | 22 ++++++++++----------- drivers/acpi/acpica/hwsleep.c | 6 +++--- drivers/acpi/acpica/hwtimer.c | 4 ++-- drivers/acpi/acpica/hwvalid.c | 4 ++-- drivers/acpi/acpica/hwxface.c | 12 +++++------ drivers/acpi/acpica/hwxfsleep.c | 6 +++--- drivers/acpi/acpica/nsaccess.c | 8 ++++---- drivers/acpi/acpica/nsalloc.c | 10 +++++----- drivers/acpi/acpica/nsdump.c | 18 ++++++++--------- drivers/acpi/acpica/nsdumpdv.c | 6 +++--- drivers/acpi/acpica/nseval.c | 10 +++++----- drivers/acpi/acpica/nsinit.c | 6 +++--- drivers/acpi/acpica/nsload.c | 4 ++-- drivers/acpi/acpica/nsnames.c | 10 +++++----- drivers/acpi/acpica/nsobject.c | 28 +++++++++++++------------- drivers/acpi/acpica/nspredef.c | 38 +++++++++++++++++------------------ drivers/acpi/acpica/nsrepair.c | 14 ++++++------- drivers/acpi/acpica/nsrepair2.c | 26 ++++++++++++------------ drivers/acpi/acpica/nssearch.c | 12 +++++------ drivers/acpi/acpica/nsutils.c | 26 ++++++++++++------------ drivers/acpi/acpica/nswalk.c | 8 ++++---- drivers/acpi/acpica/nsxfeval.c | 26 ++++++++++++------------ drivers/acpi/acpica/nsxfname.c | 16 +++++++-------- drivers/acpi/acpica/nsxfobj.c | 8 ++++---- drivers/acpi/acpica/psargs.c | 4 ++-- drivers/acpi/acpica/psloop.c | 16 +++++++-------- drivers/acpi/acpica/psopcode.c | 4 ++-- drivers/acpi/acpica/psparse.c | 6 +++--- drivers/acpi/acpica/psscope.c | 6 +++--- drivers/acpi/acpica/pstree.c | 14 ++++++------- drivers/acpi/acpica/psutils.c | 8 ++++---- drivers/acpi/acpica/psxface.c | 16 +++++++-------- drivers/acpi/acpica/rsaddr.c | 14 ++++++------- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/rsdump.c | 10 +++++----- drivers/acpi/acpica/rslist.c | 2 +- drivers/acpi/acpica/rsmisc.c | 22 ++++++++++----------- drivers/acpi/acpica/rsutils.c | 44 ++++++++++++++++++++--------------------- drivers/acpi/acpica/rsxface.c | 14 ++++++------- drivers/acpi/acpica/tbfadt.c | 10 +++++----- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 8 ++++---- drivers/acpi/acpica/tbutils.c | 24 +++++++++++----------- drivers/acpi/acpica/tbxface.c | 18 ++++++++--------- drivers/acpi/acpica/tbxfroot.c | 10 +++++----- drivers/acpi/acpica/utaddress.c | 10 +++++----- drivers/acpi/acpica/utalloc.c | 20 +++++++++---------- drivers/acpi/acpica/utcopy.c | 2 +- drivers/acpi/acpica/utdebug.c | 32 +++++++++++++++--------------- drivers/acpi/acpica/utdecode.c | 14 ++++++------- drivers/acpi/acpica/utdelete.c | 14 ++++++------- drivers/acpi/acpica/uteval.c | 6 +++--- drivers/acpi/acpica/utglobal.c | 2 +- drivers/acpi/acpica/utids.c | 2 +- drivers/acpi/acpica/utlock.c | 6 +++--- drivers/acpi/acpica/utmath.c | 4 ++-- drivers/acpi/acpica/utmisc.c | 38 +++++++++++++++++------------------ drivers/acpi/acpica/utmutex.c | 8 ++++---- drivers/acpi/acpica/utobject.c | 8 ++++---- drivers/acpi/acpica/utosi.c | 2 +- drivers/acpi/acpica/utresrc.c | 34 +++++++++++++++---------------- drivers/acpi/acpica/utstate.c | 16 +++++++-------- drivers/acpi/acpica/utxface.c | 18 ++++++++--------- drivers/acpi/acpica/utxferror.c | 22 ++++++++++----------- drivers/acpi/acpica/utxfmutex.c | 14 ++++++------- drivers/acpi/processor_idle.c | 12 +++++------ include/acpi/acrestyp.h | 4 ++-- include/acpi/actbl.h | 8 ++++---- include/acpi/actbl1.h | 8 ++++---- include/acpi/actbl2.h | 8 ++++---- include/acpi/actypes.h | 4 ++-- 120 files changed, 680 insertions(+), 680 deletions(-)
drivers/acpi/acpica/acevents.h +1 -1
@@ -237,7 +237,7 @@ u32 acpi_ev_install_sci_handler(void);acpi_status acpi_ev_remove_sci_handler (void ); -u32 acpi_ev_initialize_sCI (u32 program_sCI); +u32 acpi_ev_initialize_SCI (u32 program_SCI); ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void))#endif /* __ACEVENTS_H__ */
drivers/acpi/acpica/aclocal.h +2 -2
@@ -299,7 +299,7 @@ acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);* Information structure for ACPI predefined names. * Each entry in the table contains the following items: * -* Name - The ACPI reserved name +* name - The ACPI reserved name * param_count - Number of arguments to the method * expected_return_btypes - Allowed type(s) for the return value */
@@ -734,7 +734,7 @@ struct acpi_parse_obj_named {u32 name;/* 4-byte name or zero if no name */ }; -/* This version is used by the i_aSL compiler only */ +/* This version is used by the iASL compiler only */ #define ACPI_MAX_PARSEOP_NAME 20
drivers/acpi/acpica/acmacros.h +1 -1
@@ -62,7 +62,7 @@* printf() format helpers */ -/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */ +/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */ #define ACPI_FORMAT_UINT64 (i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
drivers/acpi/acpica/acobject.h +1 -1
@@ -381,7 +381,7 @@ struct acpi_object_cache_list {/****************************************************************************** * -* union acpi_operand_object Descriptor - a giant union of all of the above +* union acpi_operand_object descriptor - a giant union of all of the above * *****************************************************************************/
drivers/acpi/acpica/acpredef.h +1 -1
@@ -140,7 +140,7 @@ enum acpi_return_package_types {* * The main entries in the table each contain the following items: * -* Name - The ACPI reserved name +* name - The ACPI reserved name * param_count - Number of arguments to the method * expected_btypes - Allowed type(s) for the return value. * 0 means that no return value is expected.
drivers/acpi/acpica/acstruct.h +1 -1
@@ -68,7 +68,7 @@#define ACPI_WALK_METHOD 0x01#define ACPI_WALK_METHOD_RESTART 0x02 -/* Flags for i_aSL compiler only */ +/* Flags for iASL compiler only */ #define ACPI_WALK_CONST_REQUIRED 0x10#define ACPI_WALK_CONST_OPTIONAL 0x20
drivers/acpi/acpica/amlcode.h +2 -2
@@ -182,7 +182,7 @@/* * Combination opcodes (actually two one-byte opcodes) -* Used by the disassembler and i_aSL compiler +* Used by the disassembler and iASL compiler */ #define AML_LGREATEREQUAL_OP (u16) 0x9295#define AML_LLESSEQUAL_OP (u16) 0x9294
@@ -280,7 +280,7 @@/* Multiple/complex types */ -#define ARGI_DATAOBJECT 0x12/* Buffer, String, package or reference to a Node - Used only by size_of operator */ +#define ARGI_DATAOBJECT 0x12/* Buffer, String, package or reference to a node - Used only by size_of operator */ #define ARGI_COMPLEXOBJ 0x13/* Buffer, String, or package (Used by INDEX op only) */ #define ARGI_REF_OR_STRING 0x14/* Reference or String (Used by DEREFOF op only) */ #define ARGI_REGION_OR_BUFFER 0x15/* Used by LOAD op only */
drivers/acpi/acpica/amlresrc.h +2 -2
@@ -98,7 +98,7 @@#define ACPI_RESTAG_TRANSLATION "_TRA"#define ACPI_RESTAG_TRANSTYPE "_TRS"/* Sparse(1), Dense(0) */ #define ACPI_RESTAG_TYPE "_TTP"/* Translation(1), Static (0) */ -#define ACPI_RESTAG_XFERTYPE "_SIZ"/* 8(0), 8_and16(1), 16(2) */ +#define ACPI_RESTAG_XFERTYPE "_SIZ"/* 8(0), 8And16(1), 16(2) */ #define ACPI_RESTAG_VENDORDATA "_VEN"/* Default sizes for "small" resource descriptors */
@@ -235,7 +235,7 @@ AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON};struct aml_resource_extended_address64 {AML_RESOURCE_LARGE_HEADER_COMMON - AML_RESOURCE_ADDRESS_COMMON u8 revision_iD; + AML_RESOURCE_ADDRESS_COMMON u8 revision_ID;u8 reserved;u64 granularity;u64 minimum;
drivers/acpi/acpica/dsargs.c +1 -1
@@ -62,7 +62,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,* * FUNCTION: acpi_ds_execute_arguments * -* PARAMETERS: Node - Object NS node +* PARAMETERS: node - Object NS node * scope_node - Parent NS node * aml_length - Length of executable AML * aml_start - Pointer to the AML
drivers/acpi/acpica/dscontrol.c +2 -2
@@ -56,7 +56,7 @@ ACPI_MODULE_NAME("dscontrol")* FUNCTION: acpi_ds_exec_begin_control_op * * PARAMETERS: walk_list - The list that owns the walk stack -* Op - The control Op +* op - The control Op * * RETURN: Status *
@@ -153,7 +153,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_exec_end_control_op * * PARAMETERS: walk_list - The list that owns the walk stack -* Op - The control Op +* op - The control Op * * RETURN: Status *
drivers/acpi/acpica/dsfield.c +15 -15
@@ -71,13 +71,13 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,#ifdef ACPI_ASL_COMPILER /******************************************************************************* * -* FUNCTION: acpi_ds_create_external_region (i_aSL Disassembler only) +* FUNCTION: acpi_ds_create_external_region (iASL Disassembler only) * * PARAMETERS: lookup_status - Status from ns_lookup operation -* Op - Op containing the Field definition and args -* Path - Pathname of the region +* op - Op containing the Field definition and args +* path - Pathname of the region * ` walk_state - Current method state -* Node - Where the new region node is returned +* node - Where the new region node is returned * * RETURN: Status *
@@ -130,7 +130,7 @@ acpi_ds_create_external_region(acpi_status lookup_status,* * FUNCTION: acpi_ds_create_buffer_field * -* PARAMETERS: Op - Current parse op (create_xXField) +* PARAMETERS: op - Current parse op (create_XXField) * walk_state - Current state * * RETURN: Status
@@ -167,7 +167,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, arg =acpi_ps_get_arg (op,3 ); }else { -/* For all other create_xXXField operators, name is the 3rd argument */ +/* For all other create_XXXField operators, name is the 3rd argument */ arg =acpi_ps_get_arg (op,2 ); }
@@ -271,9 +271,9 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,* * FUNCTION: acpi_ds_get_field_names * -* PARAMETERS: Info - create_field info structure +* PARAMETERS: info - create_field info structure * ` walk_state - Current method state -* Arg - First parser arg for the field name list +* arg - First parser arg for the field name list * * RETURN: Status *
@@ -302,10 +302,10 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,while (arg) {/* * Four types of field elements are handled: -* 1) Name - Enters a new named field into the namespace -* 2) Offset - specifies a bit offset +* 1) name - Enters a new named field into the namespace +* 2) offset - specifies a bit offset * 3) access_as - changes the access mode/attributes -* 4) Connection - Associate a resource template with the field +* 4) connection - Associate a resource template with the field */ switch (arg->common.aml_opcode) {case AML_INT_RESERVEDFIELD_OP :
@@ -457,7 +457,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,* * FUNCTION: acpi_ds_create_field * -* PARAMETERS: Op - Op containing the Field definition and args +* PARAMETERS: op - Op containing the Field definition and args * region_node - Object for the containing Operation Region * ` walk_state - Current method state *
@@ -521,7 +521,7 @@ acpi_ds_create_field(union acpi_parse_object *op,* * FUNCTION: acpi_ds_init_field_objects * -* PARAMETERS: Op - Op containing the Field definition and args +* PARAMETERS: op - Op containing the Field definition and args * ` walk_state - Current method state * * RETURN: Status
@@ -636,7 +636,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,* * FUNCTION: acpi_ds_create_bank_field * -* PARAMETERS: Op - Op containing the Field definition and args +* PARAMETERS: op - Op containing the Field definition and args * region_node - Object for the containing Operation Region * walk_state - Current method state *
@@ -726,7 +726,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,* * FUNCTION: acpi_ds_create_index_field * -* PARAMETERS: Op - Op containing the Field definition and args +* PARAMETERS: op - Op containing the Field definition and args * region_node - Object for the containing Operation Region * ` walk_state - Current method state *
drivers/acpi/acpica/dsinit.c +2 -2
@@ -60,8 +60,8 @@ acpi_ds_init_one_object(acpi_handle obj_handle,* FUNCTION: acpi_ds_init_one_object * * PARAMETERS: obj_handle - Node for the object -* Level - Current nesting level -* Context - Points to a init info struct +* level - Current nesting level +* context - Points to a init info struct * return_value - Not used * * RETURN: Status
drivers/acpi/acpica/dsmethod.c +3 -3
@@ -61,7 +61,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc);* * FUNCTION: acpi_ds_method_error * -* PARAMETERS: Status - Execution status +* PARAMETERS: status - Execution status * walk_state - Current state * * RETURN: Status
@@ -306,9 +306,9 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,* * FUNCTION: acpi_ds_call_control_method * -* PARAMETERS: Thread - Info for this thread +* PARAMETERS: thread - Info for this thread * this_walk_state - Current walk state -* Op - Current Op to be walked +* op - Current Op to be walked * * RETURN: Status *
drivers/acpi/acpica/dsmthdat.c +16 -16
@@ -177,7 +177,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state)* * FUNCTION: acpi_ds_method_data_init_args * -* PARAMETERS: *Params - Pointer to a parameter list for the method +* PARAMETERS: *params - Pointer to a parameter list for the method * max_param_count - The arg count for this method * walk_state - Current walk state object *
@@ -232,11 +232,11 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,* * FUNCTION: acpi_ds_method_data_get_node * -* PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or +* PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or * ACPI_REFCLASS_ARG -* Index - Which Local or Arg whose type to get +* index - Which Local or Arg whose type to get * walk_state - Current walk state object -* Node - Where the node is returned. +* node - Where the node is returned. * * RETURN: Status and node *
@@ -296,10 +296,10 @@ acpi_ds_method_data_get_node(u8 type,* * FUNCTION: acpi_ds_method_data_set_value * -* PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or +* PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or * ACPI_REFCLASS_ARG -* Index - Which Local or Arg to get -* Object - Object to be inserted into the stack entry +* index - Which Local or Arg to get +* object - Object to be inserted into the stack entry * walk_state - Current walk state object * * RETURN: Status
@@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u8 type,* Increment ref count so object can't be deleted while installed. * NOTE: We do not copy the object in order to preserve the call by * reference semantics of ACPI Control Method invocation. -* (See ACPI Specification 2.0_c) +* (See ACPI Specification 2.0C) */ acpi_ut_add_reference (object);
@@ -350,9 +350,9 @@ acpi_ds_method_data_set_value(u8 type,* * FUNCTION: acpi_ds_method_data_get_value * -* PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or +* PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or * ACPI_REFCLASS_ARG -* Index - Which local_var or argument to get +* index - Which localVar or argument to get * walk_state - Current walk state object * dest_desc - Where Arg or Local value is returned *
@@ -458,9 +458,9 @@ acpi_ds_method_data_get_value(u8 type,* * FUNCTION: acpi_ds_method_data_delete_value * -* PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or +* PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or * ACPI_REFCLASS_ARG -* Index - Which local_var or argument to delete +* index - Which localVar or argument to delete * walk_state - Current walk state object * * RETURN: None
@@ -515,9 +515,9 @@ acpi_ds_method_data_delete_value(u8 type,* * FUNCTION: acpi_ds_store_object_to_local * -* PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or +* PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or * ACPI_REFCLASS_ARG -* Index - Which Local or Arg to set +* index - Which Local or Arg to set * obj_desc - Value to be stored * walk_state - Current walk state *
@@ -670,8 +670,8 @@ acpi_ds_store_object_to_local(u8 type,* * FUNCTION: acpi_ds_method_data_get_type * -* PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP -* Index - Which Local or Arg whose type to get +* PARAMETERS: opcode - Either AML_LOCAL_OP or AML_ARG_OP +* index - Which Local or Arg whose type to get * walk_state - Current walk state object * * RETURN: Data type of current value of the selected Arg or Local
drivers/acpi/acpica/dsobject.c +7 -7
@@ -64,7 +64,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_build_internal_object * * PARAMETERS: walk_state - Current walk state -* Op - Parser object to be translated +* op - Parser object to be translated * obj_desc_ptr - Where the ACPI internal object is returned * * RETURN: Status
@@ -250,7 +250,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_build_internal_buffer_obj * * PARAMETERS: walk_state - Current walk state -* Op - Parser object to be translated +* op - Parser object to be translated * buffer_length - Length of the buffer * obj_desc_ptr - Where the ACPI internal object is returned *
@@ -354,7 +354,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_build_internal_package_obj * * PARAMETERS: walk_state - Current walk state -* Op - Parser object to be translated +* op - Parser object to be translated * element_count - Number of elements in the package - this is * the num_elements argument to Package() * obj_desc_ptr - Where the ACPI internal object is returned
@@ -547,8 +547,8 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_create_node * * PARAMETERS: walk_state - Current walk state -* Node - NS Node to be initialized -* Op - Parser object to be translated +* node - NS Node to be initialized +* op - Parser object to be translated * * RETURN: Status *
@@ -611,8 +611,8 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_init_object_from_op * * PARAMETERS: walk_state - Current walk state -* Op - Parser op used to init the internal object -* Opcode - AML opcode associated with the object +* op - Parser op used to init the internal object +* opcode - AML opcode associated with the object * ret_obj_desc - Namespace object to be initialized * * RETURN: Status
drivers/acpi/acpica/dsopcode.c +6 -6
@@ -286,7 +286,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,* FUNCTION: acpi_ds_eval_buffer_field_operands * * PARAMETERS: walk_state - Current walk -* Op - A valid buffer_field Op object +* op - A valid buffer_field Op object * * RETURN: Status *
@@ -370,7 +370,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_eval_region_operands * * PARAMETERS: walk_state - Current walk -* Op - A valid region Op object +* op - A valid region Op object * * RETURN: Status *
@@ -397,7 +397,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,*/ node = op->common.node; -/* next_op points to the op that holds the space_iD */ +/* next_op points to the op that holds the space_ID */ next_op = op->common.value.arg;
@@ -461,7 +461,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_eval_table_region_operands * * PARAMETERS: walk_state - Current walk -* Op - A valid region Op object +* op - A valid region Op object * * RETURN: Status *
@@ -560,7 +560,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_eval_data_object_operands * * PARAMETERS: walk_state - Current walk -* Op - A valid data_object Op object +* op - A valid data_object Op object * obj_desc - data_object * * RETURN: Status
@@ -662,7 +662,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ds_eval_bank_field_operands * * PARAMETERS: walk_state - Current walk -* Op - A valid bank_field Op object +* op - A valid bank_field Op object * * RETURN: Status *
drivers/acpi/acpica/dsutils.c +3 -3
@@ -157,7 +157,7 @@ acpi_ds_do_implicit_return(union acpi_operand_object *return_desc,* * FUNCTION: acpi_ds_is_result_used * -* PARAMETERS: Op - Current Op +* PARAMETERS: op - Current Op * walk_state - Current State * * RETURN: TRUE if result is used, FALSE otherwise
@@ -323,7 +323,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,* * FUNCTION: acpi_ds_delete_result_if_not_used * -* PARAMETERS: Op - Current parse Op +* PARAMETERS: op - Current parse Op * result_obj - Result of the operation * walk_state - Current state *
@@ -445,7 +445,7 @@ void acpi_ds_clear_operands(struct acpi_walk_state *walk_state)* FUNCTION: acpi_ds_create_operand * * PARAMETERS: walk_state - Current walk state -* Arg - Parse object for the argument +* arg - Parse object for the argument * arg_index - Which argument (zero based) * * RETURN: Status
drivers/acpi/acpica/dswscope.c +2 -2
@@ -85,8 +85,8 @@ void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state)* * FUNCTION: acpi_ds_scope_stack_push * -* PARAMETERS: Node - Name to be made current -* Type - Type of frame being pushed +* PARAMETERS: node - Name to be made current +* type - Type of frame being pushed * walk_state - Current state * * RETURN: Status
drivers/acpi/acpica/dswstate.c +10 -10
@@ -58,7 +58,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *ws);* * FUNCTION: acpi_ds_result_pop * -* PARAMETERS: Object - Where to return the popped object +* PARAMETERS: object - Where to return the popped object * walk_state - Current Walk state * * RETURN: Status
@@ -132,7 +132,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,* * FUNCTION: acpi_ds_result_push * -* PARAMETERS: Object - Where to return the popped object +* PARAMETERS: object - Where to return the popped object * walk_state - Current Walk state * * RETURN: Status
@@ -296,7 +296,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state)* * FUNCTION: acpi_ds_obj_stack_push * -* PARAMETERS: Object - Object to push +* PARAMETERS: object - Object to push * walk_state - Current Walk state * * RETURN: Status
@@ -433,7 +433,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,* * FUNCTION: acpi_ds_get_current_walk_state * -* PARAMETERS: Thread - Get current active state for this Thread +* PARAMETERS: thread - Get current active state for this Thread * * RETURN: Pointer to the current walk state *
@@ -462,7 +462,7 @@ struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state* FUNCTION: acpi_ds_push_walk_state * * PARAMETERS: walk_state - State to push -* Thread - Thread state object +* thread - Thread state object * * RETURN: None *
@@ -486,7 +486,7 @@ acpi_ds_push_walk_state(struct acpi_walk_state *walk_state,* * FUNCTION: acpi_ds_pop_walk_state * -* PARAMETERS: Thread - Current thread state +* PARAMETERS: thread - Current thread state * * RETURN: A walk_state object popped from the thread's stack *
@@ -525,9 +525,9 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)* FUNCTION: acpi_ds_create_walk_state * * PARAMETERS: owner_id - ID for object creation -* Origin - Starting point for this walk +* origin - Starting point for this walk * method_desc - Method object -* Thread - Current thread state +* thread - Current thread state * * RETURN: Pointer to the new walk state. *
@@ -578,11 +578,11 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union* FUNCTION: acpi_ds_init_aml_walk * * PARAMETERS: walk_state - New state to be initialized -* Op - Current parse op +* op - Current parse op * method_node - Control method NS node, if any * aml_start - Start of AML * aml_length - Length of AML -* Info - Method info block (params, etc.) +* info - Method info block (params, etc.) * pass_number - 1, 2, or 3 * * RETURN: Status
drivers/acpi/acpica/evevent.c +1 -1
@@ -251,7 +251,7 @@ u32 acpi_ev_fixed_event_detect(void)* * FUNCTION: acpi_ev_fixed_event_dispatch * -* PARAMETERS: Event - Event type +* PARAMETERS: event - Event type * * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED *
drivers/acpi/acpica/evglock.c +2 -2
@@ -135,7 +135,7 @@ acpi_status acpi_ev_remove_global_lock_handler(void)* * FUNCTION: acpi_ev_global_lock_handler * -* PARAMETERS: Context - From thread interface, not used +* PARAMETERS: context - From thread interface, not used * * RETURN: ACPI_INTERRUPT_HANDLED *
@@ -182,7 +182,7 @@ static u32 acpi_ev_global_lock_handler(void *context)* * FUNCTION: acpi_ev_acquire_global_lock * -* PARAMETERS: Timeout - Max time to wait for the lock, in millisec. +* PARAMETERS: timeout - Max time to wait for the lock, in millisec. * * RETURN: Status *
drivers/acpi/acpica/evgpeblk.c +1 -1
@@ -318,7 +318,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)* FUNCTION: acpi_ev_create_gpe_block * * PARAMETERS: gpe_device - Handle to the parent GPE block -* gpe_block_address - Address and space_iD +* gpe_block_address - Address and space_ID * register_count - Number of GPE register pairs in the block * gpe_block_base_number - Starting GPE number for the block * interrupt_number - H/W interrupt for the block
drivers/acpi/acpica/evgpeutil.c +1 -1
@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("evgpeutil")* FUNCTION: acpi_ev_walk_gpe_list * * PARAMETERS: gpe_walk_callback - Routine called for each GPE block -* Context - Value passed to callback +* context - Value passed to callback * * RETURN: Status *
drivers/acpi/acpica/evmisc.c +3 -3
@@ -56,7 +56,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context);* * FUNCTION: acpi_ev_is_notify_object * -* PARAMETERS: Node - Node to check +* PARAMETERS: node - Node to check * * RETURN: TRUE if notifies allowed on this object *
@@ -86,7 +86,7 @@ u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node)* * FUNCTION: acpi_ev_queue_notify_request * -* PARAMETERS: Node - NS node for the notified object +* PARAMETERS: node - NS node for the notified object * notify_value - Value from the Notify() request * * RETURN: Status
@@ -181,7 +181,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,* * FUNCTION: acpi_ev_notify_dispatch * -* PARAMETERS: Context - To be passed to the notify handler +* PARAMETERS: context - To be passed to the notify handler * * RETURN: None. *
drivers/acpi/acpica/evregion.c +12 -12
@@ -150,7 +150,7 @@ acpi_status acpi_ev_install_region_handlers(void)* * FUNCTION: acpi_ev_has_default_handler * -* PARAMETERS: Node - Namespace node for the device +* PARAMETERS: node - Namespace node for the device * space_id - The address space ID * * RETURN: TRUE if default handler is installed, FALSE otherwise
@@ -244,7 +244,7 @@ acpi_status acpi_ev_initialize_op_regions(void)* FUNCTION: acpi_ev_execute_reg_method * * PARAMETERS: region_obj - Region object -* Function - Passed to _REG: On (1) or Off (0) +* function - Passed to _REG: On (1) or Off (0) * * RETURN: Status *
@@ -286,10 +286,10 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)/* * The _REG method has two arguments: * -* Arg0 - Integer: +* arg0 - Integer: * Operation region space ID Same value as region_obj->Region.space_id * -* Arg1 - Integer: +* arg1 - Integer: * connection status 1 for connecting the handler, 0 for disconnecting * the handler (Passed as a parameter) */
@@ -330,10 +330,10 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)* * PARAMETERS: region_obj - Internal region object * field_obj - Corresponding field. Can be NULL. -* Function - Read or Write operation +* function - Read or Write operation * region_offset - Where in the region to read or write * bit_width - Field width in bits (8, 16, 32, or 64) -* Value - Pointer to in or out value, must be +* value - Pointer to in or out value, must be * a full 64-bit integer * * RETURN: Status
@@ -840,11 +840,11 @@ acpi_ev_install_handler(acpi_handle obj_handle,* * FUNCTION: acpi_ev_install_space_handler * -* PARAMETERS: Node - Namespace node for the device +* PARAMETERS: node - Namespace node for the device * space_id - The address space ID -* Handler - Address of the handler -* Setup - Address of the setup function -* Context - Value passed to the handler on each access +* handler - Address of the handler +* setup - Address of the setup function +* context - Value passed to the handler on each access * * RETURN: Status *
@@ -1061,7 +1061,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,* * FUNCTION: acpi_ev_execute_reg_methods * -* PARAMETERS: Node - Namespace node for the device +* PARAMETERS: node - Namespace node for the device * space_id - The address space ID * * RETURN: Status
@@ -1104,7 +1104,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,* * PARAMETERS: walk_namespace callback * -* DESCRIPTION: Run _REG method for region objects of the requested space_iD +* DESCRIPTION: Run _REG method for region objects of the requested spaceID * ******************************************************************************/
drivers/acpi/acpica/evrgnini.c +14 -14
@@ -56,8 +56,8 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node);* * FUNCTION: acpi_ev_system_memory_region_setup * -* PARAMETERS: Handle - Region we are interested in -* Function - Start or stop +* PARAMETERS: handle - Region we are interested in +* function - Start or stop * handler_context - Address space handler context * region_context - Region specific context *
@@ -118,8 +118,8 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,* * FUNCTION: acpi_ev_io_space_region_setup * -* PARAMETERS: Handle - Region we are interested in -* Function - Start or stop +* PARAMETERS: handle - Region we are interested in +* function - Start or stop * handler_context - Address space handler context * region_context - Region specific context *
@@ -149,8 +149,8 @@ acpi_ev_io_space_region_setup(acpi_handle handle,* * FUNCTION: acpi_ev_pci_config_region_setup * -* PARAMETERS: Handle - Region we are interested in -* Function - Start or stop +* PARAMETERS: handle - Region we are interested in +* function - Start or stop * handler_context - Address space handler context * region_context - Region specific context *
@@ -338,7 +338,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,* * FUNCTION: acpi_ev_is_pci_root_bridge * -* PARAMETERS: Node - Device node being examined +* PARAMETERS: node - Device node being examined * * RETURN: TRUE if device is a PCI/PCI-Express Root Bridge *
@@ -393,14 +393,14 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)* * FUNCTION: acpi_ev_pci_bar_region_setup * -* PARAMETERS: Handle - Region we are interested in -* Function - Start or stop +* PARAMETERS: handle - Region we are interested in +* function - Start or stop * handler_context - Address space handler context * region_context - Region specific context * * RETURN: Status * -* DESCRIPTION: Setup a pci_bAR operation region +* DESCRIPTION: Setup a pci_BAR operation region * * MUTEX: Assumes namespace is not locked *
@@ -420,8 +420,8 @@ acpi_ev_pci_bar_region_setup(acpi_handle handle,* * FUNCTION: acpi_ev_cmos_region_setup * -* PARAMETERS: Handle - Region we are interested in -* Function - Start or stop +* PARAMETERS: handle - Region we are interested in +* function - Start or stop * handler_context - Address space handler context * region_context - Region specific context *
@@ -447,8 +447,8 @@ acpi_ev_cmos_region_setup(acpi_handle handle,* * FUNCTION: acpi_ev_default_region_setup * -* PARAMETERS: Handle - Region we are interested in -* Function - Start or stop +* PARAMETERS: handle - Region we are interested in +* function - Start or stop * handler_context - Address space handler context * region_context - Region specific context *
drivers/acpi/acpica/evsci.c +2 -2
@@ -56,7 +56,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context);* * FUNCTION: acpi_ev_sci_xrupt_handler * -* PARAMETERS: Context - Calling Context +* PARAMETERS: context - Calling Context * * RETURN: Status code indicates whether interrupt was handled. *
@@ -96,7 +96,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context)* * FUNCTION: acpi_ev_gpe_xrupt_handler * -* PARAMETERS: Context - Calling Context +* PARAMETERS: context - Calling Context * * RETURN: Status code indicates whether interrupt was handled. *
drivers/acpi/acpica/evxface.c +15 -15
@@ -342,7 +342,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler)* * FUNCTION: acpi_install_exception_handler * -* PARAMETERS: Handler - Pointer to the handler function for the +* PARAMETERS: handler - Pointer to the handler function for the * event * * RETURN: Status
@@ -386,8 +386,8 @@ ACPI_EXPORT_SYMBOL(acpi_install_exception_handler)* * FUNCTION: acpi_install_global_event_handler * -* PARAMETERS: Handler - Pointer to the global event handler function -* Context - Value passed to the handler on each event +* PARAMETERS: handler - Pointer to the global event handler function +* context - Value passed to the handler on each event * * RETURN: Status *
@@ -436,10 +436,10 @@ ACPI_EXPORT_SYMBOL(acpi_install_global_event_handler)* * FUNCTION: acpi_install_fixed_event_handler * -* PARAMETERS: Event - Event type to enable. -* Handler - Pointer to the handler function for the +* PARAMETERS: event - Event type to enable. +* handler - Pointer to the handler function for the * event -* Context - Value passed to the handler on each GPE +* context - Value passed to the handler on each GPE * * RETURN: Status *
@@ -506,8 +506,8 @@ ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler)* * FUNCTION: acpi_remove_fixed_event_handler * -* PARAMETERS: Event - Event type to disable. -* Handler - Address of the handler +* PARAMETERS: event - Event type to disable. +* handler - Address of the handler * * RETURN: Status *
@@ -563,10 +563,10 @@ ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler)* PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT * defined GPEs) * gpe_number - The GPE number within the GPE block -* Type - Whether this GPE should be treated as an +* type - Whether this GPE should be treated as an * edge- or level-triggered interrupt. -* Address - Address of the handler -* Context - Value passed to the handler on each GPE +* address - Address of the handler +* context - Value passed to the handler on each GPE * * RETURN: Status *
@@ -673,7 +673,7 @@ ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler)* PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT * defined GPEs) * gpe_number - The event to remove a handler -* Address - Address of the handler +* address - Address of the handler * * RETURN: Status *
@@ -769,8 +769,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_handler)* * FUNCTION: acpi_acquire_global_lock * -* PARAMETERS: Timeout - How long the caller is willing to wait -* Handle - Where the handle to the lock is returned +* PARAMETERS: timeout - How long the caller is willing to wait +* handle - Where the handle to the lock is returned * (if acquired) * * RETURN: Status
@@ -817,7 +817,7 @@ ACPI_EXPORT_SYMBOL(acpi_acquire_global_lock)* * FUNCTION: acpi_release_global_lock * -* PARAMETERS: Handle - Returned from acpi_acquire_global_lock +* PARAMETERS: handle - Returned from acpi_acquire_global_lock * * RETURN: Status *
drivers/acpi/acpica/evxfevnt.c +4 -4
@@ -153,8 +153,8 @@ ACPI_EXPORT_SYMBOL(acpi_disable)* * FUNCTION: acpi_enable_event * -* PARAMETERS: Event - The fixed eventto be enabled -* Flags - Reserved +* PARAMETERS: event - The fixed eventto be enabled +* flags - Reserved * * RETURN: Status *
@@ -265,7 +265,7 @@ ACPI_EXPORT_SYMBOL(acpi_disable_event)* * FUNCTION: acpi_clear_event * -* PARAMETERS: Event - The fixed event to be cleared +* PARAMETERS: event - The fixed event to be cleared * * RETURN: Status *
@@ -301,7 +301,7 @@ ACPI_EXPORT_SYMBOL(acpi_clear_event)* * FUNCTION: acpi_get_event_status * -* PARAMETERS: Event - The fixed event +* PARAMETERS: event - The fixed event * event_status - Where the current status of the event will * be returned *
drivers/acpi/acpica/evxfgpe.c +3 -3
@@ -315,7 +315,7 @@ ACPI_EXPORT_SYMBOL(acpi_setup_gpe_for_wake)* * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 * gpe_number - GPE level within the GPE block -* Action - Enable or Disable +* action - Enable or Disable * * RETURN: Status *
@@ -540,7 +540,7 @@ ACPI_EXPORT_SYMBOL(acpi_enable_all_runtime_gpes)* FUNCTION: acpi_install_gpe_block * * PARAMETERS: gpe_device - Handle to the parent GPE Block Device -* gpe_block_address - Address and space_iD +* gpe_block_address - Address and space_ID * register_count - Number of GPE register pairs in the block * interrupt_number - H/W interrupt for the block *
@@ -685,7 +685,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)* * FUNCTION: acpi_get_gpe_device * -* PARAMETERS: Index - System GPE index (0-current_gpe_count) +* PARAMETERS: index - System GPE index (0-current_gpe_count) * gpe_device - Where the parent GPE Device is returned * * RETURN: Status
drivers/acpi/acpica/evxfregn.c +9 -9
@@ -55,11 +55,11 @@ ACPI_MODULE_NAME("evxfregn")* * FUNCTION: acpi_install_address_space_handler * -* PARAMETERS: Device - Handle for the device +* PARAMETERS: device - Handle for the device * space_id - The address space ID -* Handler - Address of the handler -* Setup - Address of the setup function -* Context - Value passed to the handler on each access +* handler - Address of the handler +* setup - Address of the setup function +* context - Value passed to the handler on each access * * RETURN: Status *
@@ -112,16 +112,16 @@ acpi_install_address_space_handler(acpi_handle device, }/* -* For the default space_iDs, (the IDs for which there are default region handlers +* For the default space_IDs, (the IDs for which there are default region handlers * installed) Only execute the _REG methods if the global initialization _REG * methods have already been run (via acpi_initialize_objects). In other words, -* we will defer the execution of the _REG methods for these space_iDs until +* we will defer the execution of the _REG methods for these space_IDs until * execution of acpi_initialize_objects. This is done because we need the handlers * for the default spaces (mem/io/pci/table) to be installed before we can run * any control methods (or _REG methods). There is known BIOS code that depends * on this. * -* For all other space_iDs, we can safely execute the _REG methods immediately. +* For all other space_IDs, we can safely execute the _REG methods immediately. * This means that for IDs like embedded_controller, this function should be called * only after acpi_enable_subsystem has been called. */
@@ -157,9 +157,9 @@ ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler)* * FUNCTION: acpi_remove_address_space_handler * -* PARAMETERS: Device - Handle for the device +* PARAMETERS: device - Handle for the device * space_id - The address space ID -* Handler - Address of the handler +* handler - Address of the handler * * RETURN: Status *
drivers/acpi/acpica/exconfig.c +4 -4
@@ -66,7 +66,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc,* * FUNCTION: acpi_ex_add_table * -* PARAMETERS: Table - Pointer to raw table +* PARAMETERS: table - Pointer to raw table * parent_node - Where to load the table (scope) * ddb_handle - Where to return the table handle. *
@@ -276,8 +276,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ex_region_read * * PARAMETERS: obj_desc - Region descriptor -* Length - Number of bytes to read -* Buffer - Pointer to where to put the data +* length - Number of bytes to read +* buffer - Pointer to where to put the data * * RETURN: Status *
@@ -318,7 +318,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)* * PARAMETERS: obj_desc - Region or Buffer/Field where the table will be * obtained -* Target - Where a handle to the table will be stored +* target - Where a handle to the table will be stored * walk_state - Current state * * RETURN: Status
drivers/acpi/acpica/exconvrt.c +5 -5
@@ -60,7 +60,7 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 max_length);* PARAMETERS: obj_desc - Object to be converted. Must be an * Integer, Buffer, or String * result_desc - Where the new Integer object is returned -* Flags - Used for string conversion +* flags - Used for string conversion * * RETURN: Status *
@@ -272,9 +272,9 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,* * FUNCTION: acpi_ex_convert_to_ascii * -* PARAMETERS: Integer - Value to be converted -* Base - ACPI_STRING_DECIMAL or ACPI_STRING_HEX -* String - Where the string is returned +* PARAMETERS: integer - Value to be converted +* base - ACPI_STRING_DECIMAL or ACPI_STRING_HEX +* string - Where the string is returned * data_width - Size of data item to be converted, in bytes * * RETURN: Actual string length
@@ -385,7 +385,7 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)* PARAMETERS: obj_desc - Object to be converted. Must be an * Integer, Buffer, or String * result_desc - Where the string object is returned -* Type - String flags (base and conversion type) +* type - String flags (base and conversion type) * * RETURN: Status *
drivers/acpi/acpica/excreate.c +1 -1
@@ -369,7 +369,7 @@ acpi_ex_create_region(u8 * aml_start,* * DESCRIPTION: Create a new processor object and populate the fields * -* Processor (Name[0], cpu_iD[1], pblock_addr[2], pblock_length[3]) +* Processor (Name[0], cpu_ID[1], pblock_addr[2], pblock_length[3]) * ******************************************************************************/
drivers/acpi/acpica/exdebug.c +2 -2
@@ -54,8 +54,8 @@ ACPI_MODULE_NAME("exdebug")* FUNCTION: acpi_ex_do_debug_object * * PARAMETERS: source_desc - Object to be output to "Debug Object" -* Level - Indentation level (used for packages) -* Index - Current package element, zero if not pkg +* level - Indentation level (used for packages) +* index - Current package element, zero if not pkg * * RETURN: None *
drivers/acpi/acpica/exdump.c +11 -11
@@ -323,7 +323,7 @@ static struct acpi_exdump_info *acpi_ex_dump_info[] = {* FUNCTION: acpi_ex_dump_object * * PARAMETERS: obj_desc - Descriptor to dump -* Info - Info table corresponding to this object +* info - Info table corresponding to this object * type * * RETURN: None
@@ -449,7 +449,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,* FUNCTION: acpi_ex_dump_operand * * PARAMETERS: *obj_desc - Pointer to entry to be dumped -* Depth - Current nesting depth +* depth - Current nesting depth * * RETURN: None *
@@ -731,7 +731,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)* * FUNCTION: acpi_ex_dump_operands * -* PARAMETERS: Operands - A list of Operand objects +* PARAMETERS: operands - A list of Operand objects * opcode_name - AML opcode name * num_operands - Operand count for this opcode *
@@ -774,8 +774,8 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,* * FUNCTION: acpi_ex_out* functions * -* PARAMETERS: Title - Descriptive text -* Value - Value to be displayed +* PARAMETERS: title - Descriptive text +* value - Value to be displayed * * DESCRIPTION: Object dump output formatting functions. These functions * reduce the number of format strings required and keeps them
@@ -797,8 +797,8 @@ static void acpi_ex_out_pointer(char *title, void *value)* * FUNCTION: acpi_ex_dump_namespace_node * -* PARAMETERS: Node - Descriptor to dump -* Flags - Force display if TRUE +* PARAMETERS: node - Descriptor to dump +* flags - Force display if TRUE * * DESCRIPTION: Dumps the members of the given.Node *
@@ -830,7 +830,7 @@ void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags)* * FUNCTION: acpi_ex_dump_reference_obj * -* PARAMETERS: Object - Descriptor to dump +* PARAMETERS: object - Descriptor to dump * * DESCRIPTION: Dumps a reference object *
@@ -887,8 +887,8 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc)* FUNCTION: acpi_ex_dump_package_obj * * PARAMETERS: obj_desc - Descriptor to dump -* Level - Indentation Level -* Index - Package index for this object +* level - Indentation Level +* index - Package index for this object * * DESCRIPTION: Dumps the elements of the package *
@@ -980,7 +980,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,* FUNCTION: acpi_ex_dump_object_descriptor * * PARAMETERS: obj_desc - Descriptor to dump -* Flags - Force display if TRUE +* flags - Force display if TRUE * * DESCRIPTION: Dumps the members of the object descriptor given. *
drivers/acpi/acpica/exfldio.c +7 -7
@@ -222,9 +222,9 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,* PARAMETERS: obj_desc - Field to be read * field_datum_byte_offset - Byte offset of this datum within the * parent field -* Value - Where to store value (must at least +* value - Where to store value (must at least * 64 bits) -* Function - Read or Write flag plus other region- +* function - Read or Write flag plus other region- * dependent flags * * RETURN: Status
@@ -315,7 +315,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,* FUNCTION: acpi_ex_register_overflow * * PARAMETERS: obj_desc - Register(Field) to be written -* Value - Value to be stored +* value - Value to be stored * * RETURN: TRUE if value overflows the field, FALSE otherwise *
@@ -365,7 +365,7 @@ acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value)* PARAMETERS: obj_desc - Field to be read * field_datum_byte_offset - Byte offset of this datum within the * parent field -* Value - Where to store value (must be 64 bits) +* value - Where to store value (must be 64 bits) * read_write - Read or Write flag * * RETURN: Status
@@ -574,7 +574,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,* FUNCTION: acpi_ex_write_with_update_rule * * PARAMETERS: obj_desc - Field to be written -* Mask - bitmask within field datum +* mask - bitmask within field datum * field_value - Value to write * field_datum_byte_offset - Offset of datum within field *
@@ -678,7 +678,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,* FUNCTION: acpi_ex_extract_from_field * * PARAMETERS: obj_desc - Field to be read -* Buffer - Where to store the field data +* buffer - Where to store the field data * buffer_length - Length of Buffer * * RETURN: Status
@@ -823,7 +823,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,* FUNCTION: acpi_ex_insert_into_field * * PARAMETERS: obj_desc - Field to be written -* Buffer - Data to be written +* buffer - Data to be written * buffer_length - Length of Buffer * * RETURN: Status
drivers/acpi/acpica/exmisc.c +13 -13
@@ -144,8 +144,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,* * FUNCTION: acpi_ex_concat_template * -* PARAMETERS: Operand0 - First source object -* Operand1 - Second source object +* PARAMETERS: operand0 - First source object +* operand1 - Second source object * actual_return_desc - Where to place the return object * walk_state - Current walk state *
@@ -229,8 +229,8 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,* * FUNCTION: acpi_ex_do_concatenate * -* PARAMETERS: Operand0 - First source object -* Operand1 - Second source object +* PARAMETERS: operand0 - First source object +* operand1 - Second source object * actual_return_desc - Where to place the return object * walk_state - Current walk state *
@@ -397,9 +397,9 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,* * FUNCTION: acpi_ex_do_math_op * -* PARAMETERS: Opcode - AML opcode -* Integer0 - Integer operand #0 -* Integer1 - Integer operand #1 +* PARAMETERS: opcode - AML opcode +* integer0 - Integer operand #0 +* integer1 - Integer operand #1 * * RETURN: Integer result of the operation *
@@ -479,9 +479,9 @@ u64 acpi_ex_do_math_op(u16 opcode, u64 integer0, u64 integer1)* * FUNCTION: acpi_ex_do_logical_numeric_op * -* PARAMETERS: Opcode - AML opcode -* Integer0 - Integer operand #0 -* Integer1 - Integer operand #1 +* PARAMETERS: opcode - AML opcode +* integer0 - Integer operand #0 +* integer1 - Integer operand #1 * logical_result - TRUE/FALSE result of the operation * * RETURN: Status
@@ -534,9 +534,9 @@ acpi_ex_do_logical_numeric_op(u16 opcode,* * FUNCTION: acpi_ex_do_logical_op * -* PARAMETERS: Opcode - AML opcode -* Operand0 - operand #0 -* Operand1 - operand #1 +* PARAMETERS: opcode - AML opcode +* operand0 - operand #0 +* operand1 - operand #1 * logical_result - TRUE/FALSE result of the operation * * RETURN: Status
drivers/acpi/acpica/exmutex.c +3 -3
@@ -102,7 +102,7 @@ void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc)* FUNCTION: acpi_ex_link_mutex * * PARAMETERS: obj_desc - The mutex to be linked -* Thread - Current executing thread object +* thread - Current executing thread object * * RETURN: None *
@@ -138,7 +138,7 @@ acpi_ex_link_mutex(union acpi_operand_object *obj_desc,* * FUNCTION: acpi_ex_acquire_mutex_object * -* PARAMETERS: Timeout - Timeout in milliseconds +* PARAMETERS: timeout - Timeout in milliseconds * obj_desc - Mutex object * thread_id - Current thread state *
@@ -443,7 +443,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,* * FUNCTION: acpi_ex_release_all_mutexes * -* PARAMETERS: Thread - Current executing thread object +* PARAMETERS: thread - Current executing thread object * * RETURN: Status *
drivers/acpi/acpica/exprep.c +1 -1
@@ -391,7 +391,7 @@ acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc,* * FUNCTION: acpi_ex_prep_field_value * -* PARAMETERS: Info - Contains all field creation info +* PARAMETERS: info - Contains all field creation info * * RETURN: Status *
drivers/acpi/acpica/exregion.c +19 -19
@@ -53,10 +53,10 @@ ACPI_MODULE_NAME("exregion")* * FUNCTION: acpi_ex_system_memory_space_handler * -* PARAMETERS: Function - Read or Write operation -* Address - Where in the space to read or write +* PARAMETERS: function - Read or Write operation +* address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) -* Value - Pointer to in or out value +* value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region
@@ -270,10 +270,10 @@ acpi_ex_system_memory_space_handler(u32 function,* * FUNCTION: acpi_ex_system_io_space_handler * -* PARAMETERS: Function - Read or Write operation -* Address - Where in the space to read or write +* PARAMETERS: function - Read or Write operation +* address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) -* Value - Pointer to in or out value +* value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region
@@ -329,10 +329,10 @@ acpi_ex_system_io_space_handler(u32 function,* * FUNCTION: acpi_ex_pci_config_space_handler * -* PARAMETERS: Function - Read or Write operation -* Address - Where in the space to read or write +* PARAMETERS: function - Read or Write operation +* address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) -* Value - Pointer to in or out value +* value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region
@@ -365,7 +365,7 @@ acpi_ex_pci_config_space_handler(u32 function,* pci_function is the PCI device function number * pci_register is the Config space register range 0-255 bytes * -* Value - input value for write, output address for read +* value - input value for write, output address for read * */ pci_id = (struct acpi_pci_id *)region_context;
@@ -402,10 +402,10 @@ acpi_ex_pci_config_space_handler(u32 function,* * FUNCTION: acpi_ex_cmos_space_handler * -* PARAMETERS: Function - Read or Write operation -* Address - Where in the space to read or write +* PARAMETERS: function - Read or Write operation +* address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) -* Value - Pointer to in or out value +* value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region
@@ -434,10 +434,10 @@ acpi_ex_cmos_space_handler(u32 function,* * FUNCTION: acpi_ex_pci_bar_space_handler * -* PARAMETERS: Function - Read or Write operation -* Address - Where in the space to read or write +* PARAMETERS: function - Read or Write operation +* address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) -* Value - Pointer to in or out value +* value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region
@@ -466,10 +466,10 @@ acpi_ex_pci_bar_space_handler(u32 function,* * FUNCTION: acpi_ex_data_table_space_handler * -* PARAMETERS: Function - Read or Write operation -* Address - Where in the space to read or write +* PARAMETERS: function - Read or Write operation +* address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) -* Value - Pointer to in or out value +* value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region
drivers/acpi/acpica/exresolv.c +1 -1
@@ -321,7 +321,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,* FUNCTION: acpi_ex_resolve_multiple * * PARAMETERS: walk_state - Current state (contains AML opcode) -* Operand - Starting point for resolution +* operand - Starting point for resolution * return_type - Where the object type is returned * return_desc - Where the resolved object is returned *
drivers/acpi/acpica/exresop.c +5 -5
@@ -113,7 +113,7 @@ acpi_ex_check_object_type(acpi_object_type type_needed,* * FUNCTION: acpi_ex_resolve_operands * -* PARAMETERS: Opcode - Opcode being interpreted +* PARAMETERS: opcode - Opcode being interpreted * stack_ptr - Pointer to the operand stack to be * resolved * walk_state - Current state
@@ -307,7 +307,7 @@ acpi_ex_resolve_operands(u16 opcode,case ARGI_DEVICE_REF :case ARGI_TARGETREF :/* Allows implicit conversion rules before store */ case ARGI_FIXED_TARGET :/* No implicit conversion before store to target */ -case ARGI_SIMPLE_TARGET :/* Name, Local, or Arg - no implicit conversion */ +case ARGI_SIMPLE_TARGET :/* Name, Local, or arg - no implicit conversion */ /* * Need an operand of type ACPI_TYPE_LOCAL_REFERENCE
@@ -410,7 +410,7 @@ acpi_ex_resolve_operands(u16 opcode,/* * Need an operand of type ACPI_TYPE_INTEGER, * But we can implicitly convert from a STRING or BUFFER -* Aka - "Implicit Source Operand Conversion" +* aka - "Implicit Source Operand Conversion" */ status =acpi_ex_convert_to_integer (obj_desc, stack_ptr,16 );
@@ -437,7 +437,7 @@ acpi_ex_resolve_operands(u16 opcode,/* * Need an operand of type ACPI_TYPE_BUFFER, * But we can implicitly convert from a STRING or INTEGER -* Aka - "Implicit Source Operand Conversion" +* aka - "Implicit Source Operand Conversion" */ status =acpi_ex_convert_to_buffer (obj_desc, stack_ptr);if (ACPI_FAILURE (status)) {
@@ -463,7 +463,7 @@ acpi_ex_resolve_operands(u16 opcode,/* * Need an operand of type ACPI_TYPE_STRING, * But we can implicitly convert from a BUFFER or INTEGER -* Aka - "Implicit Source Operand Conversion" +* aka - "Implicit Source Operand Conversion" */ status =acpi_ex_convert_to_string (obj_desc, stack_ptr,ACPI_IMPLICIT_CONVERT_HEX );
drivers/acpi/acpica/exstore.c +1 -1
@@ -361,7 +361,7 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,* FUNCTION: acpi_ex_store_object_to_node * * PARAMETERS: source_desc - Value to be stored -* Node - Named object to receive the value +* node - Named object to receive the value * walk_state - Current walk state * implicit_conversion - Perform implicit conversion (yes/no) *
drivers/acpi/acpica/exstorob.c +1 -1
@@ -110,7 +110,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,* NOTE: ACPI versions up to 3.0 specified that the buffer must be * truncated if the string is smaller than the buffer. However, "other" * implementations of ACPI never did this and thus became the defacto -* standard. ACPI 3.0_a changes this behavior such that the buffer +* standard. ACPI 3.0A changes this behavior such that the buffer * is no longer truncated. */
drivers/acpi/acpica/exsystem.c +4 -4
@@ -53,8 +53,8 @@ ACPI_MODULE_NAME("exsystem")* * FUNCTION: acpi_ex_system_wait_semaphore * -* PARAMETERS: Semaphore - Semaphore to wait on -* Timeout - Max time to wait +* PARAMETERS: semaphore - Semaphore to wait on +* timeout - Max time to wait * * RETURN: Status *
@@ -98,8 +98,8 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout)* * FUNCTION: acpi_ex_system_wait_mutex * -* PARAMETERS: Mutex - Mutex to wait on -* Timeout - Max time to wait +* PARAMETERS: mutex - Mutex to wait on +* timeout - Max time to wait * * RETURN: Status *
drivers/acpi/acpica/exutils.c +4 -4
@@ -317,8 +317,8 @@ void acpi_ex_release_global_lock(u32 field_flags)* * FUNCTION: acpi_ex_digits_needed * -* PARAMETERS: Value - Value to be represented -* Base - Base of representation +* PARAMETERS: value - Value to be represented +* base - Base of representation * * RETURN: The number of digits. *
@@ -408,7 +408,7 @@ void acpi_ex_eisa_id_to_string(char *out_string, u64 compressed_id)* PARAMETERS: out_string - Where to put the converted string. At least * 21 bytes are needed to hold the largest * possible 64-bit integer. -* Value - Value to be converted +* value - Value to be converted * * RETURN: None, string *
@@ -443,7 +443,7 @@ void acpi_ex_integer_to_string(char *out_string, u64 value)* * RETURN: TRUE if valid/supported ID. * -* DESCRIPTION: Validate an operation region space_iD. +* DESCRIPTION: Validate an operation region space_ID. * ******************************************************************************/
drivers/acpi/acpica/hwacpi.c +1 -1
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("hwacpi")* * FUNCTION: acpi_hw_set_mode * -* PARAMETERS: Mode - SYS_MODE_ACPI or SYS_MODE_LEGACY +* PARAMETERS: mode - SYS_MODE_ACPI or SYS_MODE_LEGACY * * RETURN: Status *
drivers/acpi/acpica/hwesleep.c +3 -3
@@ -90,7 +90,7 @@ void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument)* FUNCTION: acpi_hw_extended_sleep * * PARAMETERS: sleep_state - Which sleep state to enter -* Flags - ACPI_EXECUTE_GTS to run optional method +* flags - ACPI_EXECUTE_GTS to run optional method * * RETURN: Status *
@@ -172,7 +172,7 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags)* FUNCTION: acpi_hw_extended_wake_prep * * PARAMETERS: sleep_state - Which sleep state we just exited -* Flags - ACPI_EXECUTE_BFS to run optional method +* flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status *
@@ -213,7 +213,7 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags)* FUNCTION: acpi_hw_extended_wake * * PARAMETERS: sleep_state - Which sleep state we just exited -* Flags - Reserved, set to zero +* flags - Reserved, set to zero * * RETURN: Status *
drivers/acpi/acpica/hwregs.c +11 -11
@@ -69,9 +69,9 @@ acpi_hw_write_multiple(u32 value,* * FUNCTION: acpi_hw_validate_register * -* PARAMETERS: Reg - GAS register structure +* PARAMETERS: reg - GAS register structure * max_bit_width - Max bit_width supported (32 or 64) -* Address - Pointer to where the gas->address +* address - Pointer to where the gas->address * is returned * * RETURN: Status
@@ -102,7 +102,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,return (AE_BAD_ADDRESS ); } -/* Validate the space_iD */ +/* Validate the space_ID */ if ((reg->space_id !=ACPI_ADR_SPACE_SYSTEM_MEMORY ) && (reg->space_id !=ACPI_ADR_SPACE_SYSTEM_IO )) {
@@ -137,8 +137,8 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,* * FUNCTION: acpi_hw_read * -* PARAMETERS: Value - Where the value is returned -* Reg - GAS register structure +* PARAMETERS: value - Where the value is returned +* reg - GAS register structure * * RETURN: Status *
@@ -148,7 +148,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,* * LIMITATIONS: <These limitations also apply to acpi_hw_write> * bit_width must be exactly 8, 16, or 32. -* space_iD must be system_memory or system_iO. +* space_ID must be system_memory or system_IO. * bit_offset and access_width are currently ignored, as there has * not been a need to implement these. *
@@ -200,8 +200,8 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)* * FUNCTION: acpi_hw_write * -* PARAMETERS: Value - Value to be written -* Reg - GAS register structure +* PARAMETERS: value - Value to be written +* reg - GAS register structure * * RETURN: Status *
@@ -439,7 +439,7 @@ acpi_hw_register_read(u32 register_id, u32 * return_value)* FUNCTION: acpi_hw_register_write * * PARAMETERS: register_id - ACPI Register ID -* Value - The value to write +* value - The value to write * * RETURN: Status *
@@ -571,7 +571,7 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)* * FUNCTION: acpi_hw_read_multiple * -* PARAMETERS: Value - Where the register value is returned +* PARAMETERS: value - Where the register value is returned * register_a - First ACPI register (required) * register_b - Second ACPI register (optional) *
@@ -624,7 +624,7 @@ acpi_hw_read_multiple(u32 *value,* * FUNCTION: acpi_hw_write_multiple * -* PARAMETERS: Value - The value to write +* PARAMETERS: value - The value to write * register_a - First ACPI register (required) * register_b - Second ACPI register (optional) *
drivers/acpi/acpica/hwsleep.c +3 -3
@@ -56,7 +56,7 @@ ACPI_MODULE_NAME("hwsleep")* FUNCTION: acpi_hw_legacy_sleep * * PARAMETERS: sleep_state - Which sleep state to enter -* Flags - ACPI_EXECUTE_GTS to run optional method +* flags - ACPI_EXECUTE_GTS to run optional method * * RETURN: Status *
@@ -226,7 +226,7 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags)* FUNCTION: acpi_hw_legacy_wake_prep * * PARAMETERS: sleep_state - Which sleep state we just exited -* Flags - ACPI_EXECUTE_BFS to run optional method +* flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status *
@@ -300,7 +300,7 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags)* FUNCTION: acpi_hw_legacy_wake * * PARAMETERS: sleep_state - Which sleep state we just exited -* Flags - Reserved, set to zero +* flags - Reserved, set to zero * * RETURN: Status *
drivers/acpi/acpica/hwtimer.c +2 -2
@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("hwtimer")* * FUNCTION: acpi_get_timer_resolution * -* PARAMETERS: Resolution - Where the resolution is returned +* PARAMETERS: resolution - Where the resolution is returned * * RETURN: Status and timer resolution *
@@ -84,7 +84,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution)* * FUNCTION: acpi_get_timer * -* PARAMETERS: Ticks - Where the timer value is returned +* PARAMETERS: ticks - Where the timer value is returned * * RETURN: Status and current timer value (ticks) *
drivers/acpi/acpica/hwvalid.c +2 -2
@@ -58,7 +58,7 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width);* * The table is used to implement the Microsoft port access rules that * first appeared in Windows XP. Some ports are always illegal, and some -* ports are only illegal if the BIOS calls _OSI with a win_xP string or +* ports are only illegal if the BIOS calls _OSI with a win_XP string or * later (meaning that the BIOS itelf is post-XP.) * * This provides ACPICA with the desired port protections and
@@ -66,7 +66,7 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width);* * Description of port entries: * DMA: DMA controller -* PIC0: Programmable Interrupt Controller (8259_a) +* PIC0: Programmable Interrupt Controller (8259A) * PIT1: System Timer 1 * PIT2: System Timer 2 failsafe * RTC: Real-time clock
drivers/acpi/acpica/hwxface.c +6 -6
@@ -104,8 +104,8 @@ ACPI_EXPORT_SYMBOL(acpi_reset)* * FUNCTION: acpi_read * -* PARAMETERS: Value - Where the value is returned -* Reg - GAS register structure +* PARAMETERS: value - Where the value is returned +* reg - GAS register structure * * RETURN: Status *
@@ -113,7 +113,7 @@ ACPI_EXPORT_SYMBOL(acpi_reset)* * LIMITATIONS: <These limitations also apply to acpi_write> * bit_width must be exactly 8, 16, 32, or 64. -* space_iD must be system_memory or system_iO. +* space_ID must be system_memory or system_IO. * bit_offset and access_width are currently ignored, as there has * not been a need to implement these. *
@@ -196,8 +196,8 @@ ACPI_EXPORT_SYMBOL(acpi_read)* * FUNCTION: acpi_write * -* PARAMETERS: Value - Value to be written -* Reg - GAS register structure +* PARAMETERS: value - Value to be written +* reg - GAS register structure * * RETURN: Status *
@@ -441,7 +441,7 @@ ACPI_EXPORT_SYMBOL(acpi_write_bit_register)* *sleep_type_a - Where SLP_TYPa is returned * *sleep_type_b - Where SLP_TYPb is returned * -* RETURN: Status - ACPI status +* RETURN: status - ACPI status * * DESCRIPTION: Obtain the SLP_TYPa and SLP_TYPb values for the requested sleep * state.
drivers/acpi/acpica/hwxfsleep.c +3 -3
@@ -205,7 +205,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)ACPI_FLUSH_CPU_CACHE (); status =acpi_hw_write_port (acpi_gbl_FADT.smi_command, - (u32 )acpi_gbl_FADT.S4bios_request,8 ); + (u32 )acpi_gbl_FADT.s4_bios_request,8 ); do { acpi_os_stall(1000);
@@ -349,7 +349,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)* FUNCTION: acpi_enter_sleep_state * * PARAMETERS: sleep_state - Which sleep state to enter -* Flags - ACPI_EXECUTE_GTS to run optional method +* flags - ACPI_EXECUTE_GTS to run optional method * * RETURN: Status *
@@ -382,7 +382,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state)* FUNCTION: acpi_leave_sleep_state_prep * * PARAMETERS: sleep_state - Which sleep state we are exiting -* Flags - ACPI_EXECUTE_BFS to run optional method +* flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status *
drivers/acpi/acpica/nsaccess.c +4 -4
@@ -157,7 +157,7 @@ acpi_status acpi_ns_root_initialize(void)#if defined (ACPI_ASL_COMPILER ) -/* Save the parameter count for the i_aSL compiler */ +/* Save the parameter count for the iASL compiler */ new_node->value = obj_desc->method.param_count;#else
@@ -258,11 +258,11 @@ acpi_status acpi_ns_root_initialize(void)* FUNCTION: acpi_ns_lookup * * PARAMETERS: scope_info - Current scope info block -* Pathname - Search pathname, in internal format +* pathname - Search pathname, in internal format * (as represented in the AML stream) -* Type - Type associated with name +* type - Type associated with name * interpreter_mode - IMODE_LOAD_PASS2 => add name if not found -* Flags - Flags describing the search restrictions +* flags - Flags describing the search restrictions * walk_state - Current state of the walk * return_node - Where the Node is placed (if found * or created successfully)
drivers/acpi/acpica/nsalloc.c +5 -5
@@ -52,7 +52,7 @@ ACPI_MODULE_NAME("nsalloc")* * FUNCTION: acpi_ns_create_node * -* PARAMETERS: Name - Name of the new node (4 char ACPI name) +* PARAMETERS: name - Name of the new node (4 char ACPI name) * * RETURN: New namespace node (Null on failure) *
@@ -92,7 +92,7 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name)* * FUNCTION: acpi_ns_delete_node * -* PARAMETERS: Node - Node to be deleted +* PARAMETERS: node - Node to be deleted * * RETURN: None *
@@ -143,7 +143,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node)* * FUNCTION: acpi_ns_remove_node * -* PARAMETERS: Node - Node to be removed/deleted +* PARAMETERS: node - Node to be removed/deleted * * RETURN: None *
@@ -196,8 +196,8 @@ void acpi_ns_remove_node(struct acpi_namespace_node *node)* * PARAMETERS: walk_state - Current state of the walk * parent_node - The parent of the new Node -* Node - The new Node to install -* Type - ACPI object type of the new Node +* node - The new Node to install +* type - ACPI object type of the new Node * * RETURN: None *
drivers/acpi/acpica/nsdump.c +9 -9
@@ -63,7 +63,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,* FUNCTION: acpi_ns_print_pathname * * PARAMETERS: num_segments - Number of ACPI name segments -* Pathname - The compressed (internal) path +* pathname - The compressed (internal) path * * RETURN: None *
@@ -107,10 +107,10 @@ void acpi_ns_print_pathname(u32 num_segments, char *pathname)* * FUNCTION: acpi_ns_dump_pathname * -* PARAMETERS: Handle - Object -* Msg - Prefix message -* Level - Desired debug level -* Component - Caller's component ID +* PARAMETERS: handle - Object +* msg - Prefix message +* level - Desired debug level +* component - Caller's component ID * * RETURN: None *
@@ -143,8 +143,8 @@ acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component)* FUNCTION: acpi_ns_dump_one_object * * PARAMETERS: obj_handle - Node to be dumped -* Level - Nesting level of the handle -* Context - Passed into walk_namespace +* level - Nesting level of the handle +* context - Passed into walk_namespace * return_value - Not used * * RETURN: Status
@@ -615,7 +615,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,* * FUNCTION: acpi_ns_dump_objects * -* PARAMETERS: Type - Object type to be dumped +* PARAMETERS: type - Object type to be dumped * display_type - 0 or ACPI_DISPLAY_SUMMARY * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX * for an effectively unlimited depth.
@@ -671,7 +671,7 @@ acpi_ns_dump_objects(acpi_object_type type,* * FUNCTION: acpi_ns_dump_entry * -* PARAMETERS: Handle - Node to be dumped +* PARAMETERS: handle - Node to be dumped * debug_level - Output level * * RETURN: None
drivers/acpi/acpica/nsdumpdv.c +3 -3
@@ -55,9 +55,9 @@ ACPI_MODULE_NAME("nsdumpdv")* * FUNCTION: acpi_ns_dump_one_device * -* PARAMETERS: Handle - Node to be dumped -* Level - Nesting level of the handle -* Context - Passed into walk_namespace +* PARAMETERS: handle - Node to be dumped +* level - Nesting level of the handle +* context - Passed into walk_namespace * return_value - Not used * * RETURN: Status
drivers/acpi/acpica/nseval.c +5 -5
@@ -59,11 +59,11 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,* * FUNCTION: acpi_ns_evaluate * -* PARAMETERS: Info - Evaluation info block, contains: +* PARAMETERS: info - Evaluation info block, contains: * prefix_node - Prefix or Method/Object Node to execute -* Pathname - Name of method to execute, If NULL, the +* pathname - Name of method to execute, If NULL, the * Node is the object to execute -* Parameters - List of parameters to pass to the method, +* parameters - List of parameters to pass to the method, * terminated by NULL. Params itself may be * NULL if no parameters are being passed. * return_object - Where to put method's return value (if
@@ -71,7 +71,7 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,* parameter_type - Type of Parameter list * return_object - Where to put method's return value (if * any). If NULL, no value is returned. -* Flags - ACPI_IGNORE_RETURN_VALUE to delete return +* flags - ACPI_IGNORE_RETURN_VALUE to delete return * * RETURN: Status *
@@ -351,7 +351,7 @@ void acpi_ns_exec_module_code_list(void)* FUNCTION: acpi_ns_exec_module_code * * PARAMETERS: method_obj - Object container for the module-level code -* Info - Info block for method evaluation +* info - Info block for method evaluation * * RETURN: None. Exceptions during method execution are ignored, since * we cannot abort a table load.
drivers/acpi/acpica/nsinit.c +3 -3
@@ -224,8 +224,8 @@ acpi_status acpi_ns_initialize_devices(void)* FUNCTION: acpi_ns_init_one_object * * PARAMETERS: obj_handle - Node -* Level - Current nesting level -* Context - Points to a init info struct +* level - Current nesting level +* context - Points to a init info struct * return_value - Not used * * RETURN: Status
@@ -530,7 +530,7 @@ acpi_ns_init_one_device(acpi_handle obj_handle,* we will not run _INI, but we continue to examine the children * of this device. * -* From the ACPI spec, description of _STA: (Note - no mention +* From the ACPI spec, description of _STA: (note - no mention * of whether to run _INI or not on the device in question) * * "_STA may return bit 0 clear (not present) with bit 3 set
drivers/acpi/acpica/nsload.c +2 -2
@@ -63,7 +63,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle);* FUNCTION: acpi_ns_load_table * * PARAMETERS: table_index - Index for table to be loaded -* Node - Owning NS node +* node - Owning NS node * * RETURN: Status *
@@ -278,7 +278,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle)* * FUNCTION: acpi_ns_unload_name_space * -* PARAMETERS: Handle - Root of namespace subtree to be deleted +* PARAMETERS: handle - Root of namespace subtree to be deleted * * RETURN: Status *
drivers/acpi/acpica/nsnames.c +5 -5
@@ -53,8 +53,8 @@ ACPI_MODULE_NAME("nsnames")* * FUNCTION: acpi_ns_build_external_path * -* PARAMETERS: Node - NS node whose pathname is needed -* Size - Size of the pathname +* PARAMETERS: node - NS node whose pathname is needed +* size - Size of the pathname * *name_buffer - Where to return the pathname * * RETURN: Status
@@ -120,7 +120,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node,* * FUNCTION: acpi_ns_get_external_pathname * -* PARAMETERS: Node - Namespace node whose pathname is needed +* PARAMETERS: node - Namespace node whose pathname is needed * * RETURN: Pointer to storage containing the fully qualified name of * the node, In external format (name segments separated by path
@@ -168,7 +168,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)* * FUNCTION: acpi_ns_get_pathname_length * -* PARAMETERS: Node - Namespace node +* PARAMETERS: node - Namespace node * * RETURN: Length of path, including prefix *
@@ -214,7 +214,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node)* * PARAMETERS: target_handle - Handle of named object whose name is * to be found -* Buffer - Where the pathname is returned +* buffer - Where the pathname is returned * * RETURN: Status, Buffer is filled with pathname if status is AE_OK *
drivers/acpi/acpica/nsobject.c +14 -14
@@ -53,9 +53,9 @@ ACPI_MODULE_NAME("nsobject")* * FUNCTION: acpi_ns_attach_object * -* PARAMETERS: Node - Parent Node -* Object - Object to be attached -* Type - Type of object, or ACPI_TYPE_ANY if not +* PARAMETERS: node - Parent Node +* object - Object to be attached +* type - Type of object, or ACPI_TYPE_ANY if not * known * * RETURN: Status
@@ -191,7 +191,7 @@ acpi_ns_attach_object(struct acpi_namespace_node *node,* * FUNCTION: acpi_ns_detach_object * -* PARAMETERS: Node - A Namespace node whose object will be detached +* PARAMETERS: node - A Namespace node whose object will be detached * * RETURN: None. *
@@ -250,7 +250,7 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node)* * FUNCTION: acpi_ns_get_attached_object * -* PARAMETERS: Node - Namespace node +* PARAMETERS: node - Namespace node * * RETURN: Current value of the object field from the Node whose * handle is passed
@@ -285,7 +285,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct* * FUNCTION: acpi_ns_get_secondary_object * -* PARAMETERS: Node - Namespace node +* PARAMETERS: node - Namespace node * * RETURN: Current value of the object field from the Node whose * handle is passed.
@@ -315,9 +315,9 @@ union acpi_operand_object *acpi_ns_get_secondary_object(union* * FUNCTION: acpi_ns_attach_data * -* PARAMETERS: Node - Namespace node -* Handler - Handler to be associated with the data -* Data - Data to be attached +* PARAMETERS: node - Namespace node +* handler - Handler to be associated with the data +* data - Data to be attached * * RETURN: Status *
@@ -372,8 +372,8 @@ acpi_ns_attach_data(struct acpi_namespace_node *node,* * FUNCTION: acpi_ns_detach_data * -* PARAMETERS: Node - Namespace node -* Handler - Handler associated with the data +* PARAMETERS: node - Namespace node +* handler - Handler associated with the data * * RETURN: Status *
@@ -416,9 +416,9 @@ acpi_ns_detach_data(struct acpi_namespace_node * node,* * FUNCTION: acpi_ns_get_attached_data * -* PARAMETERS: Node - Namespace node -* Handler - Handler associated with the data -* Data - Where the data is returned +* PARAMETERS: node - Namespace node +* handler - Handler associated with the data +* data - Where the data is returned * * RETURN: Status *
drivers/acpi/acpica/nspredef.c +19 -19
@@ -116,7 +116,7 @@ static const char *acpi_rtype_names[] = {* * FUNCTION: acpi_ns_check_predefined_names * -* PARAMETERS: Node - Namespace node for the method/object +* PARAMETERS: node - Namespace node for the method/object * user_param_count - Number of parameters actually passed * return_status - Status from the object evaluation * return_object_ptr - Pointer to the object returned from the
@@ -275,10 +275,10 @@ cleanup:* * FUNCTION: acpi_ns_check_parameter_count * -* PARAMETERS: Pathname - Full pathname to the node (for error msgs) -* Node - Namespace node for the method/object +* PARAMETERS: pathname - Full pathname to the node (for error msgs) +* node - Namespace node for the method/object * user_param_count - Number of args passed in by the caller -* Predefined - Pointer to entry in predefined name table +* predefined - Pointer to entry in predefined name table * * RETURN: None *
@@ -364,7 +364,7 @@ acpi_ns_check_parameter_count(char *pathname,* * FUNCTION: acpi_ns_check_for_predefined_name * -* PARAMETERS: Node - Namespace node for the method/object +* PARAMETERS: node - Namespace node for the method/object * * RETURN: Pointer to entry in predefined table. NULL indicates not found. *
@@ -410,7 +410,7 @@ const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct* * FUNCTION: acpi_ns_check_package * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object *
@@ -685,11 +685,11 @@ package_too_small:* * FUNCTION: acpi_ns_check_package_list * -* PARAMETERS: Data - Pointer to validation data structure -* Package - Pointer to package-specific info for method -* Elements - Element list of parent package. All elements +* PARAMETERS: data - Pointer to validation data structure +* package - Pointer to package-specific info for method +* elements - Element list of parent package. All elements * of this list should be of type Package. -* Count - Count of subpackages +* count - Count of subpackages * * RETURN: Status *
@@ -911,12 +911,12 @@ package_too_small:* * FUNCTION: acpi_ns_check_package_elements * -* PARAMETERS: Data - Pointer to validation data structure -* Elements - Pointer to the package elements array -* Type1 - Object type for first group -* Count1 - Count for first group -* Type2 - Object type for second group -* Count2 - Count for second group +* PARAMETERS: data - Pointer to validation data structure +* elements - Pointer to the package elements array +* type1 - Object type for first group +* count1 - Count for first group +* type2 - Object type for second group +* count2 - Count for second group * start_index - Start of the first group of elements * * RETURN: Status
@@ -968,7 +968,7 @@ acpi_ns_check_package_elements(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_check_object_type * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object * expected_btypes - Bitmap of expected return type(s)
@@ -1102,7 +1102,7 @@ acpi_ns_check_object_type(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_check_reference * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object - Object returned from the evaluation of a * method or object *
@@ -1140,7 +1140,7 @@ acpi_ns_check_reference(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_get_expected_types * -* PARAMETERS: Buffer - Pointer to where the string is returned +* PARAMETERS: buffer - Pointer to where the string is returned * expected_btypes - Bitmap of expected return type(s) * * RETURN: Buffer is populated with type names.
drivers/acpi/acpica/nsrepair.c +7 -7
@@ -94,7 +94,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,* * FUNCTION: acpi_ns_repair_object * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * expected_btypes - Object types expected * package_index - Index of object within parent package (if * applicable - ACPI_NOT_PACKAGE_ELEMENT
@@ -470,7 +470,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,* * FUNCTION: acpi_ns_repair_null_element * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * expected_btypes - Object types expected * package_index - Index of object within parent package (if * applicable - ACPI_NOT_PACKAGE_ELEMENT
@@ -509,17 +509,17 @@ acpi_ns_repair_null_element(struct acpi_predefined_data *data,*/ if (expected_btypes &ACPI_RTYPE_INTEGER ) { -/* Need an Integer - create a zero-value integer */ +/* Need an integer - create a zero-value integer */ new_object =acpi_ut_create_integer_object ((u64 )0 ); }else if (expected_btypes &ACPI_RTYPE_STRING ) { -/* Need a String - create a NULL string */ +/* Need a string - create a NULL string */ new_object =acpi_ut_create_string_object (0 ); }else if (expected_btypes &ACPI_RTYPE_BUFFER ) { -/* Need a Buffer - create a zero-length buffer */ +/* Need a buffer - create a zero-length buffer */ new_object =acpi_ut_create_buffer_object (0 ); }else {
@@ -552,7 +552,7 @@ acpi_ns_repair_null_element(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_remove_null_elements * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * package_type - An acpi_return_package_types value * obj_desc - A Package object *
@@ -635,7 +635,7 @@ acpi_ns_remove_null_elements(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_wrap_with_package * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * original_object - Pointer to the object to repair. * obj_desc_ptr - The new package object is returned here *
drivers/acpi/acpica/nsrepair2.c +13 -13
@@ -149,8 +149,8 @@ static const struct acpi_repair_info acpi_ns_repairable_names[] = {* * FUNCTION: acpi_ns_complex_repairs * -* PARAMETERS: Data - Pointer to validation data structure -* Node - Namespace node for the method/object +* PARAMETERS: data - Pointer to validation data structure +* node - Namespace node for the method/object * validate_status - Original status of earlier validation * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object
@@ -187,7 +187,7 @@ acpi_ns_complex_repairs(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_match_repairable_name * -* PARAMETERS: Node - Namespace node for the method/object +* PARAMETERS: node - Namespace node for the method/object * * RETURN: Pointer to entry in repair table. NULL indicates not found. *
@@ -218,7 +218,7 @@ static const struct acpi_repair_info *acpi_ns_match_repairable_name(struct* * FUNCTION: acpi_ns_repair_ALR * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object *
@@ -247,7 +247,7 @@ acpi_ns_repair_ALR(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_repair_FDE * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object *
@@ -335,7 +335,7 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_repair_CID * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object *
@@ -405,7 +405,7 @@ acpi_ns_repair_CID(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_repair_HID * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object *
@@ -487,7 +487,7 @@ acpi_ns_repair_HID(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_repair_TSS * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object *
@@ -531,7 +531,7 @@ acpi_ns_repair_TSS(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_repair_PSS * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object_ptr - Pointer to the object returned from the * evaluation of a method or object *
@@ -600,7 +600,7 @@ acpi_ns_repair_PSS(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_check_sorted_list * -* PARAMETERS: Data - Pointer to validation data structure +* PARAMETERS: data - Pointer to validation data structure * return_object - Pointer to the top-level returned object * expected_count - Minimum length of each sub-package * sort_index - Sub-package entry to sort on
@@ -707,9 +707,9 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data,* * FUNCTION: acpi_ns_sort_list * -* PARAMETERS: Elements - Package object element list -* Count - Element count for above -* Index - Sort by which package element +* PARAMETERS: elements - Package object element list +* count - Element count for above +* index - Sort by which package element * sort_direction - Ascending or Descending sort * * RETURN: None
drivers/acpi/acpica/nssearch.c +6 -6
@@ -65,7 +65,7 @@ acpi_ns_search_parent_tree(u32 target_name,* * PARAMETERS: target_name - Ascii ACPI name to search for * parent_node - Starting node where search will begin -* Type - Object type to match +* type - Object type to match * return_node - Where the matched Named obj is returned * * RETURN: Status
@@ -175,8 +175,8 @@ acpi_ns_search_one_scope(u32 target_name,* FUNCTION: acpi_ns_search_parent_tree * * PARAMETERS: target_name - Ascii ACPI name to search for -* Node - Starting node where search will begin -* Type - Object type to match +* node - Starting node where search will begin +* type - Object type to match * return_node - Where the matched Node is returned * * RETURN: Status
@@ -264,11 +264,11 @@ acpi_ns_search_parent_tree(u32 target_name,* * PARAMETERS: target_name - Ascii ACPI name to search for (4 chars) * walk_state - Current state of the walk -* Node - Starting node where search will begin +* node - Starting node where search will begin * interpreter_mode - Add names only in ACPI_MODE_LOAD_PASS_x. * Otherwise,search only. -* Type - Object type to match -* Flags - Flags describing the search restrictions +* type - Object type to match +* flags - Flags describing the search restrictions * return_node - Where the Node is returned * * RETURN: Status
drivers/acpi/acpica/nsutils.c +13 -13
@@ -62,8 +62,8 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search);* * FUNCTION: acpi_ns_print_node_pathname * -* PARAMETERS: Node - Object -* Message - Prefix message +* PARAMETERS: node - Object +* message - Prefix message * * DESCRIPTION: Print an object's full namespace pathname * Manages allocation/freeing of a pathname buffer
@@ -101,7 +101,7 @@ acpi_ns_print_node_pathname(struct acpi_namespace_node *node,* * FUNCTION: acpi_ns_valid_root_prefix * -* PARAMETERS: Prefix - Character to be checked +* PARAMETERS: prefix - Character to be checked * * RETURN: TRUE if a valid prefix *
@@ -119,7 +119,7 @@ u8 acpi_ns_valid_root_prefix(char prefix)* * FUNCTION: acpi_ns_valid_path_separator * -* PARAMETERS: Sep - Character to be checked +* PARAMETERS: sep - Character to be checked * * RETURN: TRUE if a valid path separator *
@@ -137,7 +137,7 @@ static u8 acpi_ns_valid_path_separator(char sep)* * FUNCTION: acpi_ns_get_type * -* PARAMETERS: Node - Parent Node to be examined +* PARAMETERS: node - Parent Node to be examined * * RETURN: Type field from Node whose handle is passed *
@@ -161,7 +161,7 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node)* * FUNCTION: acpi_ns_local * -* PARAMETERS: Type - A namespace object type +* PARAMETERS: type - A namespace object type * * RETURN: LOCAL if names must be found locally in objects of the * passed type, 0 if enclosing scopes should be searched
@@ -189,7 +189,7 @@ u32 acpi_ns_local(acpi_object_type type)* * FUNCTION: acpi_ns_get_internal_name_length * -* PARAMETERS: Info - Info struct initialized with the +* PARAMETERS: info - Info struct initialized with the * external name pointer. * * RETURN: None
@@ -260,7 +260,7 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info)* * FUNCTION: acpi_ns_build_internal_name * -* PARAMETERS: Info - Info struct fully initialized +* PARAMETERS: info - Info struct fully initialized * * RETURN: Status *
@@ -371,7 +371,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)* FUNCTION: acpi_ns_internalize_name * * PARAMETERS: *external_name - External representation of name -* **Converted Name - Where to return the resulting +* **Converted name - Where to return the resulting * internal represention of the name * * RETURN: Status
@@ -575,7 +575,7 @@ acpi_ns_externalize_name(u32 internal_name_length,* * FUNCTION: acpi_ns_validate_handle * -* PARAMETERS: Handle - Handle to be validated and typecast to a +* PARAMETERS: handle - Handle to be validated and typecast to a * namespace node. * * RETURN: A pointer to a namespace node
@@ -651,7 +651,7 @@ void acpi_ns_terminate(void)* * FUNCTION: acpi_ns_opens_scope * -* PARAMETERS: Type - A valid namespace type +* PARAMETERS: type - A valid namespace type * * RETURN: NEWSCOPE if the passed type "opens a name scope" according * to the ACPI specification, else 0
@@ -677,14 +677,14 @@ u32 acpi_ns_opens_scope(acpi_object_type type)* * FUNCTION: acpi_ns_get_node * -* PARAMETERS: *Pathname - Name to be found, in external (ASL) format. The +* PARAMETERS: *pathname - Name to be found, in external (ASL) format. The * \ (backslash) and ^ (carat) prefixes, and the * . (period) to separate segments are supported. * prefix_node - Root of subtree to be searched, or NS_ALL for the * root of the name space. If Name is fully * qualified (first s8 is '\'), the passed value * of Scope will not be accessed. -* Flags - Used to indicate whether to perform upsearch or +* flags - Used to indicate whether to perform upsearch or * not. * return_node - Where the Node is returned *
drivers/acpi/acpica/nswalk.c +4 -4
@@ -88,7 +88,7 @@ struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node* * FUNCTION: acpi_ns_get_next_node_typed * -* PARAMETERS: Type - Type of node to be searched for +* PARAMETERS: type - Type of node to be searched for * parent_node - Parent node whose children we are * getting * child_node - Previous child that was found.
@@ -151,16 +151,16 @@ struct acpi_namespace_node *acpi_ns_get_next_node_typed(acpi_object_type type,* * FUNCTION: acpi_ns_walk_namespace * -* PARAMETERS: Type - acpi_object_type to search for +* PARAMETERS: type - acpi_object_type to search for * start_node - Handle in namespace where search begins * max_depth - Depth to which search is to reach -* Flags - Whether to unlock the NS before invoking +* flags - Whether to unlock the NS before invoking * the callback routine * pre_order_visit - Called during tree pre-order visit * when an object of "Type" is found * post_order_visit - Called during tree post-order visit * when an object of "Type" is found -* Context - Passed to user function(s) above +* context - Passed to user function(s) above * return_value - from the user_function if terminated * early. Otherwise, returns NULL. * RETURNS: Status
drivers/acpi/acpica/nsxfeval.c +13 -13
@@ -58,8 +58,8 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info);* * FUNCTION: acpi_evaluate_object_typed * -* PARAMETERS: Handle - Object handle (optional) -* Pathname - Object pathname (optional) +* PARAMETERS: handle - Object handle (optional) +* pathname - Object pathname (optional) * external_params - List of parameters to pass to method, * terminated by NULL. May be NULL * if no parameters are being passed.
@@ -152,8 +152,8 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed)* * FUNCTION: acpi_evaluate_object * -* PARAMETERS: Handle - Object handle (optional) -* Pathname - Object pathname (optional) +* PARAMETERS: handle - Object handle (optional) +* pathname - Object pathname (optional) * external_params - List of parameters to pass to method, * terminated by NULL. May be NULL * if no parameters are being passed.
@@ -364,7 +364,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object)* * FUNCTION: acpi_ns_resolve_references * -* PARAMETERS: Info - Evaluation info block +* PARAMETERS: info - Evaluation info block * * RETURN: Info->return_object is replaced with the dereferenced object *
@@ -431,14 +431,14 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info)* * FUNCTION: acpi_walk_namespace * -* PARAMETERS: Type - acpi_object_type to search for +* PARAMETERS: type - acpi_object_type to search for * start_object - Handle in namespace where search begins * max_depth - Depth to which search is to reach * pre_order_visit - Called during tree pre-order visit * when an object of "Type" is found * post_order_visit - Called during tree post-order visit * when an object of "Type" is found -* Context - Passed to user function(s) above +* context - Passed to user function(s) above * return_value - Location where return value of * user_function is put if terminated early *
@@ -646,7 +646,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,* * PARAMETERS: HID - HID to search for. Can be NULL. * user_function - Called when a matching object is found -* Context - Passed to user function +* context - Passed to user function * return_value - Location where return value of * user_function is put if terminated early *
@@ -716,8 +716,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_devices)* FUNCTION: acpi_attach_data * * PARAMETERS: obj_handle - Namespace node -* Handler - Handler for this attachment -* Data - Pointer to data to be attached +* handler - Handler for this attachment +* data - Pointer to data to be attached * * RETURN: Status *
@@ -764,7 +764,7 @@ ACPI_EXPORT_SYMBOL(acpi_attach_data)* FUNCTION: acpi_detach_data * * PARAMETERS: obj_handle - Namespace node handle -* Handler - Handler used in call to acpi_attach_data +* handler - Handler used in call to acpi_attach_data * * RETURN: Status *
@@ -810,8 +810,8 @@ ACPI_EXPORT_SYMBOL(acpi_detach_data)* FUNCTION: acpi_get_data * * PARAMETERS: obj_handle - Namespace node -* Handler - Handler used in call to attach_data -* Data - Where the data is returned +* handler - Handler used in call to attach_data +* data - Where the data is returned * * RETURN: Status *
drivers/acpi/acpica/nsxfname.c +8 -8
@@ -61,8 +61,8 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest,* * FUNCTION: acpi_get_handle * -* PARAMETERS: Parent - Object to search under (search scope). -* Pathname - Pointer to an asciiz string containing the +* PARAMETERS: parent - Object to search under (search scope). +* pathname - Pointer to an asciiz string containing the * name * ret_handle - Where the return handle is returned *
@@ -142,9 +142,9 @@ ACPI_EXPORT_SYMBOL(acpi_get_handle)* * FUNCTION: acpi_get_name * -* PARAMETERS: Handle - Handle to be converted to a pathname +* PARAMETERS: handle - Handle to be converted to a pathname * name_type - Full pathname or single segment -* Buffer - Buffer for returned path +* buffer - Buffer for returned path * * RETURN: Pointer to a string containing the fully qualified Name. *
@@ -219,8 +219,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_name)* * FUNCTION: acpi_ns_copy_device_id * -* PARAMETERS: Dest - Pointer to the destination DEVICE_ID -* Source - Pointer to the source DEVICE_ID +* PARAMETERS: dest - Pointer to the destination DEVICE_ID +* source - Pointer to the source DEVICE_ID * string_area - Pointer to where to copy the dest string * * RETURN: Pointer to the next string area
@@ -247,7 +247,7 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest,* * FUNCTION: acpi_get_object_info * -* PARAMETERS: Handle - Object Handle +* PARAMETERS: handle - Object Handle * return_buffer - Where the info is returned * * RETURN: Status
@@ -493,7 +493,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_object_info)* * FUNCTION: acpi_install_method * -* PARAMETERS: Buffer - An ACPI table containing one control method +* PARAMETERS: buffer - An ACPI table containing one control method * * RETURN: Status *
drivers/acpi/acpica/nsxfobj.c +4 -4
@@ -98,7 +98,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_id)* * FUNCTION: acpi_get_type * -* PARAMETERS: Handle - Handle of object whose type is desired +* PARAMETERS: handle - Handle of object whose type is desired * ret_type - Where the type will be placed * * RETURN: Status
@@ -151,7 +151,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_type)* * FUNCTION: acpi_get_parent * -* PARAMETERS: Handle - Handle of object whose parent is desired +* PARAMETERS: handle - Handle of object whose parent is desired * ret_handle - Where the parent handle will be placed * * RETURN: Status
@@ -212,8 +212,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_parent)* * FUNCTION: acpi_get_next_object * -* PARAMETERS: Type - Type of object to be searched for -* Parent - Parent object whose children we are getting +* PARAMETERS: type - Type of object to be searched for +* parent - Parent object whose children we are getting * last_child - Previous child that was found. * The NEXT child will be returned * ret_handle - Where handle to the next object is placed
drivers/acpi/acpica/psargs.c +2 -2
@@ -210,7 +210,7 @@ char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state)* FUNCTION: acpi_ps_get_next_namepath * * PARAMETERS: parser_state - Current parser state object -* Arg - Where the namepath will be stored +* arg - Where the namepath will be stored * arg_count - If the namepath points to a control method * the method's argument is returned here. * possible_method_call - Whether the namepath can possibly be the
@@ -379,7 +379,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,* * PARAMETERS: parser_state - Current parser state object * arg_type - The argument type (AML_*_ARG) -* Arg - Where the argument is returned +* arg - Where the argument is returned * * RETURN: None *
drivers/acpi/acpica/psloop.c +8 -8
@@ -167,7 +167,7 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state)* PARAMETERS: walk_state - Current state * aml_op_start - Begin of named Op in AML * unnamed_op - Early Op (not a named Op) -* Op - Returned Op +* op - Returned Op * * RETURN: Status *
@@ -323,7 +323,7 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state,if (walk_state->op_info->flags &AML_CREATE ) {/* -* Backup to beginning of create_xXXfield declaration +* Backup to beginning of create_XXXfield declaration * body_length is unknown until we parse the body */ op->named.data = aml_op_start;
@@ -380,7 +380,7 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state,* * PARAMETERS: walk_state - Current state * aml_op_start - Op start in AML -* Op - Current Op +* op - Current Op * * RETURN: Status *
@@ -679,8 +679,8 @@ acpi_ps_link_module_code(union acpi_parse_object *parent_op,* FUNCTION: acpi_ps_complete_op * * PARAMETERS: walk_state - Current state -* Op - Returned Op -* Status - Parse status before complete Op +* op - Returned Op +* status - Parse status before complete Op * * RETURN: Status *
@@ -853,8 +853,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,* FUNCTION: acpi_ps_complete_final_op * * PARAMETERS: walk_state - Current state -* Op - Current Op -* Status - Current parse status before complete last +* op - Current Op +* status - Current parse status before complete last * Op * * RETURN: Status
@@ -1165,7 +1165,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)if (walk_state->op_info->flags &AML_CREATE ) {/* -* Backup to beginning of create_xXXfield declaration (1 for +* Backup to beginning of create_XXXfield declaration (1 for * Opcode) * * body_length is unknown until we parse the body
drivers/acpi/acpica/psopcode.c +2 -2
@@ -724,7 +724,7 @@ static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = {* * FUNCTION: acpi_ps_get_opcode_info * -* PARAMETERS: Opcode - The AML opcode +* PARAMETERS: opcode - The AML opcode * * RETURN: A pointer to the info about the opcode. *
@@ -769,7 +769,7 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)* * FUNCTION: acpi_ps_get_opcode_name * -* PARAMETERS: Opcode - The AML opcode +* PARAMETERS: opcode - The AML opcode * * RETURN: A pointer to the name of the opcode (ASCII String) * Note: Never returns NULL.
drivers/acpi/acpica/psparse.c +3 -3
@@ -64,7 +64,7 @@ ACPI_MODULE_NAME("psparse")* * FUNCTION: acpi_ps_get_opcode_size * -* PARAMETERS: Opcode - An AML opcode +* PARAMETERS: opcode - An AML opcode * * RETURN: Size of the opcode, in bytes (1 or 2) *
@@ -121,7 +121,7 @@ u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state)* FUNCTION: acpi_ps_complete_this_op * * PARAMETERS: walk_state - Current State -* Op - Op to complete +* op - Op to complete * * RETURN: Status *
@@ -311,7 +311,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,* FUNCTION: acpi_ps_next_parse_state * * PARAMETERS: walk_state - Current state -* Op - Current parse op +* op - Current parse op * callback_status - Status from previous operation * * RETURN: Status
drivers/acpi/acpica/psscope.c +3 -3
@@ -93,7 +93,7 @@ u8 acpi_ps_has_completed_scope(struct acpi_parse_state * parser_state)* FUNCTION: acpi_ps_init_scope * * PARAMETERS: parser_state - Current parser state object -* Root - the Root Node of this new scope +* root - the Root Node of this new scope * * RETURN: Status *
@@ -131,7 +131,7 @@ acpi_ps_init_scope(struct acpi_parse_state * parser_state,* FUNCTION: acpi_ps_push_scope * * PARAMETERS: parser_state - Current parser state object -* Op - Current op to be pushed +* op - Current op to be pushed * remaining_args - List of args remaining * arg_count - Fixed or variable number of args *
@@ -184,7 +184,7 @@ acpi_ps_push_scope(struct acpi_parse_state *parser_state,* FUNCTION: acpi_ps_pop_scope * * PARAMETERS: parser_state - Current parser state object -* Op - Where the popped op is returned +* op - Where the popped op is returned * arg_list - Where the popped "next argument" is * returned * arg_count - Count of objects in arg_list
drivers/acpi/acpica/pstree.c +7 -7
@@ -58,8 +58,8 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op);* * FUNCTION: acpi_ps_get_arg * -* PARAMETERS: Op - Get an argument for this op -* Argn - Nth argument to get +* PARAMETERS: op - Get an argument for this op +* argn - Nth argument to get * * RETURN: The argument (as an Op object). NULL if argument does not exist *
@@ -114,8 +114,8 @@ union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn)* * FUNCTION: acpi_ps_append_arg * -* PARAMETERS: Op - Append an argument to this Op. -* Arg - Argument Op to append +* PARAMETERS: op - Append an argument to this Op. +* arg - Argument Op to append * * RETURN: None. *
@@ -188,8 +188,8 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg)* * FUNCTION: acpi_ps_get_depth_next * -* PARAMETERS: Origin - Root of subtree to search -* Op - Last (previous) Op that was found +* PARAMETERS: origin - Root of subtree to search +* op - Last (previous) Op that was found * * RETURN: Next Op found in the search. *
@@ -261,7 +261,7 @@ union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin,* * FUNCTION: acpi_ps_get_child * -* PARAMETERS: Op - Get the child of this Op +* PARAMETERS: op - Get the child of this Op * * RETURN: Child Op, Null if none is found. *
drivers/acpi/acpica/psutils.c +4 -4
@@ -77,8 +77,8 @@ union acpi_parse_object *acpi_ps_create_scope_op(void)* * FUNCTION: acpi_ps_init_op * -* PARAMETERS: Op - A newly allocated Op object -* Opcode - Opcode to store in the Op +* PARAMETERS: op - A newly allocated Op object +* opcode - Opcode to store in the Op * * RETURN: None *
@@ -103,7 +103,7 @@ void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode)* * FUNCTION: acpi_ps_alloc_op * -* PARAMETERS: Opcode - Opcode that will be stored in the new Op +* PARAMETERS: opcode - Opcode that will be stored in the new Op * * RETURN: Pointer to the new Op, null on failure *
@@ -160,7 +160,7 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode)* * FUNCTION: acpi_ps_free_op * -* PARAMETERS: Op - Op to be freed +* PARAMETERS: op - Op to be freed * * RETURN: None. *
drivers/acpi/acpica/psxface.c +8 -8
@@ -66,7 +66,7 @@ acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action);* PARAMETERS: method_name - Valid ACPI name string * debug_level - Optional level mask. 0 to use default * debug_layer - Optional layer mask. 0 to use default -* Flags - bit 1: one shot(1) or persistent(0) +* flags - bit 1: one shot(1) or persistent(0) * * RETURN: Status *
@@ -105,7 +105,7 @@ acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags)* * FUNCTION: acpi_ps_start_trace * -* PARAMETERS: Info - Method info struct +* PARAMETERS: info - Method info struct * * RETURN: None *
@@ -150,7 +150,7 @@ static void acpi_ps_start_trace(struct acpi_evaluate_info *info)* * FUNCTION: acpi_ps_stop_trace * -* PARAMETERS: Info - Method info struct +* PARAMETERS: info - Method info struct * * RETURN: None *
@@ -193,10 +193,10 @@ static void acpi_ps_stop_trace(struct acpi_evaluate_info *info)* * FUNCTION: acpi_ps_execute_method * -* PARAMETERS: Info - Method info block, contains: -* Node - Method Node to execute +* PARAMETERS: info - Method info block, contains: +* node - Method Node to execute * obj_desc - Method object -* Parameters - List of parameters to pass to the method, +* parameters - List of parameters to pass to the method, * terminated by NULL. Params itself may be * NULL if no parameters are being passed. * return_object - Where to put method's return value (if
@@ -361,9 +361,9 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)* * FUNCTION: acpi_ps_update_parameter_list * -* PARAMETERS: Info - See struct acpi_evaluate_info +* PARAMETERS: info - See struct acpi_evaluate_info * (Used: parameter_type and Parameters) -* Action - Add or Remove reference +* action - Add or Remove reference * * RETURN: Status *
drivers/acpi/acpica/rsaddr.c +7 -7
@@ -182,8 +182,8 @@ struct acpi_rsconvert_info acpi_rs_convert_ext_address64[5] = {/* Revision ID */ - {ACPI_RSC_MOVE8 ,ACPI_RS_OFFSET (data.ext_address64.revision_iD), -AML_OFFSET (ext_address64.revision_iD), + {ACPI_RSC_MOVE8 ,ACPI_RS_OFFSET (data.ext_address64.revision_ID), +AML_OFFSET (ext_address64.revision_ID), 1},/* * These fields are contiguous in both the source and destination:
@@ -215,7 +215,7 @@ static struct acpi_rsconvert_info acpi_rs_convert_general_flags[6] = {AML_OFFSET (address.resource_type), 1}, -/* General Flags - Consume, Decode, min_fixed, max_fixed */ +/* General flags - Consume, Decode, min_fixed, max_fixed */ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.address.producer_consumer), AML_OFFSET(address.flags),
@@ -293,8 +293,8 @@ static struct acpi_rsconvert_info acpi_rs_convert_io_flags[4] = {* * FUNCTION: acpi_rs_get_address_common * -* PARAMETERS: Resource - Pointer to the internal resource struct -* Aml - Pointer to the AML resource descriptor +* PARAMETERS: resource - Pointer to the internal resource struct +* aml - Pointer to the AML resource descriptor * * RETURN: TRUE if the resource_type field is OK, FALSE otherwise *
@@ -343,8 +343,8 @@ acpi_rs_get_address_common(struct acpi_resource *resource,* * FUNCTION: acpi_rs_set_address_common * -* PARAMETERS: Aml - Pointer to the AML resource descriptor -* Resource - Pointer to the internal resource struct +* PARAMETERS: aml - Pointer to the AML resource descriptor +* resource - Pointer to the internal resource struct * * RETURN: None *
drivers/acpi/acpica/rscalc.c +1 -1
@@ -173,7 +173,7 @@ acpi_rs_stream_option_length(u32 resource_length,* * FUNCTION: acpi_rs_get_aml_length * -* PARAMETERS: Resource - Pointer to the resource linked list +* PARAMETERS: resource - Pointer to the resource linked list * size_needed - Where the required size is returned * * RETURN: Status
drivers/acpi/acpica/rsdump.c +5 -5
@@ -703,7 +703,7 @@ acpi_rs_dump_resource_source(struct acpi_resource_source *resource_source)* * FUNCTION: acpi_rs_dump_address_common * -* PARAMETERS: Resource - Pointer to an internal resource descriptor +* PARAMETERS: resource - Pointer to an internal resource descriptor * * RETURN: None *
@@ -850,8 +850,8 @@ void acpi_rs_dump_irq_list(u8 * route_table)* * FUNCTION: acpi_rs_out* * -* PARAMETERS: Title - Name of the resource field -* Value - Value of the resource field +* PARAMETERS: title - Name of the resource field +* value - Value of the resource field * * RETURN: None *
@@ -898,8 +898,8 @@ static void acpi_rs_out_title(char *title)* * FUNCTION: acpi_rs_dump*List * -* PARAMETERS: Length - Number of elements in the list -* Data - Start of the list +* PARAMETERS: length - Number of elements in the list +* data - Start of the list * * RETURN: None *
drivers/acpi/acpica/rslist.c +1 -1
@@ -139,7 +139,7 @@ acpi_rs_convert_aml_to_resources(u8 * aml,* * FUNCTION: acpi_rs_convert_resources_to_aml * -* PARAMETERS: Resource - Pointer to the resource linked list +* PARAMETERS: resource - Pointer to the resource linked list * aml_size_needed - Calculated size of the byte stream * needed from calling acpi_rs_get_aml_length() * The size of the output_buffer is
drivers/acpi/acpica/rsmisc.c +11 -11
@@ -57,9 +57,9 @@ ACPI_MODULE_NAME("rsmisc")* * FUNCTION: acpi_rs_convert_aml_to_resource * -* PARAMETERS: Resource - Pointer to the resource descriptor -* Aml - Where the AML descriptor is returned -* Info - Pointer to appropriate conversion table +* PARAMETERS: resource - Pointer to the resource descriptor +* aml - Where the AML descriptor is returned +* info - Pointer to appropriate conversion table * * RETURN: Status *
@@ -406,7 +406,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,case ACPI_RSC_EXIT_NE :/* -* Control - Exit conversion if not equal +* control - Exit conversion if not equal */ switch (info->resource_offset) {case ACPI_RSC_COMPARE_AML_LENGTH :
@@ -454,9 +454,9 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,* * FUNCTION: acpi_rs_convert_resource_to_aml * -* PARAMETERS: Resource - Pointer to the resource descriptor -* Aml - Where the AML descriptor is returned -* Info - Pointer to appropriate conversion table +* PARAMETERS: resource - Pointer to the resource descriptor +* aml - Where the AML descriptor is returned +* info - Pointer to appropriate conversion table * * RETURN: Status *
@@ -726,7 +726,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,case ACPI_RSC_EXIT_LE :/* -* Control - Exit conversion if less than or equal +* control - Exit conversion if less than or equal */ if (item_count <= info->value) { goto exit;
@@ -735,7 +735,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,case ACPI_RSC_EXIT_NE :/* -* Control - Exit conversion if not equal +* control - Exit conversion if not equal */ switch (COMPARE_OPCODE (info)) {case ACPI_RSC_COMPARE_VALUE :
@@ -757,7 +757,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,case ACPI_RSC_EXIT_EQ :/* -* Control - Exit conversion if equal +* control - Exit conversion if equal */ if (*ACPI_ADD_PTR(u8, resource, COMPARE_TARGET(info)) ==
@@ -783,7 +783,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,#if 0 /* Previous resource validations */ -if (aml->ext_address64.revision_iD !=AML_RESOURCE_EXTENDED_ADDRESS_REVISION ) { +if (aml->ext_address64.revision_ID !=AML_RESOURCE_EXTENDED_ADDRESS_REVISION ) {return_ACPI_STATUS (AE_SUPPORT ); }
drivers/acpi/acpica/rsutils.c +22 -22
146 lines not on this page · raw message
drivers/acpi/acpica/rsxface.c +7 -7
@@ -79,7 +79,7 @@ acpi_rs_validate_parameters(acpi_handle device_handle,* FUNCTION: acpi_rs_validate_parameters * * PARAMETERS: device_handle - Handle to a device -* Buffer - Pointer to a data buffer +* buffer - Pointer to a data buffer * return_node - Pointer to where the device node is returned * * RETURN: Status
@@ -351,8 +351,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_event_resources)* * FUNCTION: acpi_resource_to_address64 * -* PARAMETERS: Resource - Pointer to a resource -* Out - Pointer to the users's return buffer +* PARAMETERS: resource - Pointer to a resource +* out - Pointer to the users's return buffer * (a struct acpi_resource_address64) * * RETURN: Status
@@ -415,9 +415,9 @@ ACPI_EXPORT_SYMBOL(acpi_resource_to_address64)* FUNCTION: acpi_get_vendor_resource * * PARAMETERS: device_handle - Handle for the parent device object -* Name - Method name for the parent resource +* name - Method name for the parent resource * (METHOD_NAME__CRS or METHOD_NAME__PRS) -* Uuid - Pointer to the UUID to be matched. +* uuid - Pointer to the UUID to be matched. * includes both subtype and 16-byte UUID
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.12.rc0
Part of the diff is not shown here. View the raw message.
Len Brown
maintainerPATCH 46/52 ACPICA: Update to version 20120711
In reply to Len BrownFrom: Bob Moore <[email protected]>
Version 20120711.
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -47,7 +47,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20120620 +#define ACPI_CA_VERSION 0x20120711#include "acconfig.h" #include "actypes.h"
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 47/52 tools/power: turbostat v2 - re-write for efficiency
In reply to Len BrownFrom: Len Brown <[email protected]>
Measuring large profoundly-idle configurations requires turbostat to be more lightweight. Otherwise, the operation of turbostat itself can interfere with the measurements.
This re-write makes turbostat topology aware. Hardware is accessed in "topology order". Redundant hardware accesses are deleted. Redundant output is deleted.
Also, output is buffered and
local RDTSC use replaces remote MSR access for TSC.
Quoted 1 line
From a feature point of view, the output
looks different since redundant figures are absent. Also, there are now -c and -p options -- to restrict output to the 1st thread in each core, and the 1st thread in each package, respectively. This is helpful to reduce output on big systems, where more detail than the "-s" system summary is desired.
Finally, periodic mode output is now on stdout, not stderr.
Turbostat v2 is also slightly more robust in handling run-time CPU online/offline events, as it now checks the actual map of on-line cpus rather than just the total number of on-line cpus.
--- tools/power/x86/turbostat/Makefile | 1 + tools/power/x86/turbostat/turbostat.8 | 77 +- tools/power/x86/turbostat/turbostat.c | 1329 ++++++++++++++++++++------------- 3 files changed, 868 insertions(+), 539 deletions(-)
tools/power/x86/turbostat/Makefile +1 -0
@@ -1,4 +1,5 @@ turbostat : turbostat.c +CFLAGS += -Wall clean : rm -f turbostat
tools/power/x86/turbostat/turbostat.8 +40 -37
105 lines not on this page · raw message
tools/power/x86/turbostat/turbostat.c +827 -502
1,608 lines not on this page · raw message
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 48/52 tools/power: turbostat: fix large c1% issue
In reply to Len BrownFrom: Len Brown <[email protected]>
Under some conditions, c1% was displayed as very large number, much higher than 100%.
c1% is not measured, it is derived as "that, which is left over" from other counters. However, the other counters are not collected atomically, and so it is possible for c1% to be calaculagted as a small negative number -- displayed as very large positive.
There was a check for mperf vs tsc for this already, but it needed to also include the other counters that are used to calculate c1.
--- tools/power/x86/turbostat/turbostat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
tools/power/x86/turbostat/turbostat.c +8 -4
@@ -444,6 +444,9 @@ delta_core(struct core_data *new, struct core_data *old) old->c7 = new->c7 - old->c7; } +/* +* old = new - old +*/ void delta_thread (struct thread_data *new,struct thread_data *old,struct core_data *core_delta)
@@ -482,19 +485,20 @@ delta_thread(struct thread_data *new, struct thread_data *old,/* -* As mperf and tsc collection are not atomic, -* it is possible for mperf's non-halted cycles +* As counter collection is not atomic, +* it is possible for mperf's non-halted cycles + idle states * to exceed TSC's all cycles: show c1 = 0% in that case. */ -if (old->mperf > old->tsc) +if ((old->mperf + core_delta->c3 + core_delta->c6 + core_delta->c7) > old->tsc) old->c1 =0 ;else {/* normal case, derive c1 */ old->c1 = old->tsc - old->mperf - core_delta->c3 - core_delta->c6 - core_delta->c7; } +if (old->mperf ==0 ) { -if (verbose)fprintf (stderr,"cpu%d MPERF 0!\n" , old->cpu_id); +if (verbose >1 )fprintf (stderr,"cpu%d MPERF 0!\n" , old->cpu_id); old->mperf =1 ;/* divide by 0 protection */ }
Signature · 1 line
1.7.12.rc0
Re: [PATCH 48/52] tools/power: turbostat: fix large c1% issue
Quoted 8 lines · Len Brown
From: Len Brown <[email protected]>
Under some conditions, c1% was displayed as very large number, much higher than 100%.
c1% is not measured, it is derived as "that, which is left over" from other counters. However, the other counters are not collected atomically, and so it is possible for c1% to be calaculagted as
calculated.
Quoted 57 lines
a small negative number -- displayed as very large positive.
There was a check for mperf vs tsc for this already, but it needed to also include the other counters that are used to calculate c1.
Signed-off-by Len Brown <[email protected]>--- tools/power/x86/turbostat/turbostat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)tools/power/x86/turbostat/turbostat.c +8
-4@@ -444,6 +444,9 @@ delta_core(struct core_data *new, struct core_data *old) old->c7 = new->c7 - old->c7; } +/* +* old = new - old +*/ void delta_thread (struct thread_data *new,struct thread_data *old,struct core_data *core_delta)@@ -482,19 +485,20 @@ delta_thread(struct thread_data *new, struct thread_data *old,/* -* As mperf and tsc collection are not atomic, -* it is possible for mperf's non-halted cycles +* As counter collection is not atomic, +* it is possible for mperf's non-halted cycles + idle states * to exceed TSC's all cycles: show c1 = 0% in that case. */ -if (old->mperf > old->tsc) +if ((old->mperf + core_delta->c3 + core_delta->c6 + core_delta->c7) > old->tsc) old->c1 =0 ;else {/* normal case, derive c1 */ old->c1 = old->tsc - old->mperf - core_delta->c3 - core_delta->c6 - core_delta->c7; } +if (old->mperf ==0 ) { -if (verbose)fprintf (stderr,"cpu%d MPERF 0!\n" , old->cpu_id); +if (verbose >1 )fprintf (stderr,"cpu%d MPERF 0!\n" , old->cpu_id); old->mperf =1 ;/* divide by 0 protection */ }Signature · 6 lines
1.7.12.rc0 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Len Brown
maintainerPATCH 49/52 ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
In reply to Len BrownFrom: Lan Tianyu <[email protected]>
In the ac.c, power_supply_register()'s return value is not checked.
As a result, the driver's add() ops may return success even though the device failed to initialize.
For example, some BIOS may describe two ACADs in the same DSDT. The second ACAD device will fail to register,
but ACPI driver's add() ops returns sucessfully.
The ACPI device will receive ACPI notification and cause OOPS.
https://bugzilla.redhat.com/show_bug.cgi?id=772730
--- drivers/acpi/ac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/acpi/ac.c +3 -1
@@ -292,7 +292,9 @@ static int acpi_ac_add(struct acpi_device *device) ac->charger.properties = ac_props; ac->charger.num_properties =ARRAY_SIZE (ac_props); ac->charger.get_property = get_ac_property; -power_supply_register (&ac->device->dev, &ac->charger); + result =power_supply_register (&ac->device->dev, &ac->charger); +if (result) + goto end; printk(KERN_INFO PREFIX "%s [%s] (%s)\n", acpi_device_name(device), acpi_device_bid(device),
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 50/52 Thermal: Make Thermal trip points writeable
In reply to Len BrownFrom: Durgadoss R <[email protected]>
Some of the thermal drivers using the Generic Thermal Framework require (all/some) trip points to be writeable. This patch makes the trip point temperatures writeable on a per-trip point basis, and modifies the required function call in thermal.c. This patch also updates the Documentation to reflect the new change.
--- Documentation/thermal/sysfs-api.txt | 4 +- drivers/acpi/thermal.c | 4 +- drivers/platform/x86/acerhdf.c | 2 +- drivers/platform/x86/intel_mid_thermal.c | 2 +- drivers/thermal/spear_thermal.c | 2 +- drivers/thermal/thermal_sys.c | 145 +++++++++++++++++++++---------- include/linux/thermal.h | 15 +++- 7 files changed, 121 insertions(+), 53 deletions(-)
Documentation/thermal/sysfs-api.txt +3 -1
@@ -32,7 +32,8 @@ temperature) and throttle appropriate devices. 1.1 thermal zone device interface 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, - int trips, void *devdata, struct thermal_zone_device_ops *ops) + int trips, int mask, void *devdata, + struct thermal_zone_device_ops *ops) This interface function adds a new thermal zone device (sensor) to /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the
@@ -40,6 +41,7 @@ temperature) and throttle appropriate devices. name: the thermal zone name. trips: the total number of trip points this thermal zone supports. + mask: Bit string: If 'n'th bit is set, then trip point 'n' is writeable. devdata: device private data ops: thermal zone device call-backs. .bind: bind the thermal zone device with a thermal cooling device.
drivers/acpi/thermal.c +2 -2
@@ -845,7 +845,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)if (tz->trips.passive.flags.valid) tz->thermal_zone = - thermal_zone_device_register("acpitz", trips, tz, + thermal_zone_device_register("acpitz", trips, 0, tz, &acpi_thermal_zone_ops, tz->trips.passive.tc1, tz->trips.passive.tc2,
@@ -853,7 +853,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) tz->polling_frequency*100); else tz->thermal_zone = -thermal_zone_device_register ("acpitz" , trips, tz, +thermal_zone_device_register ("acpitz" , trips,0 , tz, &acpi_thermal_zone_ops,0 ,0 ,0 , tz->polling_frequency*100 );
drivers/platform/x86/acerhdf.c +1 -1
@@ -660,7 +660,7 @@ static int acerhdf_register_thermal(void)if (IS_ERR (cl_dev))return -EINVAL ; - thz_dev =thermal_zone_device_register ("acerhdf" ,1 ,NULL , + thz_dev =thermal_zone_device_register ("acerhdf" ,1 ,0 ,NULL , &acerhdf_dev_ops,0 ,0 ,0 , (kernelmode) ? interval*1000 :0 );if (IS_ERR (thz_dev))
drivers/platform/x86/intel_mid_thermal.c +1 -1
@@ -499,7 +499,7 @@ static int mid_thermal_probe(struct platform_device *pdev) goto err; } pinfo->tzd[i] =thermal_zone_device_register (name[i], -0 , td_info, &tzd_ops,0 ,0 ,0 ,0 ); +0 ,0 , td_info, &tzd_ops,0 ,0 ,0 ,0 );if (IS_ERR (pinfo->tzd[i])) {kfree (td_info); ret =PTR_ERR (pinfo->tzd[i]);
drivers/thermal/spear_thermal.c +1 -1
@@ -147,7 +147,7 @@ static int spear_thermal_probe(struct platform_device *pdev) stdev->flags = pdata->thermal_flags;writel_relaxed (stdev->flags, stdev->thermal_base); - spear_thermal =thermal_zone_device_register ("spear_thermal" ,0 , + spear_thermal =thermal_zone_device_register ("spear_thermal" ,0 ,0 , stdev, &ops,0 ,0 ,0 ,0 );if (IS_ERR (spear_thermal)) {dev_err (&pdev->dev,"thermal zone device is NULL\n" );
drivers/thermal/thermal_sys.c +101 -44
198 lines not on this page · raw message
include/linux/thermal.h +12 -3
@@ -58,6 +58,8 @@ struct thermal_zone_device_ops { enum thermal_trip_type *);int (*get_trip_temp) (struct thermal_zone_device *,int ,unsigned long *); +int (*set_trip_temp) (struct thermal_zone_device *,int , +unsigned long );int (*get_crit_temp) (struct thermal_zone_device *,unsigned long *);int (*notify) (struct thermal_zone_device *,int ,enum thermal_trip_type );
@@ -85,10 +87,17 @@ struct thermal_cooling_device { ((long)t-2732+5)/10 : ((long)t-2732-5)/10)#define CELSIUS_TO_KELVIN (t) ((t)*10+2732) +struct thermal_attr { +struct device_attribute attr; +char name[THERMAL_NAME_LENGTH ]; +}; +struct thermal_zone_device {int id;char type[THERMAL_NAME_LENGTH ];struct device device; +struct thermal_attr *trip_temp_attrs; +struct thermal_attr *trip_type_attrs;void *devdata;int trips;int tc1;
@@ -137,9 +146,9 @@ enum { };#define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) -struct thermal_zone_device *thermal_zone_device_register (char *,int ,void *, -const struct thermal_zone_device_ops *,int tc1,int tc2, -int passive_freq,int polling_freq); +struct thermal_zone_device *thermal_zone_device_register (char *,int ,int , +void *,const struct thermal_zone_device_ops *,int tc1, +int tc2,int passive_freq,int polling_freq);void thermal_zone_device_unregister (struct thermal_zone_device *); int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
Signature · 1 line
1.7.12.rc0
Re: [PATCH 50/52] Thermal: Make Thermal trip points writeable
Quoted 11 lines · Len Brown
From: Durgadoss R <[email protected]>
Some of the thermal drivers using the Generic Thermal Framework require (all/some) trip points to be writeable. This patch makes the trip point temperatures writeable on a per-trip point basis, and modifies the required function call in
thermal.c. This patch also updates the Documentation to reflect the new change.Signed-off-by Durgadoss R <[email protected]>Signed-off-by Zhang Rui <[email protected]>Signed-off-by Len Brown <[email protected]>
There was a broken build report related to this patch (or a previous version of it):
http://marc.info/?l=linux-kernel&m=134294496105083&w=2
Do I think correctly that it has been fixed already?
Rafael
Quoted 348 lines
--- Documentation/thermal/sysfs-api.txt | 4 +- drivers/acpi/thermal.c | 4 +- drivers/platform/x86/acerhdf.c | 2 +- drivers/platform/x86/intel_mid_thermal.c | 2 +- drivers/thermal/spear_thermal.c | 2 +- drivers/thermal/thermal_sys.c | 145 +++++++++++++++++++++---------- include/linux/thermal.h | 15 +++- 7 files changed, 121 insertions(+), 53 deletions(-)Documentation/thermal/sysfs-api.txt +3
-1@@ -32,7 +32,8 @@ temperature) and throttle appropriate devices. 1.1 thermal zone device interface 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, - int trips, void *devdata, struct thermal_zone_device_ops *ops) + int trips, int mask, void *devdata, + struct thermal_zone_device_ops *ops) This interface function adds a new thermal zone device (sensor) to /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the@@ -40,6 +41,7 @@ temperature) and throttle appropriate devices. name: the thermal zone name. trips: the total number of trip points this thermal zone supports. + mask: Bit string: If 'n'th bit is set, then trip point 'n' is writeable. devdata: device private data ops: thermal zone device call-backs. .bind: bind the thermal zone device with a thermal cooling device.drivers/acpi/thermal.c +2
-2@@ -845,7 +845,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)if (tz->trips.passive.flags.valid) tz->thermal_zone = - thermal_zone_device_register("acpitz", trips, tz, + thermal_zone_device_register("acpitz", trips, 0, tz, &acpi_thermal_zone_ops, tz->trips.passive.tc1, tz->trips.passive.tc2,@@ -853,7 +853,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) tz->polling_frequency*100); else tz->thermal_zone = -thermal_zone_device_register ("acpitz" , trips, tz, +thermal_zone_device_register ("acpitz" , trips,0 , tz, &acpi_thermal_zone_ops,0 ,0 ,0 , tz->polling_frequency*100 );drivers/platform/x86/acerhdf.c +1
-1@@ -660,7 +660,7 @@ static int acerhdf_register_thermal(void)if (IS_ERR (cl_dev))return -EINVAL ; - thz_dev =thermal_zone_device_register ("acerhdf" ,1 ,NULL , + thz_dev =thermal_zone_device_register ("acerhdf" ,1 ,0 ,NULL , &acerhdf_dev_ops,0 ,0 ,0 , (kernelmode) ? interval*1000 :0 );if (IS_ERR (thz_dev))drivers/platform/x86/intel_mid_thermal.c +1
-1@@ -499,7 +499,7 @@ static int mid_thermal_probe(struct platform_device *pdev) goto err; } pinfo->tzd[i] =thermal_zone_device_register (name[i], -0 , td_info, &tzd_ops,0 ,0 ,0 ,0 ); +0 ,0 , td_info, &tzd_ops,0 ,0 ,0 ,0 );if (IS_ERR (pinfo->tzd[i])) {kfree (td_info); ret =PTR_ERR (pinfo->tzd[i]);drivers/thermal/spear_thermal.c +1
-1@@ -147,7 +147,7 @@ static int spear_thermal_probe(struct platform_device *pdev) stdev->flags = pdata->thermal_flags;writel_relaxed (stdev->flags, stdev->thermal_base); - spear_thermal =thermal_zone_device_register ("spear_thermal" ,0 , + spear_thermal =thermal_zone_device_register ("spear_thermal" ,0 ,0 , stdev, &ops,0 ,0 ,0 ,0 );if (IS_ERR (spear_thermal)) {dev_err (&pdev->dev,"thermal zone device is NULL\n" );drivers/thermal/thermal_sys.c +101
-44@@ -196,6 +196,28 @@ trip_point_type_show(struct device *dev, struct device_attribute *attr, }static ssize_t +trip_point_temp_store (struct device *dev,struct device_attribute *attr, +const char *buf,size_t count) +{ +struct thermal_zone_device *tz =to_thermal_zone (dev); +int trip, ret; +unsigned long temperature; + +if (!tz->ops->set_trip_temp) +return -EPERM ; + +if (!sscanf (attr->attr.name,"trip_point_%d_temp" , &trip)) +return -EINVAL ; + +if (kstrtoul (buf,10 , &temperature)) +return -EINVAL ; + + ret = tz->ops->set_trip_temp (tz, trip, temperature); + +return ret ? ret : count; +} + +static ssize_t trip_point_temp_show (struct device *dev,struct device_attribute *attr,char *buf) {@@ -283,33 +305,6 @@ static DEVICE_ATTR(temp, 0444, temp_show, NULL); static DEVICE_ATTR(mode, 0644, mode_show, mode_store); static DEVICE_ATTR(passive, S_IRUGO | S_IWUSR, passive_show, passive_store); -static struct device_attribute trip_point_attrs[] = { -__ATTR (trip_point_0_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_0_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_1_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_1_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_2_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_2_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_3_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_3_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_4_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_4_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_5_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_5_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_6_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_6_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_7_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_7_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_8_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_8_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_9_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_9_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_10_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_10_temp,0444 , trip_point_temp_show,NULL ), -__ATTR (trip_point_11_type,0444 , trip_point_type_show,NULL ), -__ATTR (trip_point_11_temp,0444 , trip_point_temp_show,NULL ), -}; -/* sys I/F for cooling device */ #define to_cooling_device (_dev) \ container_of(_dev, struct thermal_cooling_device, device)@@ -1089,9 +1084,81 @@ leave:EXPORT_SYMBOL (thermal_zone_device_update);/** +* create_trip_attrs - create attributes for trip points +* @tz: the thermal zone device +* @mask: Writeable trip point bitmap. +*/ +static int create_trip_attrs (struct thermal_zone_device *tz,int mask) +{ +int indx; + + tz->trip_type_attrs = +kzalloc (sizeof (struct thermal_attr ) * tz->trips,GFP_KERNEL ); +if (!tz->trip_type_attrs) +return -ENOMEM ; + + tz->trip_temp_attrs = +kzalloc (sizeof (struct thermal_attr ) * tz->trips,GFP_KERNEL ); +if (!tz->trip_temp_attrs) { +kfree (tz->trip_type_attrs); +return -ENOMEM ; + } + +for (indx =0 ; indx < tz->trips; indx++) { + +/* create trip type attribute */ +snprintf (tz->trip_type_attrs[indx].name,THERMAL_NAME_LENGTH , +"trip_point_%d_type" , indx); + +sysfs_attr_init (&tz->trip_type_attrs[indx].attr.attr); + tz->trip_type_attrs[indx].attr.attr.name = + tz->trip_type_attrs[indx].name; + tz->trip_type_attrs[indx].attr.attr.mode =S_IRUGO ; + tz->trip_type_attrs[indx].attr.show = trip_point_type_show; + +device_create_file (&tz->device, + &tz->trip_type_attrs[indx].attr); + +/* create trip temp attribute */ +snprintf (tz->trip_temp_attrs[indx].name,THERMAL_NAME_LENGTH , +"trip_point_%d_temp" , indx); + +sysfs_attr_init (&tz->trip_temp_attrs[indx].attr.attr); + tz->trip_temp_attrs[indx].attr.attr.name = + tz->trip_temp_attrs[indx].name; + tz->trip_temp_attrs[indx].attr.attr.mode =S_IRUGO ; + tz->trip_temp_attrs[indx].attr.show = trip_point_temp_show; +if (mask & (1 << indx)) { + tz->trip_temp_attrs[indx].attr.attr.mode |=S_IWUSR ; + tz->trip_temp_attrs[indx].attr.store = + trip_point_temp_store; + } + +device_create_file (&tz->device, + &tz->trip_temp_attrs[indx].attr); + } +return 0 ; +} + +static void remove_trip_attrs (struct thermal_zone_device *tz) +{ +int indx; + +for (indx =0 ; indx < tz->trips; indx++) { +device_remove_file (&tz->device, + &tz->trip_type_attrs[indx].attr); +device_remove_file (&tz->device, + &tz->trip_temp_attrs[indx].attr); + } +kfree (tz->trip_type_attrs); +kfree (tz->trip_temp_attrs); +} + +/** * thermal_zone_device_register - register a new thermal zone device * @type: the thermal zone device type * @trips: the number of trip points the thermal zone support +* @mask: a bit string indicating the writeablility of trip points * @devdata: private device data * @ops: standard thermal zone device callbacks * @tc1: thermal coefficient 1 for passive calculations @@ -1107,7 +1174,7 @@ EXPORT_SYMBOL(thermal_zone_device_update);* section 11.1.5.1 of the ACPI specification 3.0. */ struct thermal_zone_device *thermal_zone_device_register (char *type, -int trips,void *devdata, +int trips,int mask,void *devdata,const struct thermal_zone_device_ops *ops,int tc1,int tc2,int passive_delay,int polling_delay) {@@ -1121,7 +1188,7 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,if (strlen (type) >=THERMAL_NAME_LENGTH )return ERR_PTR (-EINVAL ); -if (trips >THERMAL_MAX_TRIPS || trips <0 ) +if (trips >THERMAL_MAX_TRIPS || trips <0 || mask >> trips)return ERR_PTR (-EINVAL );if (!ops || !ops->get_temp)@@ -1175,15 +1242,11 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, goto unregister; } + result =create_trip_attrs (tz, mask); +if (result) + goto unregister; +for (count =0 ; count < trips; count++) { - result =device_create_file (&tz->device, - &trip_point_attrs[count *2 ]); -if (result) -break ; - result =device_create_file (&tz->device, - &trip_point_attrs[count *2 +1 ]); -if (result) - goto unregister; tz->ops->get_trip_type (tz, count, &trip_type);if (trip_type ==THERMAL_TRIP_PASSIVE ) passive =1 ;@@ -1232,7 +1295,6 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) {struct thermal_cooling_device *cdev;struct thermal_zone_device *pos =NULL ; -int count;if (!tz)return ;@@ -1259,13 +1321,8 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)device_remove_file (&tz->device, &dev_attr_temp);if (tz->ops->get_mode)device_remove_file (&tz->device, &dev_attr_mode); +remove_trip_attrs (tz); -for (count =0 ; count < tz->trips; count++) { -device_remove_file (&tz->device, - &trip_point_attrs[count *2 ]); -device_remove_file (&tz->device, - &trip_point_attrs[count *2 +1 ]); - }thermal_remove_hwmon_sysfs (tz);release_idr (&thermal_tz_idr, &thermal_idr_lock, tz->id);idr_destroy (&tz->idr);include/linux/thermal.h +12
-3@@ -58,6 +58,8 @@ struct thermal_zone_device_ops { enum thermal_trip_type *);int (*get_trip_temp) (struct thermal_zone_device *,int ,unsigned long *); +int (*set_trip_temp) (struct thermal_zone_device *,int , +unsigned long );int (*get_crit_temp) (struct thermal_zone_device *,unsigned long *);int (*notify) (struct thermal_zone_device *,int ,enum thermal_trip_type );@@ -85,10 +87,17 @@ struct thermal_cooling_device { ((long)t-2732+5)/10 : ((long)t-2732-5)/10)#define CELSIUS_TO_KELVIN (t) ((t)*10+2732) +struct thermal_attr { +struct device_attribute attr; +char name[THERMAL_NAME_LENGTH ]; +}; +struct thermal_zone_device {int id;char type[THERMAL_NAME_LENGTH ];struct device device; +struct thermal_attr *trip_temp_attrs; +struct thermal_attr *trip_type_attrs;void *devdata;int trips;int tc1;@@ -137,9 +146,9 @@ enum { };#define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) -struct thermal_zone_device *thermal_zone_device_register (char *,int ,void *, -const struct thermal_zone_device_ops *,int tc1,int tc2, -int passive_freq,int polling_freq); +struct thermal_zone_device *thermal_zone_device_register (char *,int ,int , +void *,const struct thermal_zone_device_ops *,int tc1, +int tc2,int passive_freq,int polling_freq);void thermal_zone_device_unregister (struct thermal_zone_device *); int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
RE: [linux-pm] [PATCH 50/52] Thermal: Make Thermal trip points writeable
Hi Rafael,
Quoted 23 lines
-----Original Message-----
From: [email protected] [mailto:linux-pm- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Wednesday, July 25, 2012 4:43 PM
To: Len Brown; Zhang, Rui
Cc: [email protected]; [email protected]; Durgadoss R; [email protected]; Brown, Len
Subject: Re: [linux-pm] [PATCH 50/52] Thermal: Make Thermal trip points writeableQuoted 11 lines · Len Brown
From: Durgadoss R <[email protected]>
Some of the thermal drivers using the Generic Thermal Framework require (all/some) trip points to be writeable. This patch makes the trip point temperatures writeable on a per-trip point basis, and modifies the required function call in
thermal.c. This patch also updates the Documentation to reflect the new change.Signed-off-by Durgadoss R <[email protected]>Signed-off-by Zhang Rui <[email protected]>Signed-off-by Len Brown <[email protected]>
Quoted 6 lines
There was a broken build report related to this patch (or a previous version of it):
http://marc.info/?l=linux-kernel&m=134294496105083&w=2
Do I think correctly that it has been fixed already?
Yes you are right. It has been fixed in this patch.
Thanks,
Durga
Len Brown
maintainerPATCH 51/52 Thermal: Add Hysteresis attributes
In reply to Len BrownFrom: Durgadoss R <[email protected]>
The Linux Thermal Framework does not support hysteresis attributes. Most thermal sensors, today, have a hysteresis value associated with trip points.
This patch adds hysteresis attributes on a per-trip-point basis, to the Thermal Framework. These attributes are optionally writable.
--- Documentation/thermal/sysfs-api.txt | 6 +++ drivers/thermal/thermal_sys.c | 88 ++++++++++++++++++++++++++++++++++--- include/linux/thermal.h | 5 +++ 3 files changed, 94 insertions(+), 5 deletions(-)
Documentation/thermal/sysfs-api.txt +6 -0
@@ -121,6 +121,7 @@ Thermal zone device sys I/F, created once it's registered: |---mode: Working mode of the thermal zone |---trip_point_[0-*]_temp: Trip point temperature |---trip_point_[0-*]_type: Trip point type + |---trip_point_[0-*]_hyst: Hysteresis value for this trip point Thermal cooling device sys I/F, created once it's registered: /sys/class/thermal/cooling_device[0-*]:
@@ -190,6 +191,11 @@ trip_point_[0-*]_type thermal zone. RO, Optional +trip_point_[0-*]_hyst + The hysteresis value for a trip point, represented as an integer + Unit: Celsius + RW, Optional + cdev[0-*] Sysfs link to the thermal cooling device node where the sys I/F for cooling device throttling control represents.
drivers/thermal/thermal_sys.c +83 -5
125 lines not on this page · raw message
include/linux/thermal.h +5 -0
@@ -60,6 +60,10 @@ struct thermal_zone_device_ops { unsigned long *);int (*set_trip_temp) (struct thermal_zone_device *,int ,unsigned long ); +int (*get_trip_hyst) (struct thermal_zone_device *,int , +unsigned long *); +int (*set_trip_hyst) (struct thermal_zone_device *,int , +unsigned long );int (*get_crit_temp) (struct thermal_zone_device *,unsigned long *);int (*notify) (struct thermal_zone_device *,int ,enum thermal_trip_type );
@@ -98,6 +102,7 @@ struct thermal_zone_device {struct device device;struct thermal_attr *trip_temp_attrs;struct thermal_attr *trip_type_attrs; +struct thermal_attr *trip_hyst_attrs;void *devdata;int trips;int tc1;
Signature · 1 line
1.7.12.rc0
Len Brown
maintainerPATCH 52/52 Thermal: Documentation update
In reply to Len BrownFrom: Zhang Rui <[email protected]>
With commit 6503e5df08008b9a47022b5e9ebba658c8fa69af, the value of /sys/class/thermal/thermal_zoneX/mode has been changed from user/kernel to enabled/disabled.
Update the documentation so that users won't be confused.
--- Documentation/thermal/sysfs-api.txt | 20 ++++++++++---------- drivers/acpi/thermal.c | 6 ++---- 2 files changed, 12 insertions(+), 14 deletions(-)
Documentation/thermal/sysfs-api.txt +10 -10
@@ -47,11 +47,11 @@ temperature) and throttle appropriate devices. .bind: bind the thermal zone device with a thermal cooling device. .unbind: unbind the thermal zone device with a thermal cooling device. .get_temp: get the current temperature of the thermal zone. - .get_mode: get the current mode (user/kernel) of the thermal zone. - - "kernel" means thermal management is done in kernel. - - "user" will prevent kernel thermal driver actions upon trip points + .get_mode: get the current mode (enabled/disabled) of the thermal zone. + - "enabled" means the kernel thermal management is enabled. + - "disabled" will prevent kernel thermal driver action upon trip points so that user applications can take charge of thermal management. - .set_mode: set the mode (user/kernel) of the thermal zone. + .set_mode: set the mode (enabled/disabled) of the thermal zone. .get_trip_type: get the type of certain trip point. .get_trip_temp: get the temperature above which the certain trip point will be fired.
@@ -170,14 +170,14 @@ temp RO, Required mode - One of the predefined values in [kernel, user]. + One of the predefined values in [enabled, disabled]. This file gives information about the algorithm that is currently managing the thermal zone. It can be either default kernel based algorithm or user space application. - kernel = Thermal management in kernel thermal zone driver. - user = Preventing kernel thermal zone driver actions upon - trip points so that user application can take full - charge of the thermal management. + enabled = enable Kernel Thermal management. + disabled = Preventing kernel thermal zone driver actions upon + trip points so that user application can take full + charge of the thermal management. RW, Optional trip_point_[0-*]_temp
@@ -256,7 +256,7 @@ method, the sys I/F structure will be built like this: |thermal_zone1: |---type: acpitz |---temp: 37000 - |---mode: kernel + |---mode: enabled |---trip_point_0_temp: 100000 |---trip_point_0_type: critical |---trip_point_1_temp: 80000
drivers/acpi/thermal.c +2 -4
@@ -550,8 +550,6 @@ static int thermal_get_temp(struct thermal_zone_device *thermal,return 0 ; } -static const char enabled[] ="kernel" ; -static const char disabled[] ="user" ;static int thermal_get_mode (struct thermal_zone_device *thermal,enum thermal_device_mode *mode) {
@@ -588,8 +586,8 @@ static int thermal_set_mode(struct thermal_zone_device *thermal,if (enable != tz->tz_enabled) { tz->tz_enabled = enable;ACPI_DEBUG_PRINT ((ACPI_DB_INFO , -"%s ACPI thermal control\n" , - tz->tz_enabled ? enabled : disabled)); +"%s kernel ACPI thermal control\n" , + tz->tz_enabled ?"Enable" :"Disable" ));acpi_thermal_check (tz); }return 0 ;
Signature · 1 line
1.7.12.rc0
Quoted 2 lines · Len Brown
Here is my initial queue of patches for Linux 3.6. Please let me know if you see troubles with any of them.
Hi Len,
I cannot see my patches (V5)
http://www.spinics.net/lists/linux-pm/msg27866.html in your list. V4 version was part of your pull request for the last merge window. Also because of Durgadoss's "Thermal trip points writeable" patch present in this list one small rework is needed. I will update it and resend it shortly.
Thanks,
Amit Daniel
Quoted 4 lines
thanks,
Len Brown, Intel Open Source Technology Center