From nobody Fri Jan 21 06:37:22 2022 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 CDA66196D985; Fri, 21 Jan 2022 06:37:22 +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 4Jg8nG525Fz4TQ2; Fri, 21 Jan 2022 06:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642747042; 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=Ng/bKFX8t0jWE7WsI2Ees060hEv+ntz8VyH+Z/XFGKQ=; b=natdLOHHzy4apl+140GnrqsNHUab/M4rOZ4hvgwuHY9mO2j6KVes09yDPQ2acYNzz5ZpMJ emX2XLzPBuYub5DlkrzXeAJYuDbFdmtwF0J99dpuoRw1njjrfEDyeKGQfj2Jnaarxll/aK MPSKPQKVorQ0pKEEQB48BSJd87lRP5g+ddJG0BlN586B9QbvjCKFJ1Y5MveBUuotpiSaZ4 At5IinY40Y9QfImcYcca5Nsee0U2ro//5KUge6dTolzlyfR7HoyoSVyd6CjWTQpS9xS3RD IhvQmhjCcOuXny0H9OQRVMdMX+vBr6Sh0orSTKsP8nJjAyb8aEf9RONdRa9SZg== 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 8D45B16F2C; Fri, 21 Jan 2022 06:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20L6bMgR035408; Fri, 21 Jan 2022 06:37:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20L6bM7V035407; Fri, 21 Jan 2022 06:37:22 GMT (envelope-from git) Date: Fri, 21 Jan 2022 06:37:22 GMT Message-Id: <202201210637.20L6bM7V035407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Takanori Watanabe Subject: git: eb815a741940 - main - atrtc: Install address space handler for \_SB and its descendant. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: takawata X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb815a7419409056c65eb027c2b24b4e616480e8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642747042; 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=Ng/bKFX8t0jWE7WsI2Ees060hEv+ntz8VyH+Z/XFGKQ=; b=KVpNCTb4iyoPMSRXmR9wOaBwhiljXbsZqiKHox8HEFSDJAhzdBeNk8+hf9qqqqf2dGAsK1 xjI/6qNPv9BV6BGKh7F69/h/pkYqPbo5Y9UK3RXiG0KYyi2Ftgu1nLjjpLuCxEPbarM98n ZJUrQz5QGOFtsoMwKAiHMPCIJvhcHSsicsl0jSAvHmeEvha73pgNZRc5Qm+vMFoEnOeIIF 0fteqwQriylHCoIGAOBLIBE8aelbGnBqn2s/UOWeVfET3+ub9fZMalKMyeeDKCz+cyBwe/ MioQJC8axcBGiq5OHc93ZcqYD1PfZjjZ4kNLTlc32qoqEeYYH8CT/4RnKfRyow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642747042; a=rsa-sha256; cv=none; b=cMSA6SUfEN4bzMsbYyMqbikSNf3tFXi0ezKPdP99PHUC9R62W20gv8vWX8O5nK6AN9Ogaq cJqq3aMnvD2cSiT073VhIGZ7lf1qxAWK4S9iospUh84F7GPp2pAl2TeXMgevD0GhdfdhzC QPirCpzyik/xZXFo1MNzifqAf7cJmz/EM38vx1SJiBZMYIsQUE7Pvk8SRsVCRTanzdv5Em 9CTWPlWhj+knF7/F1Mo4XZvcDalqxicnINaEFguu60/OXJNmhTuaWVB9RuoN98z5eVuB2N 4tTR7C1FkOgUb0EwSbLEEHF3inHFq3hxt1ae8fhXS12K11GZ8O2uSg0dxMhmDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by takawata: URL: https://cgit.FreeBSD.org/src/commit/?id=eb815a7419409056c65eb027c2b24b4e616480e8 commit eb815a7419409056c65eb027c2b24b4e616480e8 Author: Takanori Watanabe AuthorDate: 2022-01-21 06:32:30 +0000 Commit: Takanori Watanabe CommitDate: 2022-01-21 06:32:30 +0000 atrtc: Install address space handler for \_SB and its descendant. SystemCMOS address space is accessible for system wide. So install address handler in \_SB space. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D33892 --- sys/x86/isa/atrtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index aff838c53851..68ea554fd95b 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -371,7 +371,10 @@ atrtc_reg_acpi_cmos_handler(device_t dev) if (acpi_disabled("atrtc")) return (ENXIO); - sc->acpi_handle = acpi_get_handle(dev); + if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT, "\\_SB_", &sc->acpi_handle))) { + return (ENXIO); + } + if (sc->acpi_handle == NULL || ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle, ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) {