• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/acpi/utilities/

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)
79 ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object);
81 if (!object) {
86 * Must delete or free any pointers within the object that are not
89 switch (ACPI_GET_OBJECT_TYPE(object)) {
93 "**** String %p, ptr %p\n", object,
94 object->string.pointer));
98 if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) {
102 obj_pointer = object->string.pointer;
109 "**** Buffer %p, ptr %p\n", object,
110 object->buffer.pointer));
114 if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) {
118 obj_pointer = object->buffer.pointer;
126 object->package.count));
135 obj_pointer = object->package.elements;
140 if (object->device.gpe_block) {
141 (void)acpi_ev_delete_gpe_block(object->device.
147 handler_desc = object->device.handler;
159 object, object->mutex.os_mutex));
161 if (object->mutex.os_mutex == acpi_gbl_global_lock_mutex) {
170 acpi_os_delete_mutex(object->mutex.os_mutex);
173 acpi_ex_unlink_mutex(object);
174 acpi_os_delete_mutex(object->mutex.os_mutex);
182 object, object->event.os_semaphore));
184 (void)acpi_os_delete_semaphore(object->event.os_semaphore);
185 object->event.os_semaphore = NULL;
191 "***** Method %p\n", object));
195 if (object->method.mutex) {
196 acpi_os_delete_mutex(object->method.mutex->mutex.
198 acpi_ut_delete_object_desc(object->method.mutex);
199 object->method.mutex = NULL;
206 "***** Region %p\n", object));
208 second_desc = acpi_ns_get_secondary_object(object);
212 * default handlers -- and therefore, we created the context object
215 handler_desc = object->region.handler;
224 address_space.setup(object,
238 /* Now we can free the Extra object */
247 "***** Buffer Field %p\n", object));
249 second_desc = acpi_ns_get_secondary_object(object);
259 /* Free any allocated memory (pointer within the object) found above */
267 /* Now the object can be safely deleted */
270 object, acpi_ut_get_object_type_name(object)));
272 acpi_ut_delete_object_desc(object);
284 * DESCRIPTION: This function deletes an internal object list, including both
301 /* Free the combined parameter pointer list and object array */
321 acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
328 if (!object) {
332 count = object->common.reference_count;
342 object->common.reference_count = new_count;
346 object, new_count));
354 object, new_count));
362 object, new_count));
365 if (ACPI_GET_OBJECT_TYPE(object) == ACPI_TYPE_METHOD) {
368 object, new_count));
371 object->common.reference_count = new_count;
373 acpi_ut_delete_internal_obj(object);
381 object, count));
384 object->common.reference_count = new_count;
385 acpi_ut_delete_internal_obj(object);
396 * (A deleted object will have a huge reference count)
400 "Large Reference Count (%X) in object %p", count,
401 object));
409 * PARAMETERS: Object - Increment ref count for this object
416 * DESCRIPTION: Increment the object reference count
419 * 1) An object is attached to a Node (namespace object)
420 * 2) An object is copied (all subobjects must be incremented)
423 * 1) An object is detached from an Node
428 acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
436 ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object);
438 while (object) {
442 if (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED) {
444 "Object %p is NS handle\n", object));
450 * Different object types have different subobjects.
452 switch (ACPI_GET_OBJECT_TYPE(object)) {
460 acpi_ut_update_ref_count(object->common_notify.
462 acpi_ut_update_ref_count(object->common_notify.
471 for (i = 0; i < object->package.count; i++) {
479 (object->package.elements[i], action,
489 next_object = object->buffer_field.buffer_obj;
494 next_object = object->field.region_obj;
499 next_object = object->bank_field.bank_obj;
501 acpi_ut_create_update_state_and_push(object->
513 next_object = object->index_field.index_obj;
515 acpi_ut_create_update_state_and_push(object->
530 if (object->reference.opcode == AML_INDEX_OP) {
531 next_object = object->reference.object;
541 * Now we can update the count in the main object. This can only
543 * main object to be deleted.
545 acpi_ut_update_ref_count(object, action);
546 object = NULL;
548 /* Move on to the next object to be updated */
551 object = next_object;
555 object = state->update.object;
565 "Could not update object reference count"));
579 * DESCRIPTION: Add one reference to an ACPI object
583 void acpi_ut_add_reference(union acpi_operand_object *object)
586 ACPI_FUNCTION_TRACE_PTR(ut_add_reference, object);
588 /* Ensure that we have a valid object */
590 if (!acpi_ut_valid_internal_object(object)) {
596 object, object->common.reference_count));
600 (void)acpi_ut_update_object_reference(object, REF_INCREMENT);
612 * DESCRIPTION: Decrement the reference count of an ACPI internal object
616 void acpi_ut_remove_reference(union acpi_operand_object *object)
619 ACPI_FUNCTION_TRACE_PTR(ut_remove_reference, object);
626 if (!object ||
627 (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED)) {
631 /* Ensure that we have a valid object */
633 if (!acpi_ut_valid_internal_object(object)) {
639 object, object->common.reference_count));
642 * Decrement the reference count, and only actually delete the object
646 (void)acpi_ut_update_object_reference(object, REF_DECREMENT);