drivers/acpi/acpica/pswalk.c

Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/pswalk.c

File Facts

System
Linux kernel
Corpus path
drivers/acpi/acpica/pswalk.c
Extension
.c
Size
2486 bytes
Lines
106
Domain
Driver Families
Bucket
drivers/acpi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (op != parent) {

			/* This is the descending case */

			if (ACPI_IS_DEBUG_ENABLED
			    (ACPI_LV_PARSE_TREES, _COMPONENT)) {

				/* This debug option will print the entire parse tree */

				acpi_os_printf("      %*s%s %p", (level * 4),
					       "",
					       acpi_ps_get_opcode_name(op->
								       common.
								       aml_opcode),
					       op);

				if (op->named.aml_opcode == AML_INT_NAMEPATH_OP) {
					acpi_os_printf("  %4.4s",
						       op->common.value.string);
				}
				if (op->named.aml_opcode == AML_STRING_OP) {
					acpi_os_printf("  %s",
						       op->common.value.string);
				}
				acpi_os_printf("\n");
			}

			/* Look for an argument or child of the current op */

			next = acpi_ps_get_arg(op, 0);
			if (next) {

				/* Still going downward in tree (Op is not completed yet) */

				op = next;
				level++;
				continue;
			}
		}

		/* No more children, this Op is complete. */

		next = op->common.next;
		parent = op->common.parent;

		acpi_ps_free_op(op);

		/* If we are back to the starting point, the walk is complete. */

		if (op == subtree_root) {
			return_VOID;
		}

		if (next) {
			op = next;
		} else {
			level--;
			op = parent;
		}
	}

	return_VOID;
}

Annotation

Implementation Notes