From nobody Tue Jan 23 17:45:49 2024 X-Original-To: dev-commits-src-main@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 4TKDyj5wwcz57mqs; Tue, 23 Jan 2024 17:45:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDyj5Mkhz46wT; Tue, 23 Jan 2024 17:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031949; 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=qx8q00kikTWirWZ/UPG5yZrxGz3PVcHlVYjLR/n4n7M=; b=U1PbjV4sgj+gtLHUnfP/SBi8wX0fArbwxUexVb1HTw840pBPhI3FHiTSKFTJjex+nH2p3G sHrGZPkcadGYA3LrNQlbgTjJknuuj5JGITftGWslTWhj0pIunvYKkXSCmqiNOXEOr+okku LtHmw7YLGvypM644MtqJJnnK9XM7t3wOORWXpGcV7fIvFjC9Y1lINroNXPrjDT1N2IA2fd FMrxR0pBHpzj/RTsJZAFN5cuv6Yn2JV2pWzEi+OPnv5vaeki2Njv9gbo/xXua6ATXuhzMO uv426Uulf61ft9hTZGmoaPOcOluO1bNsxHmqjav136tOelmSgVUt+INUG39o3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031949; 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=qx8q00kikTWirWZ/UPG5yZrxGz3PVcHlVYjLR/n4n7M=; b=mrJzHcYZNEbAeZUgnzqYAr40mHdGKRNvAKKXyyt0zfoMmLo74n6UoC6tMW9+2LNiSrvuGQ nMinb9tmgP/Mj7vIK8r3hzGLVOUyPJuG1bfNKRsIcPBZKTpI6vgUNOQiC0ffZPTGMBkaMU p69YRkeFlESXxsrqwReAwWiSRhvGp2rcvx29bzVDuH7F/Hb4zyJQykqd/TXKJvoptcV6mW bMrf9lZjkrZwj3An3NZDXCxMiUyeIkthVtPU+HBP4c3NX4aTqlG/Zz0ttJvMx9XMZpG0TP QMJsi1mnHsK3kb46HTcl5bHbt9PeqnaN/IMwWkiag9W0TMPm6Kfc8aeFWi38tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031949; a=rsa-sha256; cv=none; b=b7zSPS3xg9Cz6NNlCJpWvOt5O7MNG28ytPIo6lQGvwWZoeFGlCzrcv79vRIEDzLG/VRSyF 1CoVn02+0xkkRpkeG8QZbpr0GvupdC00g8aSrs22Lk/T+vhBKDdm70lcb0elC1h6upQGqF 2r408ALR18opknKSthIQSpiEJmOWW8N5d0tvl7vIoqtbp6yxzQ1g7EB63tHFVEI4dcBoYN UFUhKWhTufe5C0NMlLGn71LL+w3qNjPG2ZdekDnyUIslWx0T251eyulNHq0QMop5O/c3xe e1s/LeqAu5m8ulsuG1bzgJu2qwF+lXBBxUqETfH3VREQCndsufyOlucZCZ2rjA== 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 4TKDyj47hZzgQd; Tue, 23 Jan 2024 17:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40NHjnkW075568; Tue, 23 Jan 2024 17:45:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjnAc075565; Tue, 23 Jan 2024 17:45:49 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:49 GMT Message-Id: <202401231745.40NHjnAc075565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c2d4fef658e0 - main - acpi_pcib: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2d4fef658e0dfd998115f1395cd8705b432e3c8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c2d4fef658e0dfd998115f1395cd8705b432e3c8 commit c2d4fef658e0dfd998115f1395cd8705b432e3c8 Author: John Baldwin AuthorDate: 2024-01-23 17:35:22 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:35:22 +0000 acpi_pcib: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43428 --- sys/dev/acpica/acpi_pcib_acpi.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 06e6bc233720..451a8d8b736d 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -103,6 +103,12 @@ static int acpi_pcib_acpi_adjust_resource(device_t dev, static int acpi_pcib_acpi_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); +static int acpi_pcib_acpi_activate_resource(device_t dev, + device_t child, int type, int rid, + struct resource *r); +static int acpi_pcib_acpi_deactivate_resource(device_t dev, + device_t child, int type, int rid, + struct resource *r); #endif #endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, @@ -128,11 +134,13 @@ static device_method_t acpi_pcib_acpi_methods[] = { #endif #if defined(NEW_PCIB) && defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), + DEVMETHOD(bus_activate_resource, acpi_pcib_acpi_activate_resource), + DEVMETHOD(bus_deactivate_resource, acpi_pcib_acpi_deactivate_resource), #else DEVMETHOD(bus_release_resource, bus_generic_release_resource), -#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), +#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, acpi_pcib_get_cpus), @@ -764,6 +772,31 @@ acpi_pcib_acpi_release_resource(device_t dev, device_t child, int type, int rid, return (pci_domain_release_bus(sc->ap_segment, child, rid, r)); return (bus_generic_release_resource(dev, child, type, rid, r)); } + +int +acpi_pcib_acpi_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) + return (pci_domain_activate_bus(sc->ap_segment, child, rid, r)); + return (bus_generic_activate_resource(dev, child, type, rid, r)); +} + +int +acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) + return (pci_domain_deactivate_bus(sc->ap_segment, child, rid, + r)); + return (bus_generic_deactivate_resource(dev, child, type, rid, r)); +} #endif #endif