From patchwork Sat Oct 19 17:15:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 13842855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FC7FD3C926 for ; Sat, 19 Oct 2024 17:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dgOa7g3zajQLpd5LE62QUGty2o4u6sxV9PdYHjxAfec=; b=MzBclNPgtczU25fZ8RA5Nzsppe qhv7EFJ6qZO0Lg0Ie0z+YwE05DnVP5yAHzfI+bAczSqVtRwCmB3QFY7qwOOQ2PNxXW7AjwCwjYr3m 74UKfOz1BMq2eECZuVbRxB4Jy02XUc3AgTd3GJyjdimaMlIdvrOFFgtI1YVJ+t94nTb7lly5iRFZ6 5SeVt5NbIeZ/wGje3w43Gz6+UvAXG3wDeKwrAfasCVsRXRAYLzgp2m98pyoHcP25qjqeM7G5cWBk1 qqpx8rgxy0aliuRtjH0GwMeXcv708TIQIxHD/hMyerxC1NgYbMq2bwEbp5FmzCp5IiMPBMZ1hzz/G O204C02A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2DMU-00000003hN2-2XRX; Sat, 19 Oct 2024 17:35:37 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2DCX-00000003fdq-2ste for linux-arm-kernel@bombadil.infradead.org; Sat, 19 Oct 2024 17:25:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description; bh=dgOa7g3zajQLpd5LE62QUGty2o4u6sxV9PdYHjxAfec=; b=XzGlFbWx89wH/Hwr4VFywS7iRy UkBHnYBAN0gqrQSfLligxN8doifFp8nQM/JkfDAiuCDUs9nTloQXWsEENhsW591tkwqZS1smmDjxq IE4baRNi425eXqxZk1Euqd3gQMxGNG9UREgt+rsiQZleSd2JYkbNFguG27JA0WKqeNQVcYcu+JS33 nc+SPrbSqpVJvHn5tAhhAoNAO2J8T5wNKdBwtPakGmscIp7xNkEqDk6Yp95y2/vvVkiglssnEcrUl 9Zyv+p/yON8qkZOpAs0fNzdILJPpjWG7V7eesdNM6WUfCk3DPStY7VxUnUeKi0wZcPjfmQ7UI2ABm EaDMZKJQ==; Received: from [2001:8b0:10b:1::ebe] (helo=i7.infradead.org) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1t2DCM-00000007ZXd-32pz; Sat, 19 Oct 2024 17:25:07 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1t2DCI-00000009TKb-3CtK; Sat, 19 Oct 2024 18:25:02 +0100 From: David Woodhouse To: Paolo Bonzini , Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Shuah Khan , David Woodhouse , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, Francesco Lavra , Miguel Luis Subject: [PATCH v6 1/6] firmware/psci: Add definitions for PSCI v1.3 specification Date: Sat, 19 Oct 2024 18:15:42 +0100 Message-ID: <20241019172459.2241939-2-dwmw2@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241019172459.2241939-1-dwmw2@infradead.org> References: <20241019172459.2241939-1-dwmw2@infradead.org> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by desiato.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: David Woodhouse The v1.3 PSCI spec (https://developer.arm.com/documentation/den0022) adds the SYSTEM_OFF2 function. Add definitions for it and its hibernation type parameter. Signed-off-by: David Woodhouse Reviewed-by: Miguel Luis --- include/uapi/linux/psci.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/psci.h b/include/uapi/linux/psci.h index 42a40ad3fb62..81759ff385e6 100644 --- a/include/uapi/linux/psci.h +++ b/include/uapi/linux/psci.h @@ -59,6 +59,7 @@ #define PSCI_1_1_FN_SYSTEM_RESET2 PSCI_0_2_FN(18) #define PSCI_1_1_FN_MEM_PROTECT PSCI_0_2_FN(19) #define PSCI_1_1_FN_MEM_PROTECT_CHECK_RANGE PSCI_0_2_FN(20) +#define PSCI_1_3_FN_SYSTEM_OFF2 PSCI_0_2_FN(21) #define PSCI_1_0_FN64_CPU_DEFAULT_SUSPEND PSCI_0_2_FN64(12) #define PSCI_1_0_FN64_NODE_HW_STATE PSCI_0_2_FN64(13) @@ -68,6 +69,7 @@ #define PSCI_1_1_FN64_SYSTEM_RESET2 PSCI_0_2_FN64(18) #define PSCI_1_1_FN64_MEM_PROTECT_CHECK_RANGE PSCI_0_2_FN64(20) +#define PSCI_1_3_FN64_SYSTEM_OFF2 PSCI_0_2_FN64(21) /* PSCI v0.2 power state encoding for CPU_SUSPEND function */ #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff @@ -100,6 +102,9 @@ #define PSCI_1_1_RESET_TYPE_SYSTEM_WARM_RESET 0 #define PSCI_1_1_RESET_TYPE_VENDOR_START 0x80000000U +/* PSCI v1.3 hibernate type for SYSTEM_OFF2 */ +#define PSCI_1_3_OFF_TYPE_HIBERNATE_OFF BIT(0) + /* PSCI version decoding (independent of PSCI version) */ #define PSCI_VERSION_MAJOR_SHIFT 16 #define PSCI_VERSION_MINOR_MASK \