git: 479872ce9194 - stable/14 - pci_host_generic: Support ACPI_IVAR_HANDLE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Apr 2025 17:46:13 UTC
The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=479872ce91942466a4c421541acbe5865da66bd8 commit 479872ce91942466a4c421541acbe5865da66bd8 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-12-12 16:30:28 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-04-01 17:43:57 +0000 pci_host_generic: Support ACPI_IVAR_HANDLE In the ACPI attachment support the ACPI_IVAR_HANDLE ivar. While here use the common ivar function to support the common ivars. Reviewed by: imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48047 (cherry picked from commit deb36d0c65436d16b04f99cc2a27bd0f3980a6f0) --- sys/dev/pci/pci_host_generic_acpi.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sys/dev/pci/pci_host_generic_acpi.c b/sys/dev/pci/pci_host_generic_acpi.c index 0cd17d5f5555..b389eeb16fcf 100644 --- a/sys/dev/pci/pci_host_generic_acpi.c +++ b/sys/dev/pci/pci_host_generic_acpi.c @@ -343,23 +343,16 @@ static int generic_pcie_acpi_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) { - struct generic_pcie_acpi_softc *sc; - - sc = device_get_softc(dev); - - if (index == PCIB_IVAR_BUS) { - *result = sc->base.bus_start; - return (0); - } + ACPI_HANDLE handle; - if (index == PCIB_IVAR_DOMAIN) { - *result = sc->base.ecam; + switch (index) { + case ACPI_IVAR_HANDLE: + handle = acpi_get_handle(dev); + *result = (uintptr_t)handle; return (0); } - if (bootverbose) - device_printf(dev, "ERROR: Unknown index %d.\n", index); - return (ENOENT); + return (generic_pcie_read_ivar(dev, child, index, result)); } static int