From nobody Sat Mar 5 11:34:21 2022 X-Original-To: dev-commits-src-branches@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 2D42D19E82B0; Sat, 5 Mar 2022 11:34: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 4K9jL55kMnz3s2H; Sat, 5 Mar 2022 11:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646480061; 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=M6JJXHzHEOoszunIobJnhODVywyvw/4lZmXyPLXgVc8=; b=xP6CKYHMV6VICWBUnKR+/tMPTnNlm9lli7TyE2UT1B2BaLc004pXnFrVNOehSN0sMRM3E6 N4EFeH3wynZOcmDmfu3D2Fd162eUVgbP20B0HAt+zR+szuIjXL+XIxg85rZcHHsiLKpEh/ tpK4mCEcbT9OhROKoSSEMnIAyuln2Q1iAHd5pHqvXlMoPRt+JcwXAf8HXvMNjaVQD3PMIx SflIhf80rOT6Em0Q+UFNUlRIIm7+24QuZXu+VvPrCcNpXGh+acZiujSnBjqeXjdI7CF7ne NeqFr6KxDgld5HCwczutO2Gnj3m59NoschI0mJe/oScvIQZWRIjCh7z8lKoH0A== 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 8908D1FC00; Sat, 5 Mar 2022 11:34:21 +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 225BYLc2046626; Sat, 5 Mar 2022 11:34:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 225BYLui046625; Sat, 5 Mar 2022 11:34:21 GMT (envelope-from git) Date: Sat, 5 Mar 2022 11:34:21 GMT Message-Id: <202203051134.225BYLui046625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: db4c095026b1 - stable/13 - linuxkpi: Add orderly_poweroff List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: db4c095026b17abb0ec609c93a1a2c5208a40f36 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646480061; 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=M6JJXHzHEOoszunIobJnhODVywyvw/4lZmXyPLXgVc8=; b=Ac9ZDog/J4l+8CqbCJ0A5ReBfF9RVTndI07f+crxlqHhn2aJzqsjVcSigyz7/buy4D9Odr azKXbpLV5PNJegwhAoF5COaTSwlfQjBbjS5GKoFTOAdeP1xjVR9zn+/3Le8Zoa8lLxjJR5 38bQ7EMffz0yIJCi54oWjlrHzpGWPFVD+TFS2ue3wFzirbzIanufQgKnlmGOuH+R13goH+ M1NpE86PT6t6eFUULTbfUZzjNx4TFGV1sfGCsV0FCIbD6PoXTk5pt1pJ+rR2fU6k28yuyy L59IYmtMLdlIynXbxB0Unz2uQHBYp9Lhc2lFXBcbdBJrgnxmJIm9+tDMxiX6ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646480061; a=rsa-sha256; cv=none; b=ZIPR9Mi2R+6jjwgR0RkL4DkOEA5PsNsnY6EaFbX+navcsJtOVeh4gzqxG691HqUv/xLGMk zdLDJmJK38+n5ioyPy8nEMToeHC95VWE2XOgJBNiE0ACmPC7I6cjAy2bgc95wq300k33NR OM3hAV/MIs2Qso6d2vCVaILcQDvp+PrrvWuIJtkPx65Mhs9kefJpu23UtTfPkoui5clPzk Hmc2TTmgYq/A91B8B9QPRmThetRZkNZw/t5UCsMoX8hor0XHXRSt8SFVrD6jrhPBKXBn4f 75Cp3UrbcfsHkBpe15Gver4O0fnsX74j7kNdYBbegFqzqOV3eM3c2sX5KNPkRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=db4c095026b17abb0ec609c93a1a2c5208a40f36 commit db4c095026b17abb0ec609c93a1a2c5208a40f36 Author: Emmanuel Vadot AuthorDate: 2022-02-15 11:06:26 +0000 Commit: Emmanuel Vadot CommitDate: 2022-03-05 11:12:44 +0000 linuxkpi: Add orderly_poweroff This simply poweroff the system. Needed by drm-kmod v5.8 Reviewed by: bz MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D34287 (cherry picked from commit 8021ba67231de90f17a951497474ab017b7dab9e) --- sys/compat/linuxkpi/common/include/linux/reboot.h | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/reboot.h b/sys/compat/linuxkpi/common/include/linux/reboot.h new file mode 100644 index 000000000000..eb696d7b9d2e --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/reboot.h @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2022 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#ifndef _LINUXKPI_LINUX_REBOOT_H_ +#define _LINUXKPI_LINUX_REBOOT_H_ + +#include + +static inline void +orderly_poweroff(bool force) +{ + + shutdown_nice(RB_POWEROFF); +} + +#endif +