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 F20FB4A1A for ; Fri, 10 Jan 2025 12:31:24 +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=1736512286; cv=none; b=jlBaHSGHicST+7d3EFhpBgRrE0GOcDVuFIFVGYl2k1P0Fo5eMTpywWe95UvhoRoyNDLaaMzv+h/6s10eB/gHZapIHtr27xevdnufjPHh4APne81m16B0IsmhNozcJ+jhAz3hlx2D29R4Hp6/KQ6yYR9oyl4MacXpv1724O0lMKk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736512286; c=relaxed/simple; bh=rMrwqgxlfciuSu+bRhxb7i4mncPieLH6nku+s5dI7Dk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IRxU13UJErs+DWQm19ReZYrKrxm1G7bY3V+0cmoEshFrbRMZC3Yj1A4EGlWp2PQTlUdEHUqxrVTmH86mud/LlxvqxnVZQ2+0bpT/7YvZpsgRcw+pzuNFmfGZY7Gb7PwIjt7VY/lNmBmUEt8QTewPUHsJo+lQhy1KF17lNyAzd8E= 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=YhVadb7p; 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="YhVadb7p" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50A7oq3i012131 for ; Fri, 10 Jan 2025 12:31:24 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= PX0Ev9gANKBP3sx3YbqtVYsQ6wt/qp1gc3XGy10hIck=; b=YhVadb7p5BslF9Om C6H/vcXqU0OQioXOudzAwTeXzqRlGt9GUIOcRDeWFswv3RfrKzXa0dPK+fBB7Q3h kXKcL0uS3rdyv9WkzSyOlkPfSDz1yGHCtP4st6RTKA6Emw3+iHMPeOZ/16IYhRGC BGnJpEa1y1kbzaELZKp/KGyxFnDCAYoI+oaN24CAFb3EBc46HkRATHQcUamC65TP +/DuQDkQ1g0Tbg8QRvDs7SNEUV9UZL2avzn8V9b3wl3DrGZJ19ZzRXJDuupCNeWY LjFobp3HIm12RtsFscDSXF/hj9Qsq8cRi6icjoXb/elu/cyApDTcNRUb7nbZJY3M vp9W3A== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 442yh3gr86-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 10 Jan 2025 12:31:23 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4678aa83043so4787191cf.1 for ; Fri, 10 Jan 2025 04:31:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736512264; x=1737117064; 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=PX0Ev9gANKBP3sx3YbqtVYsQ6wt/qp1gc3XGy10hIck=; b=w3ibb2o3FWH5ZKwqRJJqakb6p0RuAWVifb/1VsuFqlDY040yhlkcOIG8kv+28K00// /RuwGAbpprWKtjs9rfMyNRzVZg9Qe3GzP0fQBQLqPngAMFAGSNZvwrujphJ/MPCgurIb bFmDhk0cd1MGmBFdnnG/ceSqRXrW4IInHf6/fdQYZ9vcPfzQ+hyc1apS6R3qbeGpSClO wfwZVRwsdp5mgqiI0b292d/Wyo8Fyzik7Ml2mWC5e6zEG6ilr0AnusUc7h7fY6ECMK/L nj5GY4HFqVMs1g1qIib/nxR0otusyxhZ/Onjlx71cUPO8qrLw5zD2L9860JIYv++eeBj 9Ycw== X-Forwarded-Encrypted: i=1; AJvYcCUZO0UUSnsQT5u2Rw2OAkCxVw7IkUHgwLoNxrdS3rXtD0iSgLlxXcTCCFg6i1rIXXr/PDlguTBuC2N3Z+0=@vger.kernel.org X-Gm-Message-State: AOJu0YzHI7N3a3Lv+jYFhMyFySbCvpmjd//YC9aYF2G8KxfImsrLBdHa bbqOOea99Ce3VgqrpJ8de5M1vmv8xBfD6T4afa3epQU1Z0oN8Wp8ZV1MT9z9NiwN62aiHyPGOM/ EdfjAKl6Q0J3FgU8uK5+cUlbps+/X8eRsU86laLbqUx8W0D57D1y2y3zxgJV49C4= X-Gm-Gg: ASbGncuk5uYtsWNwaKvbdbMxKJTUUCFGRL1Xo8yRLedzF7DQf81cnRuF9JuHlHpF5yI B403DvDmf/3TXpu19JjpnvzAIlR5EzD1i5qvFN93GA9cM+Yvs2F52XjcjmfnJdqmrore7B6SRlY Svhto8ftE2DNcTPxh8kVfkxBiJJATi0iaaEqgbFmO3gN3rhHTTT2MKAhczt0LgBpxkCsHgQe1i4 wx95zC868os0wO2q4Q61TQExfYsL+9vIkc2hCADC4i9oOXHzVJjPkcjZjzeXg8lFX8UkRCVusng Wx626ENKYUAm7cO58HGIJIcj9iKB9JUyWS4= X-Received: by 2002:a05:622a:1a0b:b0:467:652a:afa3 with SMTP id d75a77b69052e-46c7108fd9dmr70068781cf.15.1736512264479; Fri, 10 Jan 2025 04:31:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJzrcWqw0doihUt3gWiNwBbsjfHXaH4TJQ/3ZRt2H9w06ZhIyYaVQ8PCr6hJpHLe9odeetqw== X-Received: by 2002:a05:622a:1a0b:b0:467:652a:afa3 with SMTP id d75a77b69052e-46c7108fd9dmr70068501cf.15.1736512263947; Fri, 10 Jan 2025 04:31:03 -0800 (PST) Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d9904a411csm1604300a12.72.2025.01.10.04.31.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jan 2025 04:31:02 -0800 (PST) Message-ID: Date: Fri, 10 Jan 2025 13:31:00 +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 v5 6/6] arm64: dts: qcom: Enable cpu cooling devices for QCS9075 platforms To: Dmitry Baryshkov , Manaf Meethalavalappu Pallikunhi Cc: Wasim Nazir , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@quicinc.com References: <20241229152332.3068172-1-quic_wasimn@quicinc.com> <20241229152332.3068172-7-quic_wasimn@quicinc.com> <07c41571-28ca-6f9e-bcee-899bbf77f687@quicinc.com> <6zftdu5myuporxsvxlxhojnlhnfa74pjj7nvy3wmiaw7jdsuo2@3ebcpevzvtlc> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <6zftdu5myuporxsvxlxhojnlhnfa74pjj7nvy3wmiaw7jdsuo2@3ebcpevzvtlc> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: VhUgKxS5j5QCyb9C6s6Rb8B12qOOZcs3 X-Proofpoint-GUID: VhUgKxS5j5QCyb9C6s6Rb8B12qOOZcs3 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 lowpriorityscore=0 adultscore=0 mlxscore=0 mlxlogscore=983 spamscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 phishscore=0 clxscore=1015 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501100098 On 10.01.2025 12:54 AM, Dmitry Baryshkov wrote: > On Wed, Jan 08, 2025 at 09:38:19PM +0530, Manaf Meethalavalappu Pallikunhi wrote: >> >> Hi Dmitry, >> >> >> On 1/8/2025 6:16 PM, Dmitry Baryshkov wrote: >>> On Wed, Jan 08, 2025 at 05:57:06PM +0530, Manaf Meethalavalappu Pallikunhi wrote: >>>> Hi Dmitry, >>>> >>>> >>>> On 1/3/2025 11:21 AM, Dmitry Baryshkov wrote: >>>>> On Tue, Dec 31, 2024 at 05:31:41PM +0530, Manaf Meethalavalappu Pallikunhi wrote: >>>>>> Hi Dmitry, >>>>>> >>>>>> On 12/30/2024 9:10 PM, Dmitry Baryshkov wrote: >>>>>>> On Sun, Dec 29, 2024 at 08:53:32PM +0530, Wasim Nazir wrote: >>>>>>>> From: Manaf Meethalavalappu Pallikunhi >>>>>>>> >>>>>>>> In QCS9100 SoC, the safety subsystem monitors all thermal sensors and >>>>>>>> does corrective action for each subsystem based on sensor violation >>>>>>>> to comply safety standards. But as QCS9075 is non-safe SoC it >>>>>>>> requires conventional thermal mitigation to control thermal for >>>>>>>> different subsystems. >>>>>>>> >>>>>>>> The cpu frequency throttling for different cpu tsens is enabled in >>>>>>>> hardware as first defense for cpu thermal control. But QCS9075 SoC >>>>>>>> has higher ambient specification. During high ambient condition, even >>>>>>>> lowest frequency with multi cores can slowly build heat over the time >>>>>>>> and it can lead to thermal run-away situations. This patch restrict >>>>>>>> cpu cores during this scenario helps further thermal control and >>>>>>>> avoids thermal critical violation. >>>>>>>> >>>>>>>> Add cpu idle injection cooling bindings for cpu tsens thermal zones >>>>>>>> as a mitigation for cpu subsystem prior to thermal shutdown. >>>>>>>> >>>>>>>> Add cpu frequency cooling devices that will be used by userspace >>>>>>>> thermal governor to mitigate skin thermal management. >>>>>>> Does anything prevent us from having this config as a part of the basic >>>>>>> sa8775p.dtsi setup? If HW is present in the base version but it is not >>>>>>> accessible for whatever reason, please move it the base device config >>>>>>> and use status "disabled" or "reserved" to the respective board files. >>>>>> Sure,  I will move idle injection node for each cpu to sa8775p.dtsi and keep >>>>>> it disabled state. #cooling cells property for CPU, still wanted to keep it >>>>>> in board files as we don't want to enable any cooling device in base DT. >>>>> "we don't want" is not a proper justification. So, no. >>>> As noted in the commit, thermal cooling mitigation is only necessary for >>>> non-safe SoCs. Adding this cooling cell property to the CPU node in the base >>>> DT (sa8775p.dtsi), which is shared by both safe and non-safe SoCs, would >>>> violate the requirements for safe SoCs. Therefore, we will include it only >>>> in non-safe SoC boards. >>> "is only necessary" is fine. It means that it is an optional part which >>> is going to be unused / ignored / duplicate functionality on the "safe" >>> SoCs. What kind of requirement is going to be violated in this way? >> >> From the perspective of a safe SoC, any software mitigation that compromises >> the safety subsystem’s compliance should not be allowed. Enabling the >> cooling device also opens up the sysfs interface for userspace, which we may >> not fully control. > > THere are a lot of interfaces exported to the userspace. > >> Userspace apps or partner apps might inadvertently use >> it. Therefore, we believe it is better not to expose such an interface, as >> it is not required for that SoC and helps to avoid opening up an interface >> that could potentially lead to a safety failure. > > How can thermal mitigation interface lead to safety failure? Userspace > can possibly lower trip points, but it can not override existing > firmware-based mitigation. > And if there is a known problem with the interface, it should be fixed > instead. I think the intended case to avoid is where a malicious actor would set the trips too low, resulting in throttling down the CPU to FMIN / Linux throttling CPUs to try and escape what it believes to be possible thermal runaway / a system reboot. Not something desired in a car. Konrad