From nobody Sun Jul 13 19:31:11 2025 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 4bgFtS6YlYz61NDN; Sun, 13 Jul 2025 19:31:12 +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 4bgFtS0RYxz3k8G; Sun, 13 Jul 2025 19:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752435072; 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=S2VdhuarmuhycBN4uN/FFyQevA+caxP8naI6FXWHRh8=; b=Um/cScsGCUxtrW0FQbt60ZNYeeT/91N0bXxQdqgbMVB/U5yVFGItGZvt8e++2PruJvvIve wplBP1wXW+ESLkd2uaxsfNptkYEKcg+3zfQeknR0R4ii/pRbs3jeaSx6bX9ahGnLs07fQG Do9CKA4e62eUASJnsC9JiVv14pNWrXz6sKlRE6mThQjUv2oXOpDAEU8XikKzXiA7h2ACRp lczSzznjutb5qSZ3U6gOgoGXci2MBdymleFG0QE1eOwUzTJM7giWWES/cFcyIpA8C9R/GM 1mHXEjtpGY8o9RofIo9YepYawkXeU0fEik7G8rRVUfGxhZoO78qnpoK1+WJM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752435072; 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=S2VdhuarmuhycBN4uN/FFyQevA+caxP8naI6FXWHRh8=; b=nD8QrteLjjJugzSa6ph8BlgYetDMYqWs51z6TYl420apvtlqsZEwb6r+hi4B9SniuBmA+T 2gq6ewwrUSebVlwarWDK65TeYen9mZOOdRsa6hXnvo9AXXbHTmYl/Qt5MFQDDxz2a8c6X0 0/qPT7OBGGmoRznoW4odmDf3cDPEtvOFfeImqYi3o/S9GQdyvK0+uhunnx6ZEJg4ceyJh5 vp2A1WT081beZLL8z8/N81ZuGeldfLaFTqUH89mZpFU7GRHTBCgBce6Sv25WOgMq+8+nt4 w0xknywR1a3iG0BAuzab/KvqddFO88Ws+t0QX8GWmbkcOrHFp/JWX9TODlrLug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1752435072; a=rsa-sha256; cv=none; b=ZR7GFIA6DG93bAvCP+Cr9KcBrOLiAmrcVroJnZ8sFzJKuLXo3DdYo2HJcsZJKjr76dntsz cF6/TsHmvQFj/oAELuEaoXkJAdf4MOtq16ugT7WMl4qjVcn6K9luSwM2Qz2qpX9XhhwyST F85imTNCQWRH4S7PQrKnDOxwSX4SovsocpEiHtk/dF1EA9RvP8hNfAV4PV2YIw/EfrdJdh f1wqotlbtAonS+/K7jm0hywFsT8sifIZBsMrG6oRDE/j77AhqxVWfth8TM0CBTMaNJw6HS SIWi2dHc9+6p6fuoHmffqdKMNk5DR+xNpgt32UzUTzkl6iUYSAJS83qbGMlx2Q== 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 4bgFtR6cTgz6S6; Sun, 13 Jul 2025 19:31:11 +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 56DJVBAv070863; Sun, 13 Jul 2025 19:31:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56DJVBKI070860; Sun, 13 Jul 2025 19:31:11 GMT (envelope-from git) Date: Sun, 13 Jul 2025 19:31:11 GMT Message-Id: <202507131931.56DJVBKI070860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 45f0c867803b - stable/14 - LinuxKPI: acpi: add acpi_evaluate_dsm() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 45f0c867803bed4251b9c1bc65d610796e6e1cac Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=45f0c867803bed4251b9c1bc65d610796e6e1cac commit 45f0c867803bed4251b9c1bc65d610796e6e1cac Author: Bjoern A. Zeeb AuthorDate: 2025-06-15 10:43:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-07-13 19:25:03 +0000 LinuxKPI: acpi: add acpi_evaluate_dsm() Add a acpi_evaluate_dsm() wrapper around the native implementation as needd by wireless drivers. Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50864 (cherry picked from commit ba6460df5607e572e9c868413c75ce9bc5ce9a00) --- sys/compat/linuxkpi/common/include/acpi/acpi_bus.h | 6 ++++++ sys/compat/linuxkpi/common/src/linux_acpi.c | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h index 65bcbe7f1bdd..47195e7d66a6 100644 --- a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h +++ b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h @@ -58,4 +58,10 @@ bool lkpi_acpi_dev_present(const char *hid, const char *uid, struct acpi_device *lkpi_acpi_dev_get_first_match_dev(const char *hid, const char *uid, int64_t hrv); +union linuxkpi_acpi_object; + +union linuxkpi_acpi_object * +acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const guid_t *guid, + UINT64 rev, UINT64 func, union linuxkpi_acpi_object *arg); + #endif /* _LINUXKPI_ACPI_ACPI_BUS_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index 6a9afb3ddff0..d18c69d9210d 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -99,6 +100,17 @@ acpi_evaluate_dsm_typed(ACPI_HANDLE handle, const char *uuid, int rev, argv4, &buf, type)) ? (ACPI_OBJECT *)buf.Pointer : NULL); } +union linuxkpi_acpi_object * +acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const guid_t *guid, + UINT64 rev, UINT64 func, union linuxkpi_acpi_object *pkg) +{ + ACPI_BUFFER buf; + + return (ACPI_SUCCESS(acpi_EvaluateDSM(ObjHandle, (const uint8_t *)guid, + rev, func, (ACPI_OBJECT *)pkg, &buf)) ? + (union linuxkpi_acpi_object *)buf.Pointer : NULL); +} + static void linux_handle_power_suspend_event(void *arg __unused) { @@ -323,6 +335,13 @@ acpi_evaluate_dsm_typed(ACPI_HANDLE handle, const char *uuid, int rev, return (NULL); } +union linuxkpi_acpi_object * +acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const guid_t *guid, + UINT64 rev, UINT64 func, union linuxkpi_acpi_object *pkg) +{ + return (NULL); +} + int register_acpi_notifier(struct notifier_block *nb) {