patch-2.4.26 linux-2.4.26/drivers/acpi/namespace/nsaccess.c
Next file: linux-2.4.26/drivers/acpi/namespace/nsalloc.c
Previous file: linux-2.4.26/drivers/acpi/hardware/hwsleep.c
Back to the patch index
Back to the overall index
- Lines: 103
- Date:
2004-04-14 06:05:28.000000000 -0700
- Orig file:
linux-2.4.25/drivers/acpi/namespace/nsaccess.c
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.25/drivers/acpi/namespace/nsaccess.c linux-2.4.26/drivers/acpi/namespace/nsaccess.c
@@ -105,8 +105,15 @@
"Entering predefined entries into namespace\n"));
for (init_val = acpi_gbl_pre_defined_names; init_val->name; init_val++) {
+ /* _OSI is optional for now, will be permanent later */
+
+ if (!ACPI_STRCMP (init_val->name, "_OSI") && !acpi_gbl_create_osi_method) {
+ continue;
+ }
+
status = acpi_ns_lookup (NULL, init_val->name, init_val->type,
- ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, NULL, &new_node);
+ ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
+ NULL, &new_node);
if (ACPI_FAILURE (status) || (!new_node)) /* Must be on same line for code converter */ {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
@@ -122,7 +129,8 @@
if (init_val->val) {
status = acpi_os_predefined_override (init_val, &val);
if (ACPI_FAILURE (status)) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not override predefined %s\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Could not override predefined %s\n",
init_val->name));
}
@@ -147,15 +155,20 @@
*/
switch (init_val->type) {
case ACPI_TYPE_METHOD:
- obj_desc->method.param_count =
- (u8) ACPI_STRTOUL (val, NULL, 10);
+ obj_desc->method.param_count = (u8) ACPI_STRTOUL
+ (val, NULL, 10);
obj_desc->common.flags |= AOPOBJ_DATA_VALID;
-#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
+#if defined (_ACPI_ASL_COMPILER) || defined (_ACPI_DUMP_App)
- /* Compiler cheats by putting parameter count in the owner_iD */
+ /* i_aSL Compiler cheats by putting parameter count in the owner_iD */
new_node->owner_id = obj_desc->method.param_count;
+#else
+ /* Mark this as a very SPECIAL method */
+
+ obj_desc->method.method_flags = AML_METHOD_INTERNAL_ONLY;
+ obj_desc->method.implementation = acpi_ut_osi_implementation;
#endif
break;
@@ -180,8 +193,8 @@
case ACPI_TYPE_MUTEX:
obj_desc->mutex.node = new_node;
- obj_desc->mutex.sync_level =
- (u16) ACPI_STRTOUL (val, NULL, 10);
+ obj_desc->mutex.sync_level = (u16) ACPI_STRTOUL
+ (val, NULL, 10);
if (ACPI_STRCMP (init_val->name, "_GL_") == 0) {
/*
@@ -213,6 +226,7 @@
default:
+
ACPI_REPORT_ERROR (("Unsupported initial type value %X\n",
init_val->type));
acpi_ut_remove_reference (obj_desc);
@@ -233,6 +247,14 @@
unlock_and_exit:
(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
+
+ /* Save a handle to "_GPE", it is always present */
+
+ if (ACPI_SUCCESS (status)) {
+ status = acpi_ns_get_node_by_path ("\\_GPE", NULL, ACPI_NS_NO_UPSEARCH,
+ &acpi_gbl_fadt_gpe_device);
+ }
+
return_ACPI_STATUS (status);
}
@@ -314,7 +336,7 @@
else {
prefix_node = scope_info->scope.node;
if (ACPI_GET_DESCRIPTOR_TYPE (prefix_node) != ACPI_DESC_TYPE_NAMED) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p Not a namespace node [%s]\n",
+ ACPI_REPORT_ERROR (("ns_lookup: %p is not a namespace node [%s]\n",
prefix_node, acpi_ut_get_descriptor_name (prefix_node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -563,6 +585,7 @@
if ((num_segments == 0) &&
(type_to_check_for != ACPI_TYPE_ANY) &&
(type_to_check_for != ACPI_TYPE_LOCAL_ALIAS) &&
+ (type_to_check_for != ACPI_TYPE_LOCAL_METHOD_ALIAS) &&
(type_to_check_for != ACPI_TYPE_LOCAL_SCOPE) &&
(this_node->type != ACPI_TYPE_ANY) &&
(this_node->type != type_to_check_for)) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)