From nobody Wed Jan 25 22:15:14 2023 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 4P2J771Hj0z3bbnF; Wed, 25 Jan 2023 22:15:15 +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 4P2J765KHqz474Q; Wed, 25 Jan 2023 22:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674684914; 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=CfN9MOVNO4udnv8fXmzr+aFiY17x0fCkhvIbPP2ZI2A=; b=fRf+a4Ys9R7ySOQDzW9LYC1EH5N9Bf7q0DvIW/BcvDwlhcgBc7WH2tpB6Gj8JMLduhGLuh AQ2FTJjyGxTiWn9lqMx0Sj2x8C35wQomlKxvJecZOJR9zfxo0YAMM3ntoSoxzhMqoXfMe5 hz55m2+pK4SNiO2LZTcHuMUdw5LK6mO1Ko+i/h9LpylUtjCOVl7OGytuX/LJHfIbKjzvmb REvb+wsqqh7E4hyd3rYNzLOTCKQT82M2MQWfyyVfY/l5gyl+5cWWByc/upMTdoZOtUoXtv n9PPwB0GPUhmRocDlEyYvV2SC44cMOVrzwRxJeZyW9b0OXltRRPY0GeqC+0cnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674684914; 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=CfN9MOVNO4udnv8fXmzr+aFiY17x0fCkhvIbPP2ZI2A=; b=Ix20IOKT5pVrIKAR2Gq2NxUkHb08GhVH0HBab5MNpdEswWfvW5/zs7MD+buN/PLwBoYTiD 0Ra1BDhpBZQDE+E7KuwoacK0OvUQ5T4MjcSVdAfX5F41lPGcRlRpDvOzn/j1dB1PR+MPvE Hl7dPlT7uUnuRqkY+UYCQo/pYgCJm4C6Gk0l+5FX4jW9ucozPZZzwZLzgpJmniALyZ8wq4 /Ac2D/NHPAlc/DAs4cC58UsSJ5JxU0QdnF9GEb6sFGTndFx1PS56MY8TbkD6hm1TCKtoTM AgXeZiuAy7whAigBEopIgQnnTvGKd+abEwo5DsDIV5ocmSRbG9qs5mZ+7XK/Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674684914; a=rsa-sha256; cv=none; b=viGlGtiE0VM+phDmyAnSMOdPEW5y8NzOK0JXdmm3A5HNGwdi6DtUzH/EKMdf+Iqc2e80Kv hwEj0JD7J+R9C5HqNe4QGu4UDL2/HdarXPUcob/TT8AFvtUEOngGOj2mzkcJL9erQIPhgT PPb7I09NhHXrBT6PDeHoDqCiO312KhT65wXGZCnFznJdVCaeZfz95C1qhKHPomCcxiyRQG 4v3hpmVBVkL2LceqQ4xUxKmpkwsAFYwXmEKPz/wtbn4kMXNededLwla/D4c+uzX74MXv1k 4osMklR6CfFVDWarfzS2YkNRa/B5z/e+Zkt96Jf3LhwZoFaSuCNGjsu4uZ09SQ== 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 4P2J764RBsz15JW; Wed, 25 Jan 2023 22:15:14 +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 30PMFEhY064474; Wed, 25 Jan 2023 22:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30PMFEYe064473; Wed, 25 Jan 2023 22:15:14 GMT (envelope-from git) Date: Wed, 25 Jan 2023 22:15:14 GMT Message-Id: <202301252215.30PMFEYe064473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: ccd31b464568 - main - linuxkpi: Define `pm_suspend_target_state` in 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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccd31b464568ecf5907dbecf255edf0676124735 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ccd31b464568ecf5907dbecf255edf0676124735 commit ccd31b464568ecf5907dbecf255edf0676124735 Author: Jean-Sébastien Pédron AuthorDate: 2023-01-20 20:13:32 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-25 21:57:21 +0000 linuxkpi: Define `pm_suspend_target_state` in It is set to `PM_SUSPEND_ON`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38161 --- sys/compat/linuxkpi/common/include/linux/suspend.h | 7 +++++++ sys/compat/linuxkpi/common/src/linux_acpi.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/suspend.h b/sys/compat/linuxkpi/common/include/linux/suspend.h index 5c15b0619bd0..8458a6f6d4c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/suspend.h +++ b/sys/compat/linuxkpi/common/include/linux/suspend.h @@ -3,6 +3,13 @@ #ifndef _LINUXKPI_LINUX_SUSPEND_H_ #define _LINUXKPI_LINUX_SUSPEND_H_ +typedef int suspend_state_t; + +extern suspend_state_t pm_suspend_target_state; + +#define PM_SUSPEND_ON 0 +#define PM_SUSPEND_TO_IDLE 1 + static inline int pm_suspend_via_firmware() { diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index 5eb60941abac..e092481ff979 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -58,6 +59,8 @@ _Static_assert(LINUX_ACPI_TAGS <= LINUX_NOTIFY_TAGS, #ifdef DEV_ACPI +suspend_state_t pm_suspend_target_state = PM_SUSPEND_ON; + static uint32_t linux_acpi_target_sleep_state = ACPI_STATE_S0; static eventhandler_tag resume_tag;