|
Lines 153-173
Link Here
|
| 153 |
"by executing _INI methods:")); |
153 |
"by executing _INI methods:")); |
| 154 |
|
154 |
|
| 155 |
/* Tree analysis: find all subtrees that contain _INI methods */ |
155 |
/* Tree analysis: find all subtrees that contain _INI methods */ |
| 156 |
|
156 |
printk( KERN_INFO "acpi_ns_walk_namespace() find\n" ); |
| 157 |
status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, |
157 |
status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, |
| 158 |
ACPI_UINT32_MAX, FALSE, |
158 |
ACPI_UINT32_MAX, FALSE, |
| 159 |
acpi_ns_find_ini_methods, NULL, &info, |
159 |
acpi_ns_find_ini_methods, NULL, &info, |
| 160 |
NULL); |
160 |
NULL); |
| 161 |
if (ACPI_FAILURE(status)) { |
161 |
if (ACPI_FAILURE(status)) { |
|
|
162 |
printk( KERN_INFO "goto error_exit\n" ); |
| 162 |
goto error_exit; |
163 |
goto error_exit; |
| 163 |
} |
164 |
} |
| 164 |
|
165 |
|
| 165 |
/* Allocate the evaluation information block */ |
166 |
/* Allocate the evaluation information block */ |
| 166 |
|
167 |
printk( KERN_INFO "allocate evaluation information block\n" ); |
| 167 |
info.evaluate_info = |
168 |
info.evaluate_info = |
| 168 |
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); |
169 |
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); |
| 169 |
if (!info.evaluate_info) { |
170 |
if (!info.evaluate_info) { |
| 170 |
status = AE_NO_MEMORY; |
171 |
status = AE_NO_MEMORY; |
|
|
172 |
printk( KERN_INFO "goto error_exit\n" ); |
| 171 |
goto error_exit; |
173 |
goto error_exit; |
| 172 |
} |
174 |
} |
| 173 |
|
175 |
|
|
Lines 181-193
Link Here
|
| 181 |
info.evaluate_info->parameters = NULL; |
183 |
info.evaluate_info->parameters = NULL; |
| 182 |
info.evaluate_info->flags = ACPI_IGNORE_RETURN_VALUE; |
184 |
info.evaluate_info->flags = ACPI_IGNORE_RETURN_VALUE; |
| 183 |
|
185 |
|
|
|
186 |
printk( KERN_INFO "acpi_ns_evaluate()\n" ); |
| 184 |
status = acpi_ns_evaluate(info.evaluate_info); |
187 |
status = acpi_ns_evaluate(info.evaluate_info); |
| 185 |
if (ACPI_SUCCESS(status)) { |
188 |
if (ACPI_SUCCESS(status)) { |
|
|
189 |
printk( KERN_INFO "success\n" ); |
| 186 |
info.num_INI++; |
190 |
info.num_INI++; |
| 187 |
} |
191 |
} |
| 188 |
|
192 |
|
| 189 |
/* Walk namespace to execute all _INIs on present devices */ |
193 |
/* Walk namespace to execute all _INIs on present devices */ |
| 190 |
|
194 |
|
|
|
195 |
printk( KERN_INFO "acpi_ns_walk_namespace() execute\n" ); |
| 191 |
status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, |
196 |
status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, |
| 192 |
ACPI_UINT32_MAX, FALSE, |
197 |
ACPI_UINT32_MAX, FALSE, |
| 193 |
acpi_ns_init_one_device, NULL, &info, |
198 |
acpi_ns_init_one_device, NULL, &info, |
|
Lines 199-209
Link Here
|
| 199 |
* I/O addresses to 16 bits -- for Windows compatibility. |
204 |
* I/O addresses to 16 bits -- for Windows compatibility. |
| 200 |
*/ |
205 |
*/ |
| 201 |
if (acpi_gbl_osi_data >= ACPI_OSI_WIN_2000) { |
206 |
if (acpi_gbl_osi_data >= ACPI_OSI_WIN_2000) { |
|
|
207 |
printk( KERN_INFO "truncate I/O adresses\n" ); |
| 202 |
acpi_gbl_truncate_io_addresses = TRUE; |
208 |
acpi_gbl_truncate_io_addresses = TRUE; |
| 203 |
} |
209 |
} |
| 204 |
|
210 |
|
|
|
211 |
printk( KERN_INFO "ACPI_FREE()\n" ); |
| 205 |
ACPI_FREE(info.evaluate_info); |
212 |
ACPI_FREE(info.evaluate_info); |
| 206 |
if (ACPI_FAILURE(status)) { |
213 |
if (ACPI_FAILURE(status)) { |
|
|
214 |
printk( KERN_INFO "goto error_exit\n" ); |
| 207 |
goto error_exit; |
215 |
goto error_exit; |
| 208 |
} |
216 |
} |
| 209 |
|
217 |
|
|
Lines 211-220
Link Here
|
| 211 |
"\nExecuted %u _INI methods requiring %u _STA executions " |
219 |
"\nExecuted %u _INI methods requiring %u _STA executions " |
| 212 |
"(examined %u objects)\n", |
220 |
"(examined %u objects)\n", |
| 213 |
info.num_INI, info.num_STA, info.device_count)); |
221 |
info.num_INI, info.num_STA, info.device_count)); |
| 214 |
|
222 |
printk( KERN_INFO "return\n" ); |
| 215 |
return_ACPI_STATUS(status); |
223 |
return_ACPI_STATUS(status); |
| 216 |
|
224 |
|
| 217 |
error_exit: |
225 |
error_exit: |
|
|
226 |
printk( KERN_INFO "error_exit\n" ); |
| 218 |
ACPI_EXCEPTION((AE_INFO, status, "During device initialization")); |
227 |
ACPI_EXCEPTION((AE_INFO, status, "During device initialization")); |
| 219 |
return_ACPI_STATUS(status); |
228 |
return_ACPI_STATUS(status); |
| 220 |
} |
229 |
} |
|
Lines 449-454
Link Here
|
| 449 |
acpi_ns_init_one_device(acpi_handle obj_handle, |
458 |
acpi_ns_init_one_device(acpi_handle obj_handle, |
| 450 |
u32 nesting_level, void *context, void **return_value) |
459 |
u32 nesting_level, void *context, void **return_value) |
| 451 |
{ |
460 |
{ |
|
|
461 |
static int device_number = 0; |
| 452 |
struct acpi_device_walk_info *walk_info = |
462 |
struct acpi_device_walk_info *walk_info = |
| 453 |
ACPI_CAST_PTR(struct acpi_device_walk_info, context); |
463 |
ACPI_CAST_PTR(struct acpi_device_walk_info, context); |
| 454 |
struct acpi_evaluate_info *info = walk_info->evaluate_info; |
464 |
struct acpi_evaluate_info *info = walk_info->evaluate_info; |
|
Lines 457-469
Link Here
|
| 457 |
struct acpi_namespace_node *device_node; |
467 |
struct acpi_namespace_node *device_node; |
| 458 |
|
468 |
|
| 459 |
ACPI_FUNCTION_TRACE(ns_init_one_device); |
469 |
ACPI_FUNCTION_TRACE(ns_init_one_device); |
|
|
470 |
device_number++; |
| 471 |
printk( KERN_INFO "acpi_init_one_device (%d with nesting_level=%d)\n", device_number, (int)nesting_level ); |
| 460 |
|
472 |
|
| 461 |
/* We are interested in Devices, Processors and thermal_zones only */ |
473 |
/* We are interested in Devices, Processors and thermal_zones only */ |
| 462 |
|
474 |
|
| 463 |
device_node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle); |
475 |
device_node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle); |
|
|
476 |
printk( KERN_INFO "device_node %p (type=%d)\n", device_node, (int)(device_node->type) ); |
| 464 |
if ((device_node->type != ACPI_TYPE_DEVICE) && |
477 |
if ((device_node->type != ACPI_TYPE_DEVICE) && |
| 465 |
(device_node->type != ACPI_TYPE_PROCESSOR) && |
478 |
(device_node->type != ACPI_TYPE_PROCESSOR) && |
| 466 |
(device_node->type != ACPI_TYPE_THERMAL)) { |
479 |
(device_node->type != ACPI_TYPE_THERMAL)) { |
|
|
480 |
printk( KERN_INFO "return\n" ); |
| 467 |
return_ACPI_STATUS(AE_OK); |
481 |
return_ACPI_STATUS(AE_OK); |
| 468 |
} |
482 |
} |
| 469 |
|
483 |
|
|
Lines 474-480
Link Here
|
| 474 |
* If this device subtree does not contain any _INI methods, we |
488 |
* If this device subtree does not contain any _INI methods, we |
| 475 |
* can exit now and stop traversing this entire subtree. |
489 |
* can exit now and stop traversing this entire subtree. |
| 476 |
*/ |
490 |
*/ |
| 477 |
if (!(device_node->flags & ANOBJ_SUBTREE_HAS_INI)) { |
491 |
/* MKOHM: EXIT FROM THIS TREE, if it is the 35th call of |
|
|
492 |
* acpi_init_one_device */ |
| 493 |
if ( (device_number == 35) || |
| 494 |
!(device_node->flags & ANOBJ_SUBTREE_HAS_INI)) { |
| 495 |
printk( KERN_INFO "return\n" ); |
| 478 |
return_ACPI_STATUS(AE_CTRL_DEPTH); |
496 |
return_ACPI_STATUS(AE_CTRL_DEPTH); |
| 479 |
} |
497 |
} |
| 480 |
|
498 |
|
|
Lines 492-502
Link Here
|
| 492 |
ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname |
510 |
ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname |
| 493 |
(ACPI_TYPE_METHOD, device_node, METHOD_NAME__STA)); |
511 |
(ACPI_TYPE_METHOD, device_node, METHOD_NAME__STA)); |
| 494 |
|
512 |
|
|
|
513 |
printk( KERN_INFO "acpi_ut_execute_STA: " ); |
| 495 |
status = acpi_ut_execute_STA(device_node, &flags); |
514 |
status = acpi_ut_execute_STA(device_node, &flags); |
|
|
515 |
printk( KERN_INFO "done.\n" ); |
| 496 |
if (ACPI_FAILURE(status)) { |
516 |
if (ACPI_FAILURE(status)) { |
| 497 |
|
517 |
|
| 498 |
/* Ignore error and move on to next device */ |
518 |
/* Ignore error and move on to next device */ |
| 499 |
|
519 |
|
|
|
520 |
printk( KERN_INFO "return\n" ); |
| 500 |
return_ACPI_STATUS(AE_OK); |
521 |
return_ACPI_STATUS(AE_OK); |
| 501 |
} |
522 |
} |
| 502 |
|
523 |
|
|
Lines 540-545
Link Here
|
| 540 |
* valid. OSPM should continue enumeration below a device whose |
561 |
* valid. OSPM should continue enumeration below a device whose |
| 541 |
* _STA returns this bit combination" |
562 |
* _STA returns this bit combination" |
| 542 |
*/ |
563 |
*/ |
|
|
564 |
printk( KERN_INFO "return\n" ); |
| 543 |
return_ACPI_STATUS(AE_OK); |
565 |
return_ACPI_STATUS(AE_OK); |
| 544 |
} else { |
566 |
} else { |
| 545 |
/* |
567 |
/* |
|
Lines 553-558
Link Here
|
| 553 |
* OSPM will not run the _INI and will not examine the children |
575 |
* OSPM will not run the _INI and will not examine the children |
| 554 |
* of the device for _INI methods" |
576 |
* of the device for _INI methods" |
| 555 |
*/ |
577 |
*/ |
|
|
578 |
printk( KERN_INFO "return\n" ); |
| 556 |
return_ACPI_STATUS(AE_CTRL_DEPTH); |
579 |
return_ACPI_STATUS(AE_CTRL_DEPTH); |
| 557 |
} |
580 |
} |
| 558 |
} |
581 |
} |
|
Lines 577-585
Link Here
|
| 577 |
* as possible (without an NMI being received in the middle of |
600 |
* as possible (without an NMI being received in the middle of |
| 578 |
* this) - so disable NMIs and initialize the device: |
601 |
* this) - so disable NMIs and initialize the device: |
| 579 |
*/ |
602 |
*/ |
|
|
603 |
printk( KERN_INFO "acpi_nmi_disable, \n" ); |
| 580 |
acpi_nmi_disable(); |
604 |
acpi_nmi_disable(); |
|
|
605 |
printk( KERN_INFO "acpi_ns_evaluate, \n" ); |
| 581 |
status = acpi_ns_evaluate(info); |
606 |
status = acpi_ns_evaluate(info); |
|
|
607 |
printk( KERN_INFO "acpi_ns_evaluate: " ); |
| 582 |
acpi_nmi_enable(); |
608 |
acpi_nmi_enable(); |
|
|
609 |
printk( KERN_INFO "done.\n" ); |
| 583 |
|
610 |
|
| 584 |
if (ACPI_SUCCESS(status)) { |
611 |
if (ACPI_SUCCESS(status)) { |
| 585 |
walk_info->num_INI++; |
612 |
walk_info->num_INI++; |
|
Lines 612-620
Link Here
|
| 612 |
* Handler for this device. |
639 |
* Handler for this device. |
| 613 |
*/ |
640 |
*/ |
| 614 |
if (acpi_gbl_init_handler) { |
641 |
if (acpi_gbl_init_handler) { |
|
|
642 |
printk( KERN_INFO "acpi_gbl_init_handler: " ); |
| 615 |
status = |
643 |
status = |
| 616 |
acpi_gbl_init_handler(device_node, ACPI_INIT_DEVICE_INI); |
644 |
acpi_gbl_init_handler(device_node, ACPI_INIT_DEVICE_INI); |
|
|
645 |
printk( KERN_INFO "done.\n" ); |
| 617 |
} |
646 |
} |
| 618 |
|
647 |
|
|
|
648 |
printk( KERN_INFO "return\n" ); |
| 619 |
return_ACPI_STATUS(status); |
649 |
return_ACPI_STATUS(status); |
| 620 |
} |
650 |
} |