From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 B1D4E1C4A1C for ; Fri, 20 Dec 2024 13:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734703062; cv=none; b=pvqsC6OTQ0kj3Ci3LkX6FVK5uEqp+89CBvXfHRlpI95qLB22Kk4bKshLRG/06F00zW1J5VqZ1mpTjablbQwLi/L1RjWz71HGkal970sHPeI/MZoQ39oalCTo5HKtOqIyR1EJmKyEqCszu5wOCM2ikEZL/BnFv+p7L2V6toUdpiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734703062; c=relaxed/simple; bh=cqTFLw4KHp9mJnfawH8KffHxaxg0QvbgQkQv3xwAbyU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HIIW7s7CMhnbdLQvGlX8E2nmUkTno9LVfBGE6lG+LGePvRp65X/gX//ks2fidSJUYqQ09z9Bx6/kG+d2ZvHUxxzzTz35P50wxIM8Oh+wHTNQT5z6xB0ZGsWAAtQz6c+I0gbQkOsdYM+eh3R92lmd/ym5BC5ljRtJol5ZCZh88qA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=HlL3l9UU; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="HlL3l9UU" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BKD3eaY019153 for ; Fri, 20 Dec 2024 13:57:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 56bHgJLPiTtJ7oA6sbuuFB9R8hrWoD6GaOyTZakQqr8=; b=HlL3l9UUEcTZCYjI 6VJx6DHCANIIwSgjxqYnYBt7l18Ag9NdKkqugQtwOhdoSXFKbzz/Mei5kPrP/pyv oCR/xDWAYf5yDdAfF8gIRSdF18Kw6ZksYmcw3s7GtbBVHQBZHN9maj3Sm3v/cT1r DDQwC6d0rVzu4NPB9OYHUG2h4I7IMJvlcXshLkNDaVOjOpfYGsqvUOnRK8jtBoGa NgStPYi43yE25/oTMrZLl0RNYoz+np4dkekq5Z8HjGb89ip5/wjr1v4zsCGhVWA9 ffv0/tWaJTnwMRsKCi8HE68QZBlzQYyd5vaXm0n6OYlbJFRgBUa7fjDOJbrKiZ7f uqNzow== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43n94tg464-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 20 Dec 2024 13:57:39 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7b6fec2de27so46690885a.1 for ; Fri, 20 Dec 2024 05:57:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734703059; x=1735307859; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=56bHgJLPiTtJ7oA6sbuuFB9R8hrWoD6GaOyTZakQqr8=; b=EnPRiIipTDZAjV0LCQHNIE/ljQ4Pbc2yGo76mtR0jfgVeAIztZ/AkQmyrdsTt8aEts iuKNJvCqalztQVSHZzOBfLG4/rn6LlZvGxHDQnrgetGFFx8VqeG/ENGy53j98+uP0TQD 3f6RpP2W9kGh0MQfWEf9W4lhMwB01keF9Dj5T+LVV3eYeuVpZN3fCIJzrPENDKhxQsbS z8FA3iVb5hlD7wZyUnlXJhfAUBUQ46paodg7U/MlIV7jdmyUenLejzocy13plt0yYyfc 9+eR7v2oPBzUND3iMeZXEKukdU1FtzfozZIzpl0cbNpFtJ1wlqDgPcAqSWrN4VcWK2UN MiQQ== X-Forwarded-Encrypted: i=1; AJvYcCXXgsI9cmIbTZoBBf009K0n8VIsWWk7US7aMrwViXE5tgYLdLywXDEwo9C04xuHxIHzVZ+K022YwliZ9iM=@vger.kernel.org X-Gm-Message-State: AOJu0Yz6DtKbFhCYeacy8GTBTGVTtsVeNOXkNy5LtjhsMk77yb6R0M2B Ltg7TBLtmVtVpDiiUwXxBODN7IDeDTBJmKw3iYO4ASC3hjiVTQ3KioAQC8nkxKlGlGnGXq7/D1m RokUgTN5Rfpvu25RA7t9x2ZlFN3mz2tKtrNmgRJKxXq4CdWN2D6RblgRWKh2jeJ8= X-Gm-Gg: ASbGnctaEc7HE2fAAIc7lQR0o+nIjBAwnYwdhywataRk4f1k9wY5aTrSTtmHisShylG KN/dBxaR9q5sJ1CIoy72PPIbCU9nplcXLglfpxCsPp2mW59e9tz+Fi0m/i8bi3womaK9jC2kuqn ennm/TGR0TyWJaLRDN6DMI6Q0aTZFQ+N9Buy4loZh+Cc//4X/ui1nUOCIEzmXweZ4P/Ca+ZPNgW 4HocLKgZcJcoLHbkz5UZJ/zNX7E5Oysh3fioxss5jxN8Qat005v9Mhk+D4m/e0NiOA9AKQi43UZ h2H936SZ7qJWSMexSx9JOscSz3tf2ne4i/8= X-Received: by 2002:a05:620a:2986:b0:7b3:577b:6da8 with SMTP id af79cd13be357-7b9ba733e3dmr141503685a.4.1734703058598; Fri, 20 Dec 2024 05:57:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6tuv4tNldIE356QcRbQFCyNERIo5TnquyOp2uCweUBMvT2I+yyu94kCIo8uKwhq9CZfd6VA== X-Received: by 2002:a05:620a:2986:b0:7b3:577b:6da8 with SMTP id af79cd13be357-7b9ba733e3dmr141501785a.4.1734703058192; Fri, 20 Dec 2024 05:57:38 -0800 (PST) Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80701abd1sm1750204a12.76.2024.12.20.05.57.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2024 05:57:37 -0800 (PST) Message-ID: Date: Fri, 20 Dec 2024 14:57:34 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] dt-bindings: arm,psci: Allow S2RAM power_state parameter description To: Sudeep Holla , Konrad Dybcio Cc: Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lorenzo Pieralisi , Mark Rutland , Marijn Suijten , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjorn Andersson References: <20241028-topic-cpu_suspend_s2ram-v1-0-9fdd9a04b75c@oss.qualcomm.com> <20241028-topic-cpu_suspend_s2ram-v1-1-9fdd9a04b75c@oss.qualcomm.com> <54cc4221-ba5f-4741-9033-20874265ca01@oss.qualcomm.com> <349bac70-87e0-4870-a3f0-9f6a3b3e6824@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: MZhX_qPdEDISTLWo1Xjkg5wXForOa6Dy X-Proofpoint-ORIG-GUID: MZhX_qPdEDISTLWo1Xjkg5wXForOa6Dy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 spamscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412200115 On 20.12.2024 2:55 PM, Sudeep Holla wrote: > On Fri, Dec 20, 2024 at 01:54:45PM +0100, Konrad Dybcio wrote: >> On 20.12.2024 12:27 PM, Sudeep Holla wrote: >>> On Thu, Dec 19, 2024 at 08:43:27PM +0100, Konrad Dybcio wrote: >>>> On 6.12.2024 11:21 AM, Sudeep Holla wrote: >>>>> On Mon, Oct 28, 2024 at 03:22:57PM +0100, Konrad Dybcio wrote: >>>>>> From: Konrad Dybcio >>>>>> >>>>>> Certain firmware implementations (such as the ones found on Qualcomm >>>>>> SoCs between roughly 2015 and 2023) expose an S3-like S2RAM state >>>>>> through the CPU_SUSPEND call, as opposed to exposing PSCIv1.0's >>>>>> optional PSCI_SYSTEM_SUSPEND. >>>>>> >>>>> >>>>> If so, can you elaborate why s2idle doesn't work as an alternative to what >>>>> you are hacking up here. >>>> >>>> Please see other branches of this thread >>>> >>>>> >>>>>> This really doesn't work well with the model where we associate all >>>>>> calls to CPU_SUSPEND with cpuidle. Allow specifying a single special >>>>>> CPU_SUSPEND suspend parameter value that is to be treated just like >>>>>> SYSTEM_SUSPEND from the OS's point of view. >>>>>> >>>>>> Signed-off-by: Konrad Dybcio >>>>>> --- >>>>>> Documentation/devicetree/bindings/arm/psci.yaml | 6 ++++++ >>>>>> 1 file changed, 6 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml >>>>>> index cbb012e217ab80c1ca88e611e7acc06c6d56fad0..a6901878697c8e1ec1cbfed62298ae3bc58f2501 100644 >>>>>> --- a/Documentation/devicetree/bindings/arm/psci.yaml >>>>>> +++ b/Documentation/devicetree/bindings/arm/psci.yaml >>>>>> @@ -98,6 +98,12 @@ properties: >>>>>> [1] Kernel documentation - ARM idle states bindings >>>>>> Documentation/devicetree/bindings/cpu/idle-states.yaml >>>>>> >>>>>> + arm,psci-s2ram-param: >>>>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>>>> + description: >>>>>> + power_state parameter denoting the S2RAM/S3-like system suspend state >>>>> >>>>> Yet another NACK as this corresponds to PSCI SYSTEM_SUSPEND and as per >>>>> specification it takes no such parameter. This is just misleading. >>>>> >>>> >>>> Yeah PSCI_SYSTEM_SUSPEND takes care of this on platforms that expose it. >>>> >>> >>> And those that don't advertise/expose don't get to use, simple. >> >> The spec says: >> >> "The call is equivalent to using the CPU_SUSPEND call for the >> deepest possible platform powerdown state." >> > > Please take a look at the preconditions for both the calls. They are > different. Which is *precisely* why I want to tell the OS that it's a S2RAM state, so that different actions can be taken in peripheral device drivers. Konrad