From nobody Thu Dec 12 18:19:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y8LMY596Kz5gZfp; Thu, 12 Dec 2024 18:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y8LMY1pGtz3xHT; Thu, 12 Dec 2024 18:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734027545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7uYapxSxjB2xu+sJzOLN82kEIulLD2vePjaZzSvAws=; b=C7tBr7QCsqrc9ARKsdiTJGXCnwwYGKraL5ARIC0uylSyxzDXGr6X4IUSzOnRYudmpULFl4 5Cn0h2PEuOC6jAWlktqFXxR97pcOc6jZf9jmp+YSRYcyF+zUKY3hBZV5AQqFkW2ldWbD1v OKnrs0NKuDXgXvcdRtGHzBGiiYs2+x6Z/b2BQWyQComSZEHU6RhXW91spRdk6SCthQ851J wVFdafeJa9+3KjQHS/X7armxhXSFhz3hXSC6xZesk29SuaaDGnB8xMH83n+iEJc2pFENni NSMVqv+Ol1dz9nkmG4yE0McWI7HzJjwNC0S0NDlm7ZhJXSjnnuDjw5kZDeSdtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734027545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7uYapxSxjB2xu+sJzOLN82kEIulLD2vePjaZzSvAws=; b=do78vJXFquvfZ9/fzH2bPeO/sq5X5iZNDh2gfJUOco5htXkyPdSAUdcnDXjCQnNKTeRsNi O2GHLxbz9X4Zv4Oz7tQc5cWLEM9N/LYOmLWnYF5MUUgj2sL6E0/XYMrvXQ81tti1PoF9SM sEUuQYnACT4XJH0R3bb4m9ostYpWg8subMTF3m1UpBjBNR6TFdDoE74Txu9clGcxJvtchZ ejoMVpR5eJ/Ps8c0dgA7GdZQfr1botCfiFvsK6w9vfMTnCU8Eioxugn1oUtaag8OlHN65n QVrG0TANL6GnIbYU8MvLjFXMX7uxU/TyySj82ba1qNJeLl13JCKehiRRT6panw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734027545; a=rsa-sha256; cv=none; b=uJuyaX04npzwt+9QxKeyz7tH2BQ40D9pIbwFjOxTK40d+t2yFYzLrNWYB79HqoLepNZsEz 5aLwa+FAiH4TPmGCXdRQKjcVbjGJIQxPnl4hFH+1lS3fudoCC5VmspS1USDh458s7Vf0I6 KayQVRBgeqP+X4W+pegNrqpUFfIsoJlgWq/znDcKbc4dkBqjSnay0JGvmBjqwatxkXGOij o6svtQ0pPmwMvrtBGWkK4Q4mXxd8m1XxUBpZnkN5Yy09X0Lfofzot49OxpWm++vpOOkA25 yn6S1FKxoGWEAY0mkoloZdosYkE4rnVyV02sPm0AUqfgXBMl4luBaauwgITQAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y8LMY1M4Zz133R; Thu, 12 Dec 2024 18:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BCIJ5K4097322; Thu, 12 Dec 2024 18:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BCIJ5VB097319; Thu, 12 Dec 2024 18:19:05 GMT (envelope-from git) Date: Thu, 12 Dec 2024 18:19:05 GMT Message-Id: <202412121819.4BCIJ5VB097319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: deb36d0c6543 - main - pci_host_generic: Support ACPI_IVAR_HANDLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: deb36d0c65436d16b04f99cc2a27bd0f3980a6f0 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=deb36d0c65436d16b04f99cc2a27bd0f3980a6f0 commit deb36d0c65436d16b04f99cc2a27bd0f3980a6f0 Author: Andrew Turner AuthorDate: 2024-12-12 16:30:28 +0000 Commit: Andrew Turner CommitDate: 2024-12-12 18:00:23 +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 --- 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 770060e7f46f..d90b7c0c01f8 100644 --- a/sys/dev/pci/pci_host_generic_acpi.c +++ b/sys/dev/pci/pci_host_generic_acpi.c @@ -344,23 +344,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