git: 6cfc526e7f91 - main - acpi: fix instant panic in hest_attach()

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Tue, 07 Jul 2026 21:16:31 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=6cfc526e7f91534db46a3cff3c2dd2744310e24f

commit 6cfc526e7f91534db46a3cff3c2dd2744310e24f
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-07-07 21:14:43 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-07-07 21:14:43 +0000

    acpi: fix instant panic in hest_attach()
    
    Since now there is a pseudo-bus between our device and acpi0, we need to
    go deeper.
    
    Fixes:  9313f6b01485ad9a0b7cc59b459f5714533587c3
---
 sys/dev/acpica/acpi_apei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c
index 09073207c06e..9e5a691c8655 100644
--- a/sys/dev/acpica/acpi_apei.c
+++ b/sys/dev/acpica/acpi_apei.c
@@ -615,7 +615,7 @@ hest_attach(device_t dev)
 
 	if (!apei_sysctl_tree) {
 		/* Install hw.acpi.apei sysctl tree */
-		acpi_sc = acpi_device_get_parent_softc(dev);
+		acpi_sc = acpi_device_get_parent_softc(device_get_parent(dev));
 		apei_sysctl_tree = SYSCTL_ADD_NODE(&apei_sysctl_ctx,
 		    SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO,
 		    "apei", CTLFLAG_RD | CTLFLAG_MPSAFE, 0,