From patchwork Thu Sep 26 18:37:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 830952 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A26517799F; Thu, 26 Sep 2024 18:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727376369; cv=none; b=sKddUw079x6m9v6MVvGdXTTdD7PSX5UH0La0VBq/icx2pZAgUFuzGv37t/avmYtVWU7bzWr9axDa1li7vdjnzxeXodP4nmZ1VQm8KMZ+icXRUkHaI0/IgzumXCcpF1KOx0AsBUOwHKSgTN+onnMJ/qPMQsXQ0KCPMBinKuGRcNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727376369; c=relaxed/simple; bh=kNIiu/VGVVSXJHMhNRUYXDx0/xfjhCmTJ/wWM3aUss4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i92+wiebkHhNpdP4SUfusOyfjrOp+hswIjgr0QyoeM3AVo2R/SqlaIeezvNbrxQi+iPjwraQrBBKOxLGM/FuD1xN7ePN0PR6tKgjbG0JpRuj0DRL9d250AMIQdG5P2pxUX3Rc3y+JLDdRSQ63FlZ2x3xxxayw3+wgN35pwHMbyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=desiato.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=hz5dbVxO; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=desiato.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hz5dbVxO" 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=ctwMLevmIAKOpvCbWdML8uH4RmlQ/xq/n4gVO6FnA9U=; b=hz5dbVxOes3jbLw9NmQd5zraMB EX4paZrHuFldQEI0sZ7Ts+PdcTd7bKVu1fEOzeBP1hQW470t+R8+maLnU6byOFPKU+KSR71xMiOg9 2m3jsPqa1UTIGin5IyaSzAJwWlPhm8j1WKLneClvOC+nXdcUykMWUCBm2wUOPe+/gZz0FOHfarvLp ZxLYpf7MQwAR7WdCMSSWB/GwIOofR9UaXl49ff0qzVi+NuEiZiQgs1qrmubhNdhld/VA/EqMrzoRP c0l2vL0Aqzyc6tMLj1qHUuCWtN8h7M8Bcggcq6nbe5SN+OyqLr49ZAm7SZ9lcu4MyA9Da7zph7voz ns3EQbpA==; 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 1sttUs-00000002EaV-0sLa; Thu, 26 Sep 2024 18:45:50 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sttUq-00000003YbL-3Ony; Thu, 26 Sep 2024 19:45:48 +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 v5 1/5] firmware/psci: Add definitions for PSCI v1.3 specification Date: Thu, 26 Sep 2024 19:37:56 +0100 Message-ID: <20240926184546.833516-2-dwmw2@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240926184546.833516-1-dwmw2@infradead.org> References: <20240926184546.833516-1-dwmw2@infradead.org> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by desiato.infradead.org. See http://www.infradead.org/rpr.html 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 --- 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..f9a015ebe221 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_HIBERNATE_TYPE_OFF 0 + /* PSCI version decoding (independent of PSCI version) */ #define PSCI_VERSION_MAJOR_SHIFT 16 #define PSCI_VERSION_MINOR_MASK \