> Date: Thu, 09 Mar 2023 14:48:25 +0100
> From: Mark Kettenis <mark.kette...@xs4all.nl>
> 
> The diff below fixes an issue with the way we attach "APCI devices".
> As with all ACPI diffs, this may potentially introduce regressions, so
> some wider testing would be welcome.
> 
> The fix itself involves resolving a "nameref" in the package that
> describes dependencies between APCI devices.  These namerefs need to
> be evaluated lazily (for reasons) but this wasn't done in this case.

To be a bit more specific, I'm really interested to see if there are
machines where this changes the order in which devices attach on a
system.  If that happens on your system, please send me both the old
and the new dmesg.

Thanks,

Mark

> Index: dev/acpi/acpi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/acpi/acpi.c,v
> retrieving revision 1.419
> diff -u -p -r1.419 acpi.c
> --- dev/acpi/acpi.c   10 Feb 2023 14:34:16 -0000      1.419
> +++ dev/acpi/acpi.c   9 Mar 2023 10:49:28 -0000
> @@ -2963,6 +2963,12 @@ acpi_attach_deps(struct acpi_softc *sc, 
>  
>       for (i = 0; i < res.length; i++) {
>               val = res.v_package[i];
> +             if (val->type == AML_OBJTYPE_NAMEREF) {
> +                     node = aml_searchrel(node,
> +                         aml_getname(val->v_nameref));
> +                     if (node)
> +                             val = node->value;
> +             }
>               if (val->type == AML_OBJTYPE_OBJREF)
>                       val = val->v_objref.ref;
>               if (val->type != AML_OBJTYPE_DEVICE)
> 
> 

Reply via email to