Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1235266lqp; Fri, 22 Mar 2024 09:04:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0EBiMhsnT7SfFvv38y0d4PFFtP2zn4VxzOgIOXN9kHT/y3Vfa73eeIbl0XCdSdwvV8jjqEcZwgv0+f7cIqoDujhVI8cofH77i2WrrPA== X-Google-Smtp-Source: AGHT+IG15mI/CuESzxtM43DyPFivD/SzYBv4d6v9z3M/GMcCBAHOy1qbyXWKwO22UMFiomxPtEPV X-Received: by 2002:a17:903:1cb:b0:1dd:7de5:7ac4 with SMTP id e11-20020a17090301cb00b001dd7de57ac4mr168849plh.38.1711123357209; Fri, 22 Mar 2024 09:02:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711123357; cv=pass; d=google.com; s=arc-20160816; b=ajpYijoleREVzIP4nJsa2WRlkAKF33s6gMYt/mCOYDSFIquy1Pjd0x/jN0QKBsMiui YkOL5J+Rt11yLnHhxuP0YBKsIpqAZbNuwZWA5jQsOXhWPhLlK3TxhJbR18FUuinWQzeI Dnc39sSWDUtPH8liV1aH8e1XgyXgfaLOGxMiVXz0GoCa+F2WSdP1gwMNwsYZpYLyA3Gv g+XGso4109lAar6DSPe4fCdTRVSGXIxyWm2qAFl8cJ1hgegnaShw2VbYVourEJvA7dWz GunwHFlzKScP4lBLlO7iaxcrJ2IQZZAH61apjjaS13m+l8CAjIC29abr477S+Y5ar1JH nXYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=z76CquXmwrF8N80Wo5CkyWyW6/2cYOMPaaefcIY3XZA=; fh=/m/KvBm29e8C82BxLyQmZAabVpMOhKD/wkT2O8iGeDs=; b=XLxwaueqcCHBEj4wTVqgjuM6b0mmM4sF+cQ69vLBHd0mQJLiZLfqby5iskmr+LVGDp FQ8etEmgLQsuh/YzbOqd+I7/ivj03+YSTuSuontDTrzploItf6kDXCPGVo6E4lbvdM0U vZJlyvpLxlhgdw0gWD5KAjlbGHnhMP9UJQ75hclf+13kOroCqEakxCEhLQoj9sf1T4h6 XTEcWO8EgUTz11m4r+AVgEzzBcXEhjMOPHNbnzb1sI5gQTc9Ssw8myDEmev4avmPnnFK ErUaMOgo2HiojmmRxC88hN92L5se1VZNxZpFZtQcSBnp0hCy60Tlnsw6VmaMycKNXUyy Crhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmV2lbD8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h9-20020a63e149000000b005db9566a62fsi2193335pgk.697.2024.03.22.09.02.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 09:02:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmV2lbD8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B8160B215A7 for ; Fri, 22 Mar 2024 16:02:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74F6E56B9C; Fri, 22 Mar 2024 16:02:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jmV2lbD8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8652A55C26; Fri, 22 Mar 2024 16:02:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711123336; cv=none; b=KWu4diiDc996oYNK0XhntUbwrSlXfLlp7CoyNHgtz3xLRO10EnK69PcnFO8J5R9grl097zzEG/otSD3d1t2kR4Xo0PA62zYcDW24M+f53TGLyOrJui/vOf6rlhLH6iM/fLMCyvxYhKOJ/4n770j6ZFa8vvRz0w8B/IA87CtBt4Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711123336; c=relaxed/simple; bh=aoF4dmwFvyElelkcyMu8PBXHligJrfzMuWeep9NvMbE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=o++SgCsi1gVOqrHHhuslc+4blCyIZ/pJESI3B9ed5GLVh8AqZeJEGSP84Y/EpayIofmsSgbimmEmUWEouizamzLhBxcqfFCjKRhs4TKX0BaalchySLSq9kzQPvYXjCWPiBvXDN6kKImCMSa6I6Fg9VTqKM2DHcAEoeL+e2AFdx0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jmV2lbD8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 029EEC43390; Fri, 22 Mar 2024 16:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711123336; bh=aoF4dmwFvyElelkcyMu8PBXHligJrfzMuWeep9NvMbE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jmV2lbD8c9m4XS0wNhC398FxSmiqjv7s7Bi+bn9P468s7vuNLU2ruoJ3MPBccLCWs rgwR/pvDFZf1bWj6jd0Dhd4gZ+9bGE3/APLKNs/Iz9t5EVO+9zTe7NInnlSLFwKNSZ 2W8bmvrhS3UOcgseDjzYAtGUKnv56maI6uA8aFjAG2gdnlMhDvIwIH4t4hM/J6SJzU r/BuncZ/jwB6zYWPobFYoj5YxFXNaz7o1HU+Ndw1WKVgcghEDT7KTWf77RYOFGopG3 QJC8nmcK+OiFRLvPxkAuADC7fJND5aBOwvL6kB9t1Cb8eXSZLedn73exd+6T3u8RJ0 lp62WtpQCKA6Q== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rnhLR-00EYDl-8X; Fri, 22 Mar 2024 16:02:13 +0000 Date: Fri, 22 Mar 2024 16:02:12 +0000 Message-ID: <86jzluz24b.wl-maz@kernel.org> From: Marc Zyngier To: David Woodhouse Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, Paolo Bonzini , Jonathan Corbet , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Len Brown , Pavel Machek , David Woodhouse , Mostafa Saleh , Jean-Philippe Brucker , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-pm@vger.kernel.org Subject: Re: [RFC PATCH v3 5/5] arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate In-Reply-To: <20240319130957.1050637-6-dwmw2@infradead.org> References: <20240319130957.1050637-1-dwmw2@infradead.org> <20240319130957.1050637-6-dwmw2@infradead.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, pbonzini@redhat.com, corbet@lwn.net, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, lpieralisi@kernel.org, rafael@kernel.org, len.brown@intel.com, pavel@ucw.cz, dwmw@amazon.co.uk, smostafa@google.com, jean-philippe@linaro.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-pm@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 19 Mar 2024 12:59:06 +0000, David Woodhouse wrote: [...] > +static void __init psci_init_system_off2(void) > +{ > + int ret; > + > + ret = psci_features(PSCI_FN_NATIVE(1_3, SYSTEM_OFF2)); > + > + if (ret != PSCI_RET_NOT_SUPPORTED) > + psci_system_off2_supported = true; It'd be worth considering the (slightly broken) case where SYSTEM_OFF2 is supported, but HIBERNATE_OFF is not set in the response, as the spec doesn't say that this bit is mandatory (it seems legal to implement SYSTEM_OFF2 without any hibernate type, making it similar to SYSTEM_OFF). Thanks, M. -- Without deviation from the norm, progress is not possible.