• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/acpi/acpica/

Lines Matching refs:object

3  * Module Name: utdelete - object deletion and reference count utilities
54 static void acpi_ut_delete_internal_obj(union acpi_operand_object *object);
57 acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action);
67 * DESCRIPTION: Low level object deletion, after reference counts have been
72 static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
80 ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object);
82 if (!object) {
87 * Must delete or free any pointers within the object that are not
90 switch (object->common.type) {
94 "**** String %p, ptr %p\n", object,
95 object->string.pointer));
99 if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) {
103 obj_pointer = object->string.pointer;
110 "**** Buffer %p, ptr %p\n", object,
111 object->buffer.pointer));
115 if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) {
119 obj_pointer = object->buffer.pointer;
127 object->package.count));
136 obj_pointer = object->package.elements;
141 * Device object also may have a GPE block.
145 if (object->device.gpe_block) {
146 (void)acpi_ev_delete_gpe_block(object->device.
155 /* Walk the notify handler list for this object */
157 handler_desc = object->common_notify.handler;
169 object, object->mutex.os_mutex));
171 if (object == acpi_gbl_global_lock_mutex) {
180 acpi_os_delete_mutex(object->mutex.os_mutex);
183 acpi_ex_unlink_mutex(object);
184 acpi_os_delete_mutex(object->mutex.os_mutex);
192 object, object->event.os_semaphore));
194 (void)acpi_os_delete_semaphore(object->event.os_semaphore);
195 object->event.os_semaphore = NULL;
201 "***** Method %p\n", object));
205 if (object->method.mutex) {
206 acpi_os_delete_mutex(object->method.mutex->mutex.
208 acpi_ut_delete_object_desc(object->method.mutex);
209 object->method.mutex = NULL;
216 "***** Region %p\n", object));
220 acpi_os_invalidate_address(object->region.space_id,
221 object->region.address,
222 (acpi_size) object->region.length);
224 second_desc = acpi_ns_get_secondary_object(object);
228 * default handlers -- and therefore, we created the context object
231 handler_desc = object->region.handler;
238 /* Remove the region object from the handler's list */
241 if (next_desc == object) {
260 address_space.setup(object,
274 /* Now we can free the Extra object */
283 "***** Buffer Field %p\n", object));
285 second_desc = acpi_ns_get_secondary_object(object);
294 "***** Bank Field %p\n", object));
296 second_desc = acpi_ns_get_secondary_object(object);
306 /* Free any allocated memory (pointer within the object) found above */
314 /* Now the object can be safely deleted */
317 object, acpi_ut_get_object_type_name(object)));
319 acpi_ut_delete_object_desc(object);
331 * DESCRIPTION: This function deletes an internal object list, including both
348 /* Free the combined parameter pointer list and object array */
368 acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
375 if (!object) {
379 count = object->common.reference_count;
389 object->common.reference_count = new_count;
393 object, new_count));
401 object, new_count));
409 object, new_count));
412 if (object->common.type == ACPI_TYPE_METHOD) {
415 object, new_count));
418 object->common.reference_count = new_count;
420 acpi_ut_delete_internal_obj(object);
428 object, count));
431 object->common.reference_count = new_count;
432 acpi_ut_delete_internal_obj(object);
443 * (A deleted object will have a huge reference count)
447 "Large Reference Count (0x%X) in object %p",
448 count, object));
456 * PARAMETERS: Object - Increment ref count for this object
463 * DESCRIPTION: Increment the object reference count
466 * 1) An object is attached to a Node (namespace object)
467 * 2) An object is copied (all subobjects must be incremented)
470 * 1) An object is detached from an Node
475 acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
483 ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object);
485 while (object) {
489 if (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED) {
491 "Object %p is NS handle\n", object));
497 * Different object types have different subobjects.
499 switch (object->common.type) {
507 acpi_ut_update_ref_count(object->common_notify.
509 acpi_ut_update_ref_count(object->common_notify.
518 for (i = 0; i < object->package.count; i++) {
526 (object->package.elements[i], action,
536 next_object = object->buffer_field.buffer_obj;
541 next_object = object->field.region_obj;
546 next_object = object->bank_field.bank_obj;
548 acpi_ut_create_update_state_and_push(object->
560 next_object = object->index_field.index_obj;
562 acpi_ut_create_update_state_and_push(object->
576 * target object.
578 if ((object->reference.class == ACPI_REFCLASS_INDEX) ||
579 (object->reference.class == ACPI_REFCLASS_NAME)) {
580 next_object = object->reference.object;
590 * Now we can update the count in the main object. This can only
592 * main object to be deleted.
594 acpi_ut_update_ref_count(object, action);
595 object = NULL;
597 /* Move on to the next object to be updated */
600 object = next_object;
604 object = state->update.object;
614 "Could not update object reference count"));
635 * DESCRIPTION: Add one reference to an ACPI object
639 void acpi_ut_add_reference(union acpi_operand_object *object)
642 ACPI_FUNCTION_TRACE_PTR(ut_add_reference, object);
644 /* Ensure that we have a valid object */
646 if (!acpi_ut_valid_internal_object(object)) {
652 object, object->common.reference_count));
656 (void)acpi_ut_update_object_reference(object, REF_INCREMENT);
668 * DESCRIPTION: Decrement the reference count of an ACPI internal object
672 void acpi_ut_remove_reference(union acpi_operand_object *object)
675 ACPI_FUNCTION_TRACE_PTR(ut_remove_reference, object);
682 if (!object ||
683 (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED)) {
687 /* Ensure that we have a valid object */
689 if (!acpi_ut_valid_internal_object(object)) {
695 object, object->common.reference_count));
698 * Decrement the reference count, and only actually delete the object
702 (void)acpi_ut_update_object_reference(object, REF_DECREMENT);