aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/excreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/excreate.c')
-rw-r--r--drivers/acpi/executer/excreate.c95
1 files changed, 0 insertions, 95 deletions
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c
index b3914395851b..0396bd4819f1 100644
--- a/drivers/acpi/executer/excreate.c
+++ b/drivers/acpi/executer/excreate.c
@@ -352,101 +352,6 @@ acpi_ex_create_region(u8 * aml_start,
352 352
353/******************************************************************************* 353/*******************************************************************************
354 * 354 *
355 * FUNCTION: acpi_ex_create_table_region
356 *
357 * PARAMETERS: walk_state - Current state
358 *
359 * RETURN: Status
360 *
361 * DESCRIPTION: Create a new data_table_region object
362 *
363 ******************************************************************************/
364
365acpi_status acpi_ex_create_table_region(struct acpi_walk_state *walk_state)
366{
367 acpi_status status;
368 union acpi_operand_object **operand = &walk_state->operands[0];
369 union acpi_operand_object *obj_desc;
370 struct acpi_namespace_node *node;
371 union acpi_operand_object *region_obj2;
372 acpi_native_uint table_index;
373 struct acpi_table_header *table;
374
375 ACPI_FUNCTION_TRACE(ex_create_table_region);
376
377 /* Get the Node from the object stack */
378
379 node = walk_state->op->common.node;
380
381 /*
382 * If the region object is already attached to this node,
383 * just return
384 */
385 if (acpi_ns_get_attached_object(node)) {
386 return_ACPI_STATUS(AE_OK);
387 }
388
389 /* Find the ACPI table */
390
391 status = acpi_tb_find_table(operand[1]->string.pointer,
392 operand[2]->string.pointer,
393 operand[3]->string.pointer, &table_index);
394 if (ACPI_FAILURE(status)) {
395 return_ACPI_STATUS(status);
396 }
397
398 /* Create the region descriptor */
399
400 obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_REGION);
401 if (!obj_desc) {
402 return_ACPI_STATUS(AE_NO_MEMORY);
403 }
404
405 region_obj2 = obj_desc->common.next_object;
406 region_obj2->extra.region_context = NULL;
407
408 status = acpi_get_table_by_index(table_index, &table);
409 if (ACPI_FAILURE(status)) {
410 return_ACPI_STATUS(status);
411 }
412
413 /* Init the region from the operands */
414
415 obj_desc->region.space_id = REGION_DATA_TABLE;
416 obj_desc->region.address =
417 (acpi_physical_address) ACPI_TO_INTEGER(table);
418 obj_desc->region.length = table->length;
419 obj_desc->region.node = node;
420 obj_desc->region.flags = AOPOBJ_DATA_VALID;
421
422 /* Install the new region object in the parent Node */
423
424 status = acpi_ns_attach_object(node, obj_desc, ACPI_TYPE_REGION);
425 if (ACPI_FAILURE(status)) {
426 goto cleanup;
427 }
428
429 status = acpi_ev_initialize_region(obj_desc, FALSE);
430 if (ACPI_FAILURE(status)) {
431 if (status == AE_NOT_EXIST) {
432 status = AE_OK;
433 } else {
434 goto cleanup;
435 }
436 }
437
438 obj_desc->region.flags |= AOPOBJ_SETUP_COMPLETE;
439
440 cleanup:
441
442 /* Remove local reference to the object */
443
444 acpi_ut_remove_reference(obj_desc);
445 return_ACPI_STATUS(status);
446}
447
448/*******************************************************************************
449 *
450 * FUNCTION: acpi_ex_create_processor 355 * FUNCTION: acpi_ex_create_processor
451 * 356 *
452 * PARAMETERS: walk_state - Current state 357 * PARAMETERS: walk_state - Current state