Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp353285rdb; Thu, 22 Feb 2024 06:01:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVHRB5fD6wWzHIXlRdXNxrkl/r4R043nAKLbEsY6/jF0EfLY0sBB6DQKcK7F7nmeTkhTvR4g+yPRI4dzRJAORV+Ne71Pmo6q9eLEyF8/Q== X-Google-Smtp-Source: AGHT+IEBjZaX583ByeXoStEkgH2SdYzmoz8bKukj2L/g3onnOc18i/TbQfQGi9vF1ph0qli16KQy X-Received: by 2002:a05:6214:1bca:b0:68f:6c38:c4aa with SMTP id m10-20020a0562141bca00b0068f6c38c4aamr19073945qvc.35.1708610475744; Thu, 22 Feb 2024 06:01:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708610475; cv=pass; d=google.com; s=arc-20160816; b=wMQd9JcuFLTI12niOumjltT8zCnhXJPLk0tl/Zmlr/4COyM7Me3QmWsl5G8V9/rj+y UCXlQKsvq0eyMUq1uI2fRQ4Fkj9J63iYIxSfz0/yt7OinSMVAhPbuZuQ4GEhmhP3LtOK zkTTpQT8z/1ePw/k4IkSbuKdljWrxKlk/Zk3WW5su7Z1mRcDWtGM68hTkBPkQPAtGFRM 0qJ2e90kev38wf9FTlmL7KiqUKkuHUX/uOIOcjnh07vx5yQhCk7mX0AWPFED42WYKDJC kdZ89qOTo8lfm2qP2/ALk36irrWCcmk2nlTRk+Bcraq494LdECULwN0OFPoCPmSFeenc YiOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=2wGnYwIfq9nup3u9bw55avJLf6TS9fj3kCr0bhf4Ym8=; fh=m+sYykxertgIv4dV4KFrEj1gZB8Le3XbQ+qPbpcRdm8=; b=m0/p4BCnPGzRAD0NfTFxQjNIuv1wFi/CYXMD5s56YsZfT0WMZ0CW/u3YfbfK5GpnYt yCqgVDull+UqaP8b1pojMc/LY39M2sE5TIf7tpDOQ532ML26qdr0FlWPzFKbeyEuG7/C mbLewswCqhOD/6XJGF/GBxuVlkZC7hZpjCbCNtxG/hybWtaRFClQs/lIKxB7yvZm0lrZ xOWYILhW6+Jl6fTs1F6ZqHu9PH8GFEiLqr/6CDHg8CEJiDKH0CIGV/aEmnMYBVPz7Ww/ 1b1ZjlZ4IsQAHAFJbngKx9OeSeFNlGJP2wm31yKTnOkTeWxISQWmSAM9mZRSzCpYR7XF n7sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p15-20020ad45f4f000000b0068cb7b40344si12664608qvg.430.2024.02.22.06.01.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 06:01:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76655-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2DB2B1C25708 for ; Thu, 22 Feb 2024 14:00:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE88C146016; Thu, 22 Feb 2024 14:00:07 +0000 (UTC) Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09308135403; Thu, 22 Feb 2024 14:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708610407; cv=none; b=cECg+DKR/paMp6nBEBMemt7suyMtsGODO9lvkuw8mgs16VB32PX5OpUsqx4CIZc5+hxzFCQyVf9gZkIYntTcLR9UR9C1SCrIENK7zO0WOUZHeqdt1Q9DICnIJhR16Y0DqGx/SBx2AFlA3a4y3xQPXPdLXhuMutIURqOf/x9wkfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708610407; c=relaxed/simple; bh=faC93JEXJFCufNC5dOS6ApNeW8gKvRR+kMj0RPtYFkQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=SF7tB6DRQ1XgTvMipaTQlB1vulN5vxcLOCYtwrJNXSdJGTUxn1tKysc17kXMpDyj4tSPRcW/DndCAgFzDqwS5j0HFrG/1FTy+xJU8vrdqqoZt9oRexi7sQXWkn9vD8p1DsjVGPEwOtAz25wSZ3+ENx0qEcBh+C11avOhM2FIEL8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.161.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-5a0333a9779so134114eaf.0; Thu, 22 Feb 2024 06:00:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708610405; x=1709215205; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2wGnYwIfq9nup3u9bw55avJLf6TS9fj3kCr0bhf4Ym8=; b=cnUzz2lmsOqJs3jlzy8yNVZGDcTSNHIrKHCGqoldcWIucfjqCBve+f1miGMHg+qy+h Kkget2JI5pw50dSUH3WS9urkcWCBbtIqFqDQSr7KG0qFhgfbmIoSWS+CDHBmRhdcRi1s 00l9cKtRN+HebfPFQvKdZ82gJdnCopKb0y3rW4jKEEk7bvlNYUePPhbMmuu3Q6fVpeQV cXd7NEVjYVbiGYXgSbuUUSb5j/ur3rJCzbroiOJyUoSgzvdXCZiBuXGrajfri/KJ82hq 3F0ecUHM6ZDaSDQDb5fN9fou/oPvbG4o74JFPWHk7+8NeGHv0Yj5+1bK7cxN4cJNaWwe 2FCg== X-Forwarded-Encrypted: i=1; AJvYcCWEPAyK6h/JXcQk/dQ3VZShRs8K9Z1xlcvAHMymYDP9etpzQaKOo/IIqp+6wah1EcPgND0CFs/lgiMSjx8UFqIHjkDlKkmpVOLT5SbmUt0wGkqaPRmkFXK0WIGMJHnncRJBMirrd/DS9m2oRmKPJ/uctlhPXZcXYvIiGv3j1abB9+BbCYsIim+NTS+xgeU7oBlJW5ge+Xn81mQLA9i5qQ== X-Gm-Message-State: AOJu0Yza3Z7YAwUB1O1YIKSlQq6BuffQc85zMGP8wdX8yugE7eJnZ15e sBTB+Ivvvsu6Pa3PPIURT1UWcQ+sNHcPtIr8St+6+cQkeINNUTkzveAWSpD5gL6dAuo0PxT7R7j etT6rUfeFvzldzzvKnDDIhwXzfuc= X-Received: by 2002:a05:6820:134d:b0:59f:881f:9318 with SMTP id b13-20020a056820134d00b0059f881f9318mr26243164oow.0.1708610404960; Thu, 22 Feb 2024 06:00:04 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <6017196.lOV4Wx5bFT@kreacher> <9235101.CDJkKcVGEf@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 22 Feb 2024 14:59:53 +0100 Message-ID: Subject: Re: [PATCH v2 8/9] thermal: of: Set THERMAL_TRIP_FLAG_RW_TEMP directly To: Daniel Lezcano Cc: "Rafael J. Wysocki" , Linux PM , Lukasz Luba , LKML , Stanislaw Gruszka , Srinivas Pandruvada , Zhang Rui , netdev@vger.kernel.org, Ido Schimmel , Petr Machata , Miri Korenblit , linux-wireless@vger.kernel.org, Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Manaf Meethalavalappu Pallikunhi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 22, 2024 at 2:48=E2=80=AFPM Daniel Lezcano wrote: > > On 12/02/2024 19:40, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > It is now possible to flag trip points with THERMAL_TRIP_FLAG_RW_TEMP > > to allow their temperature to be set from user space via sysfs instead > > of using a nonzero writable trips mask during thermal zone registration= , > > so make the OF thermal code do that. > > > > No intentional functional impact. > > > > Note that this change is requisite for dropping the mask argument from > > thermal_zone_device_register_with_trips() going forward. > > > > Signed-off-by: Rafael J. Wysocki > > --- > > > > v1 -> v2: Rename trip flag (Stanislaw). > > > > --- > > drivers/thermal/thermal_of.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > Index: linux-pm/drivers/thermal/thermal_of.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- linux-pm.orig/drivers/thermal/thermal_of.c > > +++ linux-pm/drivers/thermal/thermal_of.c > > @@ -117,6 +117,8 @@ static int thermal_of_populate_trip(stru > > return ret; > > } > > > > + trip->flags =3D THERMAL_TRIP_FLAG_RW_TEMP; > > + > > return 0; > > } > > Even if you are not at the origin of this default behavior. I'm > wondering if we should be more protective against changes from userspace > when the firmware is telling us to protect the silicon at a specific > temperature. > > What do you think if we set the THERMAL_TRIP_FLAG_RW_TEMP only if the > trip point is not bound to a cooling device? > > So trip points without associated cooling device can be writable but > others can be considered as managed by the kernel and no modifiable. This sounds reasonable to me. This is mostly relevant to thermal_of anyway, because the other drivers asking for writable trip temperature seem to want it regardless. > (This comment does not put in question this patch BTW) OK