Re: [PATCH v7 01/10] ACPI: scan: Remove the second DSDT traversal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 28, 2023 at 01:12:54PM +0300, Sakari Ailus wrote:
> Collect the devices with _DEP into a list and continue processing them
> after a full traversal, instead of doing a full second traversal of the
> tree.
> 
> This makes the second DSDT traversal pass unnecessary as we already have
> the nodes we're interested in in a linked list.

...

> +/**
> + * struct acpi_postponed_handle - A postponed ACPI handle
> + * @handle: The postponed handle
> + * @list: Entry in a postponed list
> + *
> + * One such entry represents an ACPI handle the scanning of which has been
> + * postponed.
> + */
> +struct acpi_postponed_handle {
> +	acpi_handle handle;
> +	struct list_head list;
> +};

If you put the list to be the first member, container_of() against it becomes a
no-op at compile time. Have you checked the code generation if you swap these
members?

> +/**
> + * struct acpi_scan_context - Context for scanning ACPI devices
> + * @device: The first encountered device, typically the root of the scanned tree
> + * @postponed_head: The list head of the postponed ACPI handles
> + */
> +struct acpi_scan_context {
> +	struct acpi_device *device;
> +	struct list_head postponed_head;
> +};

Ditto.

...

> +/**
> + * acpi_bus_handle_postpone - Add an ACPI handle to a given postponed list
> + * @handle: The ACPI handle
> + * @head: Postponed list head
> + *
> + * Add a given ACPI handle to a list of ACPI objects for which the creation
> + * of the device objects is to be postponed.

`kernel-doc -v ...` complains on the absence of Return section. Is it the same
for you?

> + */


-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux