diff options
Diffstat (limited to 'drivers/acpi/namespace')
-rw-r--r-- | drivers/acpi/namespace/nsaccess.c | 6 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsalloc.c | 12 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsdump.c | 8 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsdumpdv.c | 4 | ||||
-rw-r--r-- | drivers/acpi/namespace/nseval.c | 10 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsinit.c | 265 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsload.c | 24 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsnames.c | 4 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsobject.c | 12 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsparse.c | 4 | ||||
-rw-r--r-- | drivers/acpi/namespace/nssearch.c | 8 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsutils.c | 18 | ||||
-rw-r--r-- | drivers/acpi/namespace/nswalk.c | 2 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsxfeval.c | 8 |
14 files changed, 247 insertions, 138 deletions
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index d4914fda6a37..5e3f63a90fb4 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c | |||
@@ -70,7 +70,7 @@ acpi_status acpi_ns_root_initialize(void) | |||
70 | union acpi_operand_object *obj_desc; | 70 | union acpi_operand_object *obj_desc; |
71 | acpi_string val = NULL; | 71 | acpi_string val = NULL; |
72 | 72 | ||
73 | ACPI_FUNCTION_TRACE("ns_root_initialize"); | 73 | ACPI_FUNCTION_TRACE(ns_root_initialize); |
74 | 74 | ||
75 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | 75 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); |
76 | if (ACPI_FAILURE(status)) { | 76 | if (ACPI_FAILURE(status)) { |
@@ -314,7 +314,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
314 | u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND | | 314 | u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND | |
315 | ACPI_NS_SEARCH_PARENT); | 315 | ACPI_NS_SEARCH_PARENT); |
316 | 316 | ||
317 | ACPI_FUNCTION_TRACE("ns_lookup"); | 317 | ACPI_FUNCTION_TRACE(ns_lookup); |
318 | 318 | ||
319 | if (!return_node) { | 319 | if (!return_node) { |
320 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 320 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
@@ -615,7 +615,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
615 | /* Complain about a type mismatch */ | 615 | /* Complain about a type mismatch */ |
616 | 616 | ||
617 | ACPI_WARNING((AE_INFO, | 617 | ACPI_WARNING((AE_INFO, |
618 | "ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)", | 618 | "NsLookup: Type mismatch on %4.4s (%s), searching for (%s)", |
619 | ACPI_CAST_PTR(char, &simple_name), | 619 | ACPI_CAST_PTR(char, &simple_name), |
620 | acpi_ut_get_type_name(this_node->type), | 620 | acpi_ut_get_type_name(this_node->type), |
621 | acpi_ut_get_type_name | 621 | acpi_ut_get_type_name |
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index c92c03693a16..dc3f0739a46b 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c | |||
@@ -62,7 +62,7 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) | |||
62 | { | 62 | { |
63 | struct acpi_namespace_node *node; | 63 | struct acpi_namespace_node *node; |
64 | 64 | ||
65 | ACPI_FUNCTION_TRACE("ns_create_node"); | 65 | ACPI_FUNCTION_TRACE(ns_create_node); |
66 | 66 | ||
67 | node = acpi_os_acquire_object(acpi_gbl_namespace_cache); | 67 | node = acpi_os_acquire_object(acpi_gbl_namespace_cache); |
68 | if (!node) { | 68 | if (!node) { |
@@ -94,7 +94,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) | |||
94 | struct acpi_namespace_node *prev_node; | 94 | struct acpi_namespace_node *prev_node; |
95 | struct acpi_namespace_node *next_node; | 95 | struct acpi_namespace_node *next_node; |
96 | 96 | ||
97 | ACPI_FUNCTION_TRACE_PTR("ns_delete_node", node); | 97 | ACPI_FUNCTION_TRACE_PTR(ns_delete_node, node); |
98 | 98 | ||
99 | parent_node = acpi_ns_get_parent_node(node); | 99 | parent_node = acpi_ns_get_parent_node(node); |
100 | 100 | ||
@@ -167,7 +167,7 @@ void acpi_ns_install_node(struct acpi_walk_state *walk_state, struct acpi_namesp | |||
167 | acpi_owner_id owner_id = 0; | 167 | acpi_owner_id owner_id = 0; |
168 | struct acpi_namespace_node *child_node; | 168 | struct acpi_namespace_node *child_node; |
169 | 169 | ||
170 | ACPI_FUNCTION_TRACE("ns_install_node"); | 170 | ACPI_FUNCTION_TRACE(ns_install_node); |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * Get the owner ID from the Walk state | 173 | * Get the owner ID from the Walk state |
@@ -234,7 +234,7 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) | |||
234 | struct acpi_namespace_node *next_node; | 234 | struct acpi_namespace_node *next_node; |
235 | u8 flags; | 235 | u8 flags; |
236 | 236 | ||
237 | ACPI_FUNCTION_TRACE_PTR("ns_delete_children", parent_node); | 237 | ACPI_FUNCTION_TRACE_PTR(ns_delete_children, parent_node); |
238 | 238 | ||
239 | if (!parent_node) { | 239 | if (!parent_node) { |
240 | return_VOID; | 240 | return_VOID; |
@@ -313,7 +313,7 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) | |||
313 | struct acpi_namespace_node *child_node = NULL; | 313 | struct acpi_namespace_node *child_node = NULL; |
314 | u32 level = 1; | 314 | u32 level = 1; |
315 | 315 | ||
316 | ACPI_FUNCTION_TRACE("ns_delete_namespace_subtree"); | 316 | ACPI_FUNCTION_TRACE(ns_delete_namespace_subtree); |
317 | 317 | ||
318 | if (!parent_node) { | 318 | if (!parent_node) { |
319 | return_VOID; | 319 | return_VOID; |
@@ -395,7 +395,7 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) | |||
395 | u32 level; | 395 | u32 level; |
396 | struct acpi_namespace_node *parent_node; | 396 | struct acpi_namespace_node *parent_node; |
397 | 397 | ||
398 | ACPI_FUNCTION_TRACE_U32("ns_delete_namespace_by_owner", owner_id); | 398 | ACPI_FUNCTION_TRACE_U32(ns_delete_namespace_by_owner, owner_id); |
399 | 399 | ||
400 | if (owner_id == 0) { | 400 | if (owner_id == 0) { |
401 | return_VOID; | 401 | return_VOID; |
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c index 5662d2def62f..d72df66aa965 100644 --- a/drivers/acpi/namespace/nsdump.c +++ b/drivers/acpi/namespace/nsdump.c | |||
@@ -75,7 +75,7 @@ void acpi_ns_print_pathname(u32 num_segments, char *pathname) | |||
75 | { | 75 | { |
76 | acpi_native_uint i; | 76 | acpi_native_uint i; |
77 | 77 | ||
78 | ACPI_FUNCTION_NAME("ns_print_pathname"); | 78 | ACPI_FUNCTION_NAME(ns_print_pathname); |
79 | 79 | ||
80 | if (!(acpi_dbg_level & ACPI_LV_NAMES) | 80 | if (!(acpi_dbg_level & ACPI_LV_NAMES) |
81 | || !(acpi_dbg_layer & ACPI_NAMESPACE)) { | 81 | || !(acpi_dbg_layer & ACPI_NAMESPACE)) { |
@@ -123,7 +123,7 @@ void | |||
123 | acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component) | 123 | acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component) |
124 | { | 124 | { |
125 | 125 | ||
126 | ACPI_FUNCTION_TRACE("ns_dump_pathname"); | 126 | ACPI_FUNCTION_TRACE(ns_dump_pathname); |
127 | 127 | ||
128 | /* Do this only if the requested debug level and component are enabled */ | 128 | /* Do this only if the requested debug level and component are enabled */ |
129 | 129 | ||
@@ -167,7 +167,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
167 | u32 dbg_level; | 167 | u32 dbg_level; |
168 | u32 i; | 168 | u32 i; |
169 | 169 | ||
170 | ACPI_FUNCTION_NAME("ns_dump_one_object"); | 170 | ACPI_FUNCTION_NAME(ns_dump_one_object); |
171 | 171 | ||
172 | /* Is output enabled? */ | 172 | /* Is output enabled? */ |
173 | 173 | ||
@@ -675,7 +675,7 @@ void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth) | |||
675 | { | 675 | { |
676 | acpi_handle search_handle = search_base; | 676 | acpi_handle search_handle = search_base; |
677 | 677 | ||
678 | ACPI_FUNCTION_TRACE("ns_dump_tables"); | 678 | ACPI_FUNCTION_TRACE(ns_dump_tables); |
679 | 679 | ||
680 | if (!acpi_gbl_root_node) { | 680 | if (!acpi_gbl_root_node) { |
681 | /* | 681 | /* |
diff --git a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c index 2b311da01ef5..c6bf5d30fca3 100644 --- a/drivers/acpi/namespace/nsdumpdv.c +++ b/drivers/acpi/namespace/nsdumpdv.c | |||
@@ -74,7 +74,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, | |||
74 | acpi_status status; | 74 | acpi_status status; |
75 | u32 i; | 75 | u32 i; |
76 | 76 | ||
77 | ACPI_FUNCTION_NAME("ns_dump_one_device"); | 77 | ACPI_FUNCTION_NAME(ns_dump_one_device); |
78 | 78 | ||
79 | status = | 79 | status = |
80 | acpi_ns_dump_one_object(obj_handle, level, context, return_value); | 80 | acpi_ns_dump_one_object(obj_handle, level, context, return_value); |
@@ -115,7 +115,7 @@ void acpi_ns_dump_root_devices(void) | |||
115 | acpi_handle sys_bus_handle; | 115 | acpi_handle sys_bus_handle; |
116 | acpi_status status; | 116 | acpi_status status; |
117 | 117 | ||
118 | ACPI_FUNCTION_NAME("ns_dump_root_devices"); | 118 | ACPI_FUNCTION_NAME(ns_dump_root_devices); |
119 | 119 | ||
120 | /* Only dump the table if tracing is enabled */ | 120 | /* Only dump the table if tracing is enabled */ |
121 | 121 | ||
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c index f5d8e71b82cc..4b054062b46a 100644 --- a/drivers/acpi/namespace/nseval.c +++ b/drivers/acpi/namespace/nseval.c | |||
@@ -85,7 +85,7 @@ acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info) | |||
85 | union acpi_generic_state *scope_info; | 85 | union acpi_generic_state *scope_info; |
86 | char *internal_path = NULL; | 86 | char *internal_path = NULL; |
87 | 87 | ||
88 | ACPI_FUNCTION_TRACE("ns_evaluate_relative"); | 88 | ACPI_FUNCTION_TRACE(ns_evaluate_relative); |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Must have a valid object handle | 91 | * Must have a valid object handle |
@@ -182,7 +182,7 @@ acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info) | |||
182 | acpi_status status; | 182 | acpi_status status; |
183 | char *internal_path = NULL; | 183 | char *internal_path = NULL; |
184 | 184 | ||
185 | ACPI_FUNCTION_TRACE("ns_evaluate_by_name"); | 185 | ACPI_FUNCTION_TRACE(ns_evaluate_by_name); |
186 | 186 | ||
187 | /* Build an internal name string for the method */ | 187 | /* Build an internal name string for the method */ |
188 | 188 | ||
@@ -262,7 +262,7 @@ acpi_status acpi_ns_evaluate_by_handle(struct acpi_parameter_info *info) | |||
262 | { | 262 | { |
263 | acpi_status status; | 263 | acpi_status status; |
264 | 264 | ||
265 | ACPI_FUNCTION_TRACE("ns_evaluate_by_handle"); | 265 | ACPI_FUNCTION_TRACE(ns_evaluate_by_handle); |
266 | 266 | ||
267 | /* Check if namespace has been initialized */ | 267 | /* Check if namespace has been initialized */ |
268 | 268 | ||
@@ -368,7 +368,7 @@ acpi_ns_execute_control_method(struct acpi_parameter_info *info) | |||
368 | { | 368 | { |
369 | acpi_status status; | 369 | acpi_status status; |
370 | 370 | ||
371 | ACPI_FUNCTION_TRACE("ns_execute_control_method"); | 371 | ACPI_FUNCTION_TRACE(ns_execute_control_method); |
372 | 372 | ||
373 | /* Verify that there is a method associated with this object */ | 373 | /* Verify that there is a method associated with this object */ |
374 | 374 | ||
@@ -436,7 +436,7 @@ static acpi_status acpi_ns_get_object_value(struct acpi_parameter_info *info) | |||
436 | acpi_status status = AE_OK; | 436 | acpi_status status = AE_OK; |
437 | struct acpi_namespace_node *resolved_node = info->node; | 437 | struct acpi_namespace_node *resolved_node = info->node; |
438 | 438 | ||
439 | ACPI_FUNCTION_TRACE("ns_get_object_value"); | 439 | ACPI_FUNCTION_TRACE(ns_get_object_value); |
440 | 440 | ||
441 | /* | 441 | /* |
442 | * Objects require additional resolution steps (e.g., the Node may be a | 442 | * Objects require additional resolution steps (e.g., the Node may be a |
diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c index 57b2537643c7..bf1d8dbc0b86 100644 --- a/drivers/acpi/namespace/nsinit.c +++ b/drivers/acpi/namespace/nsinit.c | |||
@@ -58,6 +58,10 @@ static acpi_status | |||
58 | acpi_ns_init_one_device(acpi_handle obj_handle, | 58 | acpi_ns_init_one_device(acpi_handle obj_handle, |
59 | u32 nesting_level, void *context, void **return_value); | 59 | u32 nesting_level, void *context, void **return_value); |
60 | 60 | ||
61 | static acpi_status | ||
62 | acpi_ns_find_ini_methods(acpi_handle obj_handle, | ||
63 | u32 nesting_level, void *context, void **return_value); | ||
64 | |||
61 | /******************************************************************************* | 65 | /******************************************************************************* |
62 | * | 66 | * |
63 | * FUNCTION: acpi_ns_initialize_objects | 67 | * FUNCTION: acpi_ns_initialize_objects |
@@ -76,7 +80,7 @@ acpi_status acpi_ns_initialize_objects(void) | |||
76 | acpi_status status; | 80 | acpi_status status; |
77 | struct acpi_init_walk_info info; | 81 | struct acpi_init_walk_info info; |
78 | 82 | ||
79 | ACPI_FUNCTION_TRACE("ns_initialize_objects"); | 83 | ACPI_FUNCTION_TRACE(ns_initialize_objects); |
80 | 84 | ||
81 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, | 85 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, |
82 | "**** Starting initialization of namespace objects ****\n")); | 86 | "**** Starting initialization of namespace objects ****\n")); |
@@ -93,7 +97,7 @@ acpi_status acpi_ns_initialize_objects(void) | |||
93 | ACPI_UINT32_MAX, acpi_ns_init_one_object, | 97 | ACPI_UINT32_MAX, acpi_ns_init_one_object, |
94 | &info, NULL); | 98 | &info, NULL); |
95 | if (ACPI_FAILURE(status)) { | 99 | if (ACPI_FAILURE(status)) { |
96 | ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); | 100 | ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); |
97 | } | 101 | } |
98 | 102 | ||
99 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 103 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
@@ -133,7 +137,7 @@ acpi_status acpi_ns_initialize_devices(void) | |||
133 | acpi_status status; | 137 | acpi_status status; |
134 | struct acpi_device_walk_info info; | 138 | struct acpi_device_walk_info info; |
135 | 139 | ||
136 | ACPI_FUNCTION_TRACE("ns_initialize_devices"); | 140 | ACPI_FUNCTION_TRACE(ns_initialize_devices); |
137 | 141 | ||
138 | /* Init counters */ | 142 | /* Init counters */ |
139 | 143 | ||
@@ -142,28 +146,29 @@ acpi_status acpi_ns_initialize_devices(void) | |||
142 | info.num_INI = 0; | 146 | info.num_INI = 0; |
143 | 147 | ||
144 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 148 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
145 | "Executing all Device _STA and_INI methods:")); | 149 | "Initializing Device/Processor/Thermal objects by executing _INI methods:")); |
150 | |||
151 | /* Tree analysis: find all subtrees that contain _INI methods */ | ||
146 | 152 | ||
147 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | 153 | status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, |
154 | ACPI_UINT32_MAX, FALSE, | ||
155 | acpi_ns_find_ini_methods, &info, NULL); | ||
148 | if (ACPI_FAILURE(status)) { | 156 | if (ACPI_FAILURE(status)) { |
149 | return_ACPI_STATUS(status); | 157 | ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); |
150 | } | 158 | } |
151 | 159 | ||
152 | /* Walk namespace for all objects */ | 160 | /* Walk namespace to execute all _INIs on present devices */ |
153 | 161 | ||
154 | status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, | 162 | status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, |
155 | ACPI_UINT32_MAX, TRUE, | 163 | ACPI_UINT32_MAX, FALSE, |
156 | acpi_ns_init_one_device, &info, NULL); | 164 | acpi_ns_init_one_device, &info, NULL); |
157 | |||
158 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | ||
159 | |||
160 | if (ACPI_FAILURE(status)) { | 165 | if (ACPI_FAILURE(status)) { |
161 | ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); | 166 | ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); |
162 | } | 167 | } |
163 | 168 | ||
164 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 169 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
165 | "\n%hd Devices found - executed %hd _STA, %hd _INI methods\n", | 170 | "\nExecuted %hd _INI methods requiring %hd _STA executions (examined %hd objects)\n", |
166 | info.device_count, info.num_STA, info.num_INI)); | 171 | info.num_INI, info.num_STA, info.device_count)); |
167 | 172 | ||
168 | return_ACPI_STATUS(status); | 173 | return_ACPI_STATUS(status); |
169 | } | 174 | } |
@@ -200,7 +205,7 @@ acpi_ns_init_one_object(acpi_handle obj_handle, | |||
200 | (struct acpi_namespace_node *)obj_handle; | 205 | (struct acpi_namespace_node *)obj_handle; |
201 | union acpi_operand_object *obj_desc; | 206 | union acpi_operand_object *obj_desc; |
202 | 207 | ||
203 | ACPI_FUNCTION_NAME("ns_init_one_object"); | 208 | ACPI_FUNCTION_NAME(ns_init_one_object); |
204 | 209 | ||
205 | info->object_count++; | 210 | info->object_count++; |
206 | 211 | ||
@@ -311,6 +316,72 @@ acpi_ns_init_one_object(acpi_handle obj_handle, | |||
311 | 316 | ||
312 | /******************************************************************************* | 317 | /******************************************************************************* |
313 | * | 318 | * |
319 | * FUNCTION: acpi_ns_find_ini_methods | ||
320 | * | ||
321 | * PARAMETERS: acpi_walk_callback | ||
322 | * | ||
323 | * RETURN: acpi_status | ||
324 | * | ||
325 | * DESCRIPTION: Called during namespace walk. Finds objects named _INI under | ||
326 | * device/processor/thermal objects, and marks the entire subtree | ||
327 | * with a SUBTREE_HAS_INI flag. This flag is used during the | ||
328 | * subsequent device initialization walk to avoid entire subtrees | ||
329 | * that do not contain an _INI. | ||
330 | * | ||
331 | ******************************************************************************/ | ||
332 | |||
333 | static acpi_status | ||
334 | acpi_ns_find_ini_methods(acpi_handle obj_handle, | ||
335 | u32 nesting_level, void *context, void **return_value) | ||
336 | { | ||
337 | struct acpi_device_walk_info *info = | ||
338 | ACPI_CAST_PTR(struct acpi_device_walk_info, context); | ||
339 | struct acpi_namespace_node *node; | ||
340 | struct acpi_namespace_node *parent_node; | ||
341 | |||
342 | /* Keep count of device/processor/thermal objects */ | ||
343 | |||
344 | node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle); | ||
345 | if ((node->type == ACPI_TYPE_DEVICE) || | ||
346 | (node->type == ACPI_TYPE_PROCESSOR) || | ||
347 | (node->type == ACPI_TYPE_THERMAL)) { | ||
348 | info->device_count++; | ||
349 | return (AE_OK); | ||
350 | } | ||
351 | |||
352 | /* We are only looking for methods named _INI */ | ||
353 | |||
354 | if (!ACPI_COMPARE_NAME(node->name.ascii, METHOD_NAME__INI)) { | ||
355 | return (AE_OK); | ||
356 | } | ||
357 | |||
358 | /* | ||
359 | * The only _INI methods that we care about are those that are | ||
360 | * present under Device, Processor, and Thermal objects. | ||
361 | */ | ||
362 | parent_node = acpi_ns_get_parent_node(node); | ||
363 | switch (parent_node->type) { | ||
364 | case ACPI_TYPE_DEVICE: | ||
365 | case ACPI_TYPE_PROCESSOR: | ||
366 | case ACPI_TYPE_THERMAL: | ||
367 | |||
368 | /* Mark parent and bubble up the INI present flag to the root */ | ||
369 | |||
370 | while (parent_node) { | ||
371 | parent_node->flags |= ANOBJ_SUBTREE_HAS_INI; | ||
372 | parent_node = acpi_ns_get_parent_node(parent_node); | ||
373 | } | ||
374 | break; | ||
375 | |||
376 | default: | ||
377 | break; | ||
378 | } | ||
379 | |||
380 | return (AE_OK); | ||
381 | } | ||
382 | |||
383 | /******************************************************************************* | ||
384 | * | ||
314 | * FUNCTION: acpi_ns_init_one_device | 385 | * FUNCTION: acpi_ns_init_one_device |
315 | * | 386 | * |
316 | * PARAMETERS: acpi_walk_callback | 387 | * PARAMETERS: acpi_walk_callback |
@@ -328,64 +399,49 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
328 | u32 nesting_level, void *context, void **return_value) | 399 | u32 nesting_level, void *context, void **return_value) |
329 | { | 400 | { |
330 | struct acpi_device_walk_info *info = | 401 | struct acpi_device_walk_info *info = |
331 | (struct acpi_device_walk_info *)context; | 402 | ACPI_CAST_PTR(struct acpi_device_walk_info, context); |
332 | struct acpi_parameter_info pinfo; | 403 | struct acpi_parameter_info pinfo; |
333 | u32 flags; | 404 | u32 flags; |
334 | acpi_status status; | 405 | acpi_status status; |
335 | struct acpi_namespace_node *ini_node; | ||
336 | struct acpi_namespace_node *device_node; | 406 | struct acpi_namespace_node *device_node; |
337 | 407 | ||
338 | ACPI_FUNCTION_TRACE("ns_init_one_device"); | 408 | ACPI_FUNCTION_TRACE(ns_init_one_device); |
339 | 409 | ||
340 | device_node = acpi_ns_map_handle_to_node(obj_handle); | 410 | /* We are interested in Devices, Processors and thermal_zones only */ |
341 | if (!device_node) { | ||
342 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
343 | } | ||
344 | 411 | ||
345 | /* | 412 | device_node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle); |
346 | * We will run _STA/_INI on Devices, Processors and thermal_zones only | ||
347 | */ | ||
348 | if ((device_node->type != ACPI_TYPE_DEVICE) && | 413 | if ((device_node->type != ACPI_TYPE_DEVICE) && |
349 | (device_node->type != ACPI_TYPE_PROCESSOR) && | 414 | (device_node->type != ACPI_TYPE_PROCESSOR) && |
350 | (device_node->type != ACPI_TYPE_THERMAL)) { | 415 | (device_node->type != ACPI_TYPE_THERMAL)) { |
351 | return_ACPI_STATUS(AE_OK); | 416 | return_ACPI_STATUS(AE_OK); |
352 | } | 417 | } |
353 | 418 | ||
354 | if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && | ||
355 | (!(acpi_dbg_level & ACPI_LV_INFO))) { | ||
356 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, ".")); | ||
357 | } | ||
358 | |||
359 | info->device_count++; | ||
360 | |||
361 | /* | 419 | /* |
362 | * Check if the _INI method exists for this device - | 420 | * Because of an earlier namespace analysis, all subtrees that contain an |
363 | * if _INI does not exist, there is no need to run _STA | 421 | * _INI method are tagged. |
364 | * No _INI means device requires no initialization | 422 | * |
423 | * If this device subtree does not contain any _INI methods, we | ||
424 | * can exit now and stop traversing this entire subtree. | ||
365 | */ | 425 | */ |
366 | status = acpi_ns_search_node(*ACPI_CAST_PTR(u32, METHOD_NAME__INI), | 426 | if (!(device_node->flags & ANOBJ_SUBTREE_HAS_INI)) { |
367 | device_node, ACPI_TYPE_METHOD, &ini_node); | 427 | return_ACPI_STATUS(AE_CTRL_DEPTH); |
368 | if (ACPI_FAILURE(status)) { | ||
369 | |||
370 | /* No _INI method found - move on to next device */ | ||
371 | |||
372 | return_ACPI_STATUS(AE_OK); | ||
373 | } | 428 | } |
374 | 429 | ||
375 | /* | 430 | /* |
376 | * Run _STA to determine if we can run _INI on the device - | 431 | * Run _STA to determine if this device is present and functioning. We |
377 | * the device must be present before _INI can be run. | 432 | * must know this information for two important reasons (from ACPI spec): |
378 | * However, _STA is not required - assume device present if no _STA | 433 | * |
434 | * 1) We can only run _INI if the device is present. | ||
435 | * 2) We must abort the device tree walk on this subtree if the device is | ||
436 | * not present and is not functional (we will not examine the children) | ||
437 | * | ||
438 | * The _STA method is not required to be present under the device, we | ||
439 | * assume the device is present if _STA does not exist. | ||
379 | */ | 440 | */ |
380 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, | 441 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname |
381 | device_node, | 442 | (ACPI_TYPE_METHOD, device_node, METHOD_NAME__STA)); |
382 | METHOD_NAME__STA)); | ||
383 | 443 | ||
384 | pinfo.node = device_node; | 444 | status = acpi_ut_execute_STA(device_node, &flags); |
385 | pinfo.parameters = NULL; | ||
386 | pinfo.parameter_type = ACPI_PARAM_ARGS; | ||
387 | |||
388 | status = acpi_ut_execute_STA(pinfo.node, &flags); | ||
389 | if (ACPI_FAILURE(status)) { | 445 | if (ACPI_FAILURE(status)) { |
390 | 446 | ||
391 | /* Ignore error and move on to next device */ | 447 | /* Ignore error and move on to next device */ |
@@ -393,55 +449,108 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
393 | return_ACPI_STATUS(AE_OK); | 449 | return_ACPI_STATUS(AE_OK); |
394 | } | 450 | } |
395 | 451 | ||
452 | /* | ||
453 | * Flags == -1 means that _STA was not found. In this case, we assume that | ||
454 | * the device is both present and functional. | ||
455 | * | ||
456 | * From the ACPI spec, description of _STA: | ||
457 | * | ||
458 | * "If a device object (including the processor object) does not have an | ||
459 | * _STA object, then OSPM assumes that all of the above bits are set (in | ||
460 | * other words, the device is present, ..., and functioning)" | ||
461 | */ | ||
396 | if (flags != ACPI_UINT32_MAX) { | 462 | if (flags != ACPI_UINT32_MAX) { |
397 | info->num_STA++; | 463 | info->num_STA++; |
398 | } | 464 | } |
399 | 465 | ||
466 | /* | ||
467 | * Examine the PRESENT and FUNCTIONING status bits | ||
468 | * | ||
469 | * Note: ACPI spec does not seem to specify behavior for the present but | ||
470 | * not functioning case, so we assume functioning if present. | ||
471 | */ | ||
400 | if (!(flags & ACPI_STA_DEVICE_PRESENT)) { | 472 | if (!(flags & ACPI_STA_DEVICE_PRESENT)) { |
401 | 473 | ||
402 | /* Don't look at children of a not present device */ | 474 | /* Device is not present, we must examine the Functioning bit */ |
403 | 475 | ||
404 | return_ACPI_STATUS(AE_CTRL_DEPTH); | 476 | if (flags & ACPI_STA_DEVICE_FUNCTIONING) { |
477 | /* | ||
478 | * Device is not present but is "functioning". In this case, | ||
479 | * we will not run _INI, but we continue to examine the children | ||
480 | * of this device. | ||
481 | * | ||
482 | * From the ACPI spec, description of _STA: (Note - no mention | ||
483 | * of whether to run _INI or not on the device in question) | ||
484 | * | ||
485 | * "_STA may return bit 0 clear (not present) with bit 3 set | ||
486 | * (device is functional). This case is used to indicate a valid | ||
487 | * device for which no device driver should be loaded (for example, | ||
488 | * a bridge device.) Children of this device may be present and | ||
489 | * valid. OSPM should continue enumeration below a device whose | ||
490 | * _STA returns this bit combination" | ||
491 | */ | ||
492 | return_ACPI_STATUS(AE_OK); | ||
493 | } else { | ||
494 | /* | ||
495 | * Device is not present and is not functioning. We must abort the | ||
496 | * walk of this subtree immediately -- don't look at the children | ||
497 | * of such a device. | ||
498 | * | ||
499 | * From the ACPI spec, description of _INI: | ||
500 | * | ||
501 | * "If the _STA method indicates that the device is not present, | ||
502 | * OSPM will not run the _INI and will not examine the children | ||
503 | * of the device for _INI methods" | ||
504 | */ | ||
505 | return_ACPI_STATUS(AE_CTRL_DEPTH); | ||
506 | } | ||
405 | } | 507 | } |
406 | 508 | ||
407 | /* | 509 | /* |
408 | * The device is present and _INI exists. Run the _INI method. | 510 | * The device is present or is assumed present if no _STA exists. |
409 | * (We already have the _INI node from above) | 511 | * Run the _INI if it exists (not required to exist) |
512 | * | ||
513 | * Note: We know there is an _INI within this subtree, but it may not be | ||
514 | * under this particular device, it may be lower in the branch. | ||
410 | */ | 515 | */ |
411 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, | 516 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname |
412 | pinfo.node, | 517 | (ACPI_TYPE_METHOD, device_node, METHOD_NAME__INI)); |
413 | METHOD_NAME__INI)); | ||
414 | 518 | ||
415 | pinfo.node = ini_node; | 519 | pinfo.node = device_node; |
416 | status = acpi_ns_evaluate_by_handle(&pinfo); | 520 | pinfo.parameters = NULL; |
417 | if (ACPI_FAILURE(status)) { | 521 | pinfo.parameter_type = ACPI_PARAM_ARGS; |
418 | |||
419 | /* Ignore error and move on to next device */ | ||
420 | |||
421 | #ifdef ACPI_DEBUG_OUTPUT | ||
422 | char *scope_name = acpi_ns_get_external_pathname(ini_node); | ||
423 | 522 | ||
424 | ACPI_WARNING((AE_INFO, "%s._INI failed: %s", | 523 | status = acpi_ns_evaluate_relative(METHOD_NAME__INI, &pinfo); |
425 | scope_name, acpi_format_exception(status))); | 524 | if (ACPI_SUCCESS(status)) { |
426 | 525 | ||
427 | ACPI_FREE(scope_name); | ||
428 | #endif | ||
429 | } else { | ||
430 | /* Delete any return object (especially if implicit_return is enabled) */ | 526 | /* Delete any return object (especially if implicit_return is enabled) */ |
431 | 527 | ||
432 | if (pinfo.return_object) { | 528 | if (pinfo.return_object) { |
433 | acpi_ut_remove_reference(pinfo.return_object); | 529 | acpi_ut_remove_reference(pinfo.return_object); |
434 | } | 530 | } |
435 | 531 | ||
436 | /* Count of successful INIs */ | ||
437 | |||
438 | info->num_INI++; | 532 | info->num_INI++; |
533 | if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && | ||
534 | (!(acpi_dbg_level & ACPI_LV_INFO))) { | ||
535 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, ".")); | ||
536 | } | ||
439 | } | 537 | } |
538 | #ifdef ACPI_DEBUG_OUTPUT | ||
539 | else if (status != AE_NOT_FOUND) { | ||
440 | 540 | ||
441 | if (acpi_gbl_init_handler) { | 541 | /* Ignore error and move on to next device */ |
542 | |||
543 | char *scope_name = acpi_ns_get_external_pathname(pinfo.node); | ||
442 | 544 | ||
443 | /* External initialization handler is present, call it */ | 545 | ACPI_EXCEPTION((AE_INFO, status, "during %s._INI execution", |
546 | scope_name)); | ||
547 | ACPI_FREE(scope_name); | ||
548 | } | ||
549 | #endif | ||
444 | 550 | ||
551 | /* If an external initialization handler is present, call it */ | ||
552 | |||
553 | if (acpi_gbl_init_handler) { | ||
445 | status = | 554 | status = |
446 | acpi_gbl_init_handler(pinfo.node, ACPI_INIT_DEVICE_INI); | 555 | acpi_gbl_init_handler(pinfo.node, ACPI_INIT_DEVICE_INI); |
447 | } | 556 | } |
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c index 80acfd35f3ec..fe75d888e183 100644 --- a/drivers/acpi/namespace/nsload.c +++ b/drivers/acpi/namespace/nsload.c | |||
@@ -77,7 +77,7 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc, | |||
77 | { | 77 | { |
78 | acpi_status status; | 78 | acpi_status status; |
79 | 79 | ||
80 | ACPI_FUNCTION_TRACE("ns_load_table"); | 80 | ACPI_FUNCTION_TRACE(ns_load_table); |
81 | 81 | ||
82 | /* Check if table contains valid AML (must be DSDT, PSDT, SSDT, etc.) */ | 82 | /* Check if table contains valid AML (must be DSDT, PSDT, SSDT, etc.) */ |
83 | 83 | ||
@@ -169,7 +169,7 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) | |||
169 | acpi_status status; | 169 | acpi_status status; |
170 | struct acpi_table_desc *table_desc; | 170 | struct acpi_table_desc *table_desc; |
171 | 171 | ||
172 | ACPI_FUNCTION_TRACE("ns_load_table_by_type"); | 172 | ACPI_FUNCTION_TRACE(ns_load_table_by_type); |
173 | 173 | ||
174 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 174 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
175 | if (ACPI_FAILURE(status)) { | 175 | if (ACPI_FAILURE(status)) { |
@@ -181,11 +181,11 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) | |||
181 | * DSDT (one), SSDT/PSDT (multiple) | 181 | * DSDT (one), SSDT/PSDT (multiple) |
182 | */ | 182 | */ |
183 | switch (table_type) { | 183 | switch (table_type) { |
184 | case ACPI_TABLE_DSDT: | 184 | case ACPI_TABLE_ID_DSDT: |
185 | 185 | ||
186 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: DSDT\n")); | 186 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: DSDT\n")); |
187 | 187 | ||
188 | table_desc = acpi_gbl_table_lists[ACPI_TABLE_DSDT].next; | 188 | table_desc = acpi_gbl_table_lists[ACPI_TABLE_ID_DSDT].next; |
189 | 189 | ||
190 | /* If table already loaded into namespace, just return */ | 190 | /* If table already loaded into namespace, just return */ |
191 | 191 | ||
@@ -201,8 +201,8 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) | |||
201 | } | 201 | } |
202 | break; | 202 | break; |
203 | 203 | ||
204 | case ACPI_TABLE_SSDT: | 204 | case ACPI_TABLE_ID_SSDT: |
205 | case ACPI_TABLE_PSDT: | 205 | case ACPI_TABLE_ID_PSDT: |
206 | 206 | ||
207 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 207 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
208 | "Namespace load: %d SSDT or PSDTs\n", | 208 | "Namespace load: %d SSDT or PSDTs\n", |
@@ -259,7 +259,7 @@ acpi_status acpi_ns_load_namespace(void) | |||
259 | { | 259 | { |
260 | acpi_status status; | 260 | acpi_status status; |
261 | 261 | ||
262 | ACPI_FUNCTION_TRACE("acpi_load_name_space"); | 262 | ACPI_FUNCTION_TRACE(acpi_load_name_space); |
263 | 263 | ||
264 | /* There must be at least a DSDT installed */ | 264 | /* There must be at least a DSDT installed */ |
265 | 265 | ||
@@ -272,15 +272,15 @@ acpi_status acpi_ns_load_namespace(void) | |||
272 | * Load the namespace. The DSDT is required, | 272 | * Load the namespace. The DSDT is required, |
273 | * but the SSDT and PSDT tables are optional. | 273 | * but the SSDT and PSDT tables are optional. |
274 | */ | 274 | */ |
275 | status = acpi_ns_load_table_by_type(ACPI_TABLE_DSDT); | 275 | status = acpi_ns_load_table_by_type(ACPI_TABLE_ID_DSDT); |
276 | if (ACPI_FAILURE(status)) { | 276 | if (ACPI_FAILURE(status)) { |
277 | return_ACPI_STATUS(status); | 277 | return_ACPI_STATUS(status); |
278 | } | 278 | } |
279 | 279 | ||
280 | /* Ignore exceptions from these */ | 280 | /* Ignore exceptions from these */ |
281 | 281 | ||
282 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_SSDT); | 282 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_SSDT); |
283 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_PSDT); | 283 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_PSDT); |
284 | 284 | ||
285 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 285 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
286 | "ACPI Namespace successfully loaded at root %p\n", | 286 | "ACPI Namespace successfully loaded at root %p\n", |
@@ -315,7 +315,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) | |||
315 | acpi_handle dummy; | 315 | acpi_handle dummy; |
316 | u32 level; | 316 | u32 level; |
317 | 317 | ||
318 | ACPI_FUNCTION_TRACE("ns_delete_subtree"); | 318 | ACPI_FUNCTION_TRACE(ns_delete_subtree); |
319 | 319 | ||
320 | parent_handle = start_handle; | 320 | parent_handle = start_handle; |
321 | child_handle = NULL; | 321 | child_handle = NULL; |
@@ -395,7 +395,7 @@ acpi_status acpi_ns_unload_namespace(acpi_handle handle) | |||
395 | { | 395 | { |
396 | acpi_status status; | 396 | acpi_status status; |
397 | 397 | ||
398 | ACPI_FUNCTION_TRACE("ns_unload_name_space"); | 398 | ACPI_FUNCTION_TRACE(ns_unload_name_space); |
399 | 399 | ||
400 | /* Parameter validation */ | 400 | /* Parameter validation */ |
401 | 401 | ||
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c index ba812f43897f..97b8332c9746 100644 --- a/drivers/acpi/namespace/nsnames.c +++ b/drivers/acpi/namespace/nsnames.c | |||
@@ -132,7 +132,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) | |||
132 | char *name_buffer; | 132 | char *name_buffer; |
133 | acpi_size size; | 133 | acpi_size size; |
134 | 134 | ||
135 | ACPI_FUNCTION_TRACE_PTR("ns_get_external_pathname", node); | 135 | ACPI_FUNCTION_TRACE_PTR(ns_get_external_pathname, node); |
136 | 136 | ||
137 | /* Calculate required buffer size based on depth below root */ | 137 | /* Calculate required buffer size based on depth below root */ |
138 | 138 | ||
@@ -213,7 +213,7 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle, | |||
213 | struct acpi_namespace_node *node; | 213 | struct acpi_namespace_node *node; |
214 | acpi_size required_size; | 214 | acpi_size required_size; |
215 | 215 | ||
216 | ACPI_FUNCTION_TRACE_PTR("ns_handle_to_pathname", target_handle); | 216 | ACPI_FUNCTION_TRACE_PTR(ns_handle_to_pathname, target_handle); |
217 | 217 | ||
218 | node = acpi_ns_map_handle_to_node(target_handle); | 218 | node = acpi_ns_map_handle_to_node(target_handle); |
219 | if (!node) { | 219 | if (!node) { |
diff --git a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c index 39dc87b228fc..aabe8794b908 100644 --- a/drivers/acpi/namespace/nsobject.c +++ b/drivers/acpi/namespace/nsobject.c | |||
@@ -76,7 +76,7 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, | |||
76 | union acpi_operand_object *last_obj_desc; | 76 | union acpi_operand_object *last_obj_desc; |
77 | acpi_object_type object_type = ACPI_TYPE_ANY; | 77 | acpi_object_type object_type = ACPI_TYPE_ANY; |
78 | 78 | ||
79 | ACPI_FUNCTION_TRACE("ns_attach_object"); | 79 | ACPI_FUNCTION_TRACE(ns_attach_object); |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Parameter validation | 82 | * Parameter validation |
@@ -85,7 +85,7 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, | |||
85 | 85 | ||
86 | /* Invalid handle */ | 86 | /* Invalid handle */ |
87 | 87 | ||
88 | ACPI_ERROR((AE_INFO, "Null named_obj handle")); | 88 | ACPI_ERROR((AE_INFO, "Null NamedObj handle")); |
89 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 89 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
90 | } | 90 | } |
91 | 91 | ||
@@ -111,7 +111,7 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, | |||
111 | 111 | ||
112 | if (node->object == object) { | 112 | if (node->object == object) { |
113 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 113 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
114 | "Obj %p already installed in name_obj %p\n", | 114 | "Obj %p already installed in NameObj %p\n", |
115 | object, node)); | 115 | object, node)); |
116 | 116 | ||
117 | return_ACPI_STATUS(AE_OK); | 117 | return_ACPI_STATUS(AE_OK); |
@@ -204,7 +204,7 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) | |||
204 | { | 204 | { |
205 | union acpi_operand_object *obj_desc; | 205 | union acpi_operand_object *obj_desc; |
206 | 206 | ||
207 | ACPI_FUNCTION_TRACE("ns_detach_object"); | 207 | ACPI_FUNCTION_TRACE(ns_detach_object); |
208 | 208 | ||
209 | obj_desc = node->object; | 209 | obj_desc = node->object; |
210 | 210 | ||
@@ -255,7 +255,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct | |||
255 | acpi_namespace_node | 255 | acpi_namespace_node |
256 | *node) | 256 | *node) |
257 | { | 257 | { |
258 | ACPI_FUNCTION_TRACE_PTR("ns_get_attached_object", node); | 258 | ACPI_FUNCTION_TRACE_PTR(ns_get_attached_object, node); |
259 | 259 | ||
260 | if (!node) { | 260 | if (!node) { |
261 | ACPI_WARNING((AE_INFO, "Null Node ptr")); | 261 | ACPI_WARNING((AE_INFO, "Null Node ptr")); |
@@ -290,7 +290,7 @@ union acpi_operand_object *acpi_ns_get_secondary_object(union | |||
290 | acpi_operand_object | 290 | acpi_operand_object |
291 | *obj_desc) | 291 | *obj_desc) |
292 | { | 292 | { |
293 | ACPI_FUNCTION_TRACE_PTR("ns_get_secondary_object", obj_desc); | 293 | ACPI_FUNCTION_TRACE_PTR(ns_get_secondary_object, obj_desc); |
294 | 294 | ||
295 | if ((!obj_desc) || | 295 | if ((!obj_desc) || |
296 | (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) || | 296 | (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) || |
diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c index 64daf3028dea..155505a4ef69 100644 --- a/drivers/acpi/namespace/nsparse.c +++ b/drivers/acpi/namespace/nsparse.c | |||
@@ -68,7 +68,7 @@ acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc *table_desc) | |||
68 | acpi_status status; | 68 | acpi_status status; |
69 | struct acpi_walk_state *walk_state; | 69 | struct acpi_walk_state *walk_state; |
70 | 70 | ||
71 | ACPI_FUNCTION_TRACE("ns_one_complete_parse"); | 71 | ACPI_FUNCTION_TRACE(ns_one_complete_parse); |
72 | 72 | ||
73 | /* Create and init a Root Node */ | 73 | /* Create and init a Root Node */ |
74 | 74 | ||
@@ -124,7 +124,7 @@ acpi_ns_parse_table(struct acpi_table_desc *table_desc, | |||
124 | { | 124 | { |
125 | acpi_status status; | 125 | acpi_status status; |
126 | 126 | ||
127 | ACPI_FUNCTION_TRACE("ns_parse_table"); | 127 | ACPI_FUNCTION_TRACE(ns_parse_table); |
128 | 128 | ||
129 | /* | 129 | /* |
130 | * AML Parse, pass 1 | 130 | * AML Parse, pass 1 |
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index 51adec5a23d6..34ac512a2d5e 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c | |||
@@ -89,7 +89,7 @@ acpi_ns_search_node(u32 target_name, | |||
89 | { | 89 | { |
90 | struct acpi_namespace_node *next_node; | 90 | struct acpi_namespace_node *next_node; |
91 | 91 | ||
92 | ACPI_FUNCTION_TRACE("ns_search_node"); | 92 | ACPI_FUNCTION_TRACE(ns_search_node); |
93 | 93 | ||
94 | #ifdef ACPI_DEBUG_OUTPUT | 94 | #ifdef ACPI_DEBUG_OUTPUT |
95 | if (ACPI_LV_NAMES & acpi_dbg_level) { | 95 | if (ACPI_LV_NAMES & acpi_dbg_level) { |
@@ -203,7 +203,7 @@ acpi_ns_search_parent_tree(u32 target_name, | |||
203 | acpi_status status; | 203 | acpi_status status; |
204 | struct acpi_namespace_node *parent_node; | 204 | struct acpi_namespace_node *parent_node; |
205 | 205 | ||
206 | ACPI_FUNCTION_TRACE("ns_search_parent_tree"); | 206 | ACPI_FUNCTION_TRACE(ns_search_parent_tree); |
207 | 207 | ||
208 | parent_node = acpi_ns_get_parent_node(node); | 208 | parent_node = acpi_ns_get_parent_node(node); |
209 | 209 | ||
@@ -293,13 +293,13 @@ acpi_ns_search_and_enter(u32 target_name, | |||
293 | acpi_status status; | 293 | acpi_status status; |
294 | struct acpi_namespace_node *new_node; | 294 | struct acpi_namespace_node *new_node; |
295 | 295 | ||
296 | ACPI_FUNCTION_TRACE("ns_search_and_enter"); | 296 | ACPI_FUNCTION_TRACE(ns_search_and_enter); |
297 | 297 | ||
298 | /* Parameter validation */ | 298 | /* Parameter validation */ |
299 | 299 | ||
300 | if (!node || !target_name || !return_node) { | 300 | if (!node || !target_name || !return_node) { |
301 | ACPI_ERROR((AE_INFO, | 301 | ACPI_ERROR((AE_INFO, |
302 | "Null param: Node %p Name %X return_node %p", | 302 | "Null param: Node %p Name %X ReturnNode %p", |
303 | node, target_name, return_node)); | 303 | node, target_name, return_node)); |
304 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 304 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
305 | } | 305 | } |
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index 9fa38ffc2e6e..d1d55032b455 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
@@ -241,7 +241,7 @@ static u8 acpi_ns_valid_path_separator(char sep) | |||
241 | 241 | ||
242 | acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) | 242 | acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) |
243 | { | 243 | { |
244 | ACPI_FUNCTION_TRACE("ns_get_type"); | 244 | ACPI_FUNCTION_TRACE(ns_get_type); |
245 | 245 | ||
246 | if (!node) { | 246 | if (!node) { |
247 | ACPI_WARNING((AE_INFO, "Null Node parameter")); | 247 | ACPI_WARNING((AE_INFO, "Null Node parameter")); |
@@ -266,7 +266,7 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) | |||
266 | 266 | ||
267 | u32 acpi_ns_local(acpi_object_type type) | 267 | u32 acpi_ns_local(acpi_object_type type) |
268 | { | 268 | { |
269 | ACPI_FUNCTION_TRACE("ns_local"); | 269 | ACPI_FUNCTION_TRACE(ns_local); |
270 | 270 | ||
271 | if (!acpi_ut_valid_object_type(type)) { | 271 | if (!acpi_ut_valid_object_type(type)) { |
272 | 272 | ||
@@ -366,7 +366,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
366 | char *result = NULL; | 366 | char *result = NULL; |
367 | acpi_native_uint i; | 367 | acpi_native_uint i; |
368 | 368 | ||
369 | ACPI_FUNCTION_TRACE("ns_build_internal_name"); | 369 | ACPI_FUNCTION_TRACE(ns_build_internal_name); |
370 | 370 | ||
371 | /* Setup the correct prefixes, counts, and pointers */ | 371 | /* Setup the correct prefixes, counts, and pointers */ |
372 | 372 | ||
@@ -477,7 +477,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) | |||
477 | struct acpi_namestring_info info; | 477 | struct acpi_namestring_info info; |
478 | acpi_status status; | 478 | acpi_status status; |
479 | 479 | ||
480 | ACPI_FUNCTION_TRACE("ns_internalize_name"); | 480 | ACPI_FUNCTION_TRACE(ns_internalize_name); |
481 | 481 | ||
482 | if ((!external_name) || (*external_name == 0) || (!converted_name)) { | 482 | if ((!external_name) || (*external_name == 0) || (!converted_name)) { |
483 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 483 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
@@ -537,7 +537,7 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
537 | acpi_native_uint i = 0; | 537 | acpi_native_uint i = 0; |
538 | acpi_native_uint j = 0; | 538 | acpi_native_uint j = 0; |
539 | 539 | ||
540 | ACPI_FUNCTION_TRACE("ns_externalize_name"); | 540 | ACPI_FUNCTION_TRACE(ns_externalize_name); |
541 | 541 | ||
542 | if (!internal_name_length || !internal_name || !converted_name) { | 542 | if (!internal_name_length || !internal_name || !converted_name) { |
543 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 543 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
@@ -756,7 +756,7 @@ void acpi_ns_terminate(void) | |||
756 | { | 756 | { |
757 | union acpi_operand_object *obj_desc; | 757 | union acpi_operand_object *obj_desc; |
758 | 758 | ||
759 | ACPI_FUNCTION_TRACE("ns_terminate"); | 759 | ACPI_FUNCTION_TRACE(ns_terminate); |
760 | 760 | ||
761 | /* | 761 | /* |
762 | * 1) Free the entire namespace -- all nodes and objects | 762 | * 1) Free the entire namespace -- all nodes and objects |
@@ -796,7 +796,7 @@ void acpi_ns_terminate(void) | |||
796 | 796 | ||
797 | u32 acpi_ns_opens_scope(acpi_object_type type) | 797 | u32 acpi_ns_opens_scope(acpi_object_type type) |
798 | { | 798 | { |
799 | ACPI_FUNCTION_TRACE_STR("ns_opens_scope", acpi_ut_get_type_name(type)); | 799 | ACPI_FUNCTION_TRACE_STR(ns_opens_scope, acpi_ut_get_type_name(type)); |
800 | 800 | ||
801 | if (!acpi_ut_valid_object_type(type)) { | 801 | if (!acpi_ut_valid_object_type(type)) { |
802 | 802 | ||
@@ -840,7 +840,7 @@ acpi_ns_get_node_by_path(char *pathname, | |||
840 | acpi_status status; | 840 | acpi_status status; |
841 | char *internal_path = NULL; | 841 | char *internal_path = NULL; |
842 | 842 | ||
843 | ACPI_FUNCTION_TRACE_PTR("ns_get_node_by_path", pathname); | 843 | ACPI_FUNCTION_TRACE_PTR(ns_get_node_by_path, pathname); |
844 | 844 | ||
845 | if (pathname) { | 845 | if (pathname) { |
846 | 846 | ||
@@ -966,7 +966,7 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node * child_node) | |||
966 | { | 966 | { |
967 | struct acpi_namespace_node *parent_node; | 967 | struct acpi_namespace_node *parent_node; |
968 | 968 | ||
969 | ACPI_FUNCTION_TRACE("ns_find_parent_name"); | 969 | ACPI_FUNCTION_TRACE(ns_find_parent_name); |
970 | 970 | ||
971 | if (child_node) { | 971 | if (child_node) { |
972 | 972 | ||
diff --git a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c index 6bbc734bfee2..c8f6bef16ed0 100644 --- a/drivers/acpi/namespace/nswalk.c +++ b/drivers/acpi/namespace/nswalk.c | |||
@@ -164,7 +164,7 @@ acpi_ns_walk_namespace(acpi_object_type type, | |||
164 | acpi_object_type child_type; | 164 | acpi_object_type child_type; |
165 | u32 level; | 165 | u32 level; |
166 | 166 | ||
167 | ACPI_FUNCTION_TRACE("ns_walk_namespace"); | 167 | ACPI_FUNCTION_TRACE(ns_walk_namespace); |
168 | 168 | ||
169 | /* Special case for the namespace Root Node */ | 169 | /* Special case for the namespace Root Node */ |
170 | 170 | ||
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index 7cdedc96a40a..998b29611b19 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c | |||
@@ -80,7 +80,7 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
80 | acpi_status status; | 80 | acpi_status status; |
81 | u8 must_free = FALSE; | 81 | u8 must_free = FALSE; |
82 | 82 | ||
83 | ACPI_FUNCTION_TRACE("acpi_evaluate_object_typed"); | 83 | ACPI_FUNCTION_TRACE(acpi_evaluate_object_typed); |
84 | 84 | ||
85 | /* Return buffer must be valid */ | 85 | /* Return buffer must be valid */ |
86 | 86 | ||
@@ -175,7 +175,7 @@ acpi_evaluate_object(acpi_handle handle, | |||
175 | acpi_size buffer_space_needed; | 175 | acpi_size buffer_space_needed; |
176 | u32 i; | 176 | u32 i; |
177 | 177 | ||
178 | ACPI_FUNCTION_TRACE("acpi_evaluate_object"); | 178 | ACPI_FUNCTION_TRACE(acpi_evaluate_object); |
179 | 179 | ||
180 | info.node = handle; | 180 | info.node = handle; |
181 | info.parameters = NULL; | 181 | info.parameters = NULL; |
@@ -395,7 +395,7 @@ acpi_walk_namespace(acpi_object_type type, | |||
395 | { | 395 | { |
396 | acpi_status status; | 396 | acpi_status status; |
397 | 397 | ||
398 | ACPI_FUNCTION_TRACE("acpi_walk_namespace"); | 398 | ACPI_FUNCTION_TRACE(acpi_walk_namespace); |
399 | 399 | ||
400 | /* Parameter validation */ | 400 | /* Parameter validation */ |
401 | 401 | ||
@@ -553,7 +553,7 @@ acpi_get_devices(char *HID, | |||
553 | acpi_status status; | 553 | acpi_status status; |
554 | struct acpi_get_devices_info info; | 554 | struct acpi_get_devices_info info; |
555 | 555 | ||
556 | ACPI_FUNCTION_TRACE("acpi_get_devices"); | 556 | ACPI_FUNCTION_TRACE(acpi_get_devices); |
557 | 557 | ||
558 | /* Parameter validation */ | 558 | /* Parameter validation */ |
559 | 559 | ||