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 147971AAA34 for ; Thu, 19 Dec 2024 19:26:57 +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=1734636419; cv=none; b=Q6FEOTYw1JWznYKpV+IvtirLtHFlKm0TB2qlnbZnW4YoGVq1IE5XYh3//oVjuzib9Ij2ZNnZBHrl0bgdd+QNCzoLp3ZF9Hs2VPgiulnf6Rm0oNs/A7F+qTgNpXAfT0u3klYFZmT/0aX1HiziM92UQ9q+eTRLI7dz+c9H488FEEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734636419; c=relaxed/simple; bh=r2waQT6RI3wR1buFZyZcLpFcPl5SxGlfkm6bBs+GUVI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oJ0VqSS/jLx/qSBnZi9bzQoUMMOTlujFm+TVK6GYArW0YlAVKnWk/ViOLzcKFPz8oGN4iQwWnHzkBKx5KUdEEtq+8/xW6UipHYCYxEqCVzd5MoPl3zP7bLElQQmCJFl+OGZeqwLZhxD2wVajBe9iWmbLVga34Xi7NStLCnP5ho8= 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=cOUPudBN; 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="cOUPudBN" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BJGGkTA011025 for ; Thu, 19 Dec 2024 19:26:57 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= TceyOsbgXrP9OVMBWMLProxIlsK6QAaRS+A9GhoV8Yw=; b=cOUPudBNl7MXFp7C 4lw00F7muICON8ZEQEBOrjdc+TBV1T8VYEWIGs9g4e0Lxx493bSbWhkgKfzJ3IY8 dj3dVWCNJVMqLjscBH4W1QP36/LaRh78Yq2CtuziMzTcMBswd9YlWBf20QE/qNfM Er3RPM+N5q38+4ZNHx7Ghp26ehNhChXCX+SP2qfTOWOTC92R9wwyCiP/VaIKYGR2 Y01pDuQsVavqoHXjACnwNuBDgm5jtO/Xvovvn23C+cgrbE6ar4ELUwX6UJ9nw9Do //uCio/hyXMGniBGL8L8brgljxEBW6ickyziqjM8BlGebZ3MFnsDEam9kp2LuJeA 8O3ZjQ== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43mpvagewa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 19 Dec 2024 19:26:56 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4679ef4565aso1990391cf.2 for ; Thu, 19 Dec 2024 11:26:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734636416; x=1735241216; 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=TceyOsbgXrP9OVMBWMLProxIlsK6QAaRS+A9GhoV8Yw=; b=nnHVJjljsODy+nbIPlvqQNHu+C61mQkDtUI41NBjNyh8LBnV2BCQfCaZF8nfIxTjfw Xq+HF0b9NVMJGHf4tGJ4Q7e2JM58QUBxXXOG7f6e+f4/ZkcT+Jq69NLAlt6NdQLotfMx otdYR0FttJ8XJ24QX0d9ZcoTvKlHD3vs0dLxODh8veVxj+CdN7pdmEW1qHcYUBOHc+zN FAm4AeWN2bBojIqVD1p68ppeeVesPNpd8ekTHd8fM4kuwSWwkhhuqChbei1/AqkHIA+/ NCfHeCmbkohCuWpzJYkYEPLtVflg8VaARW8N6a553af5d6cv7Kl01crpZifUJJWb2uu+ 2o9A== X-Forwarded-Encrypted: i=1; AJvYcCWEYtewa94rlM2qhn31eVOrHSBuHltiu5QeLNI6LWd/DJQkXM6Mki7MxtZ765v2yzjSpCKdcYLv0Ub/aVU=@vger.kernel.org X-Gm-Message-State: AOJu0YyWYbozrd7bGZ17j6btPyYzjcHtE8fzDlgcXsWMkMdVG2FDmE3B tO4rABQMRqIaWrpc9nvomxO7tfjSWOn+VLEIvr7Ss40DQ6NxBPYiNPdO1WOvO7ZoELFDRba27dT Vu0Am/4Q8XwBqpgKXEdkQBIapPZl263e2HXmuUPKhkSBFTTLNvP3RT9+QLX9zIlU= X-Gm-Gg: ASbGncvCJ0126hkrq+jvKKVazWxZwRtJceCJ6uywB70pI98VnD1oQb+RqkJ2yXlOKtc Ziaf295dliXFcW7+dKhK7SPcZKbNFIfwcMHzCyJBWKJm+77j1IDiqAFf/ZH1AuPOXWLIaxN6Mw2 IovMdlWJAJfDlHoTmR2awQIOlyYomN0vX5kPBtA6SXlJLtxLCDgsREfbzy6mC7slRSfEkThERHn pGFQVBruqwOfzAXZoXKV8cJw38M6hJGSpA/8CEvsmsD0xHbFhlo7HAnA/4SF8CNjb71NyWJsjz1 9FZiyYI3n4MykB5jGS65U8oK0Psa6x9/BrY= X-Received: by 2002:a05:622a:1a03:b0:467:5eaf:7d23 with SMTP id d75a77b69052e-46a4a8bd016mr1224721cf.2.1734636415978; Thu, 19 Dec 2024 11:26:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCTR89xxu1vHIWAIqsQT8kRuL/oLnSLIOveVBByFKOkmA6Uq0iREZhkNLGVD3V8cyr3KWBBw== X-Received: by 2002:a05:622a:1a03:b0:467:5eaf:7d23 with SMTP id d75a77b69052e-46a4a8bd016mr1224521cf.2.1734636415607; Thu, 19 Dec 2024 11:26:55 -0800 (PST) Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80678c5a4sm925835a12.38.2024.12.19.11.26.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Dec 2024 11:26:54 -0800 (PST) Message-ID: Date: Thu, 19 Dec 2024 20:26:51 +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 0/3] Allow specifying an S2RAM sleep on pre-SYSTEM_SUSPEND PSCI impls To: Elliot Berman , Konrad Dybcio Cc: 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 , Konrad Dybcio , Sudeep Holla References: <20241028-topic-cpu_suspend_s2ram-v1-0-9fdd9a04b75c@oss.qualcomm.com> <20241113165329590-0800.eberman@hu-eberman-lv.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20241113165329590-0800.eberman@hu-eberman-lv.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: BH0S8tKwhruxv-b6vneqTdVjN_xeKK8t X-Proofpoint-GUID: BH0S8tKwhruxv-b6vneqTdVjN_xeKK8t 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 suspectscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 clxscore=1015 spamscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412190154 On 14.11.2024 2:10 AM, Elliot Berman wrote: > On Mon, Oct 28, 2024 at 03:22:56PM +0100, Konrad Dybcio wrote: >> Certain firmwares expose exactly what PSCI_SYSTEM_SUSPEND does through >> CPU_SUSPEND instead. Inform Linux about that. >> Please see the commit messages for a more detailed explanation. >> >> This is effectively a more educated follow-up to [1]. >> >> The ultimate goal is to stop making Linux think that certain states >> only concern cores/clusters, and consequently setting >> pm_set_suspend/resume_via_firmware(), so that client drivers (such as >> NVMe, see related discussion over at [2]) can make informed decisions >> about assuming the power state of the device they govern. >> >> If this series gets green light, I'll push a follow-up one that wires >> up said sleep state on Qualcomm SoCs across the board. >> >> [1] https://lore.kernel.org/linux-arm-kernel/20231227-topic-psci_fw_sus-v1-0-6910add70bf3@linaro.org/ >> [2] https://lore.kernel.org/linux-nvme/20241024-topic-nvmequirk-v1-1-51249999d409@oss.qualcomm.com/ >> > > I got a bit confused, but I think I might've pieced it together. Konrad > wants to support s2ram (not clear why) on Qualcomm SoCs from 2015-2023. > On these SoCs, PSCI_SYSTEM_SUSPEND (s2ram) isn't supported but doing > s2idle gets you the same effect. You'd like s2ram to work, so you > provide a way to replace the PSCI_SYSTEM_SUSPEND param with > (effectively) the CPU_SUSPEND command. If this is the wrong > understanding, please correct me. > > Could patch 2 be sent separately? I think it seems fine without the > rest of the series. > > I'm not sure why you'd like to support s2ram. Is it *only* that you'd > like to be able to set pm_set_supend/resume_via_firmware()? I hope this > doesn't sound silly: what if you register a platform_s2idle_ops for the > relevant SoCs which calls pm_set_suspend/resume_via_firwmare()? S2RAM is what you get after entering a certain state, but currently it's presented as just another (s2idle) idle state. That means some hardware that may need to be reinitialized, isn't as Linux has no clue it might have lost power. One of such cases is the PCIe block, with storage drivers specifically looking for pm_suspend_via_firmware, but that's unfortunately not the whole list. Konrad