Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4855206rdb; Tue, 12 Dec 2023 11:05:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHn5dtwFllT5tVEQQKLqKhJe3wvb2/upkpDYUy+DfEmpLH2xXLjDQuwmv+0dGkyiX8eXnb8 X-Received: by 2002:a17:903:32c7:b0:1d3:47c6:b908 with SMTP id i7-20020a17090332c700b001d347c6b908mr527345plr.48.1702407944645; Tue, 12 Dec 2023 11:05:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702407944; cv=none; d=google.com; s=arc-20160816; b=wp4PeBsFVU1rNS8nUttWcRxBp8D/VZdEjdwNOgrr4F4EM4OYJf7U/iUq9qJxa5WfN4 e/gHNVlnpB2FNn6VEMAMymEOHfwHmNvhZLMbY563YUEiRlHKe4gV2dV4ztWPBNMknUur iob5R/AsQBWi38VMNHdwsdBGoRhVMz5UXtvdyyMKYFrmMe6I1F4uk6pNxOAjNdCA+pxs qzrHxNPhhrSK4odrmZxUy/2RcFEu5UlYD/71zuS0GCToXRx0T87tg5WtQP7uBv30G67b h+y7UTv2d/yU+rm4+6jgTn1n2OX+/MOQXzk+H4aB7aQOReYVqkNbawJHGTK2CTiSTeTF ErNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=WhnCbXsxH8EVCPKosrgOnP5NXIp6YoExqMkUa0V0Bio=; fh=uDfSeyQcicFPe9yKG3eLk/KL9G6+nqtKqMbn80XCcZM=; b=xIWj6SDskD1eIsAQAV+XUiL3KEGJgfS8z1MfGGpppJOeguZvH9fgRv/xg/UQWDqvqn FmCM2C1SQSxM1A+zkqRJdQXqP2ceBkFyn6miP8b0M7xh9+jbYRg789ZaikPaZVvpkSuf Htjw3/Nki6rAh/mU4d+GOIulYP/L+wntcKMK2ucicMRLZnVfhIXhrSFfEFAEwo4Ysnrm yWgbRu8wapUDV3v9khVNEd16wR+d/Gcn28HWL2EDHOF06yLElLXmj9T/aFmz55v2W1I1 U9DkaDVzpIFz6p6WkBrFVt7EPlvyqbf0YiPb2sbxqDJwfOYTki9kU1zUiqOjeouDR27X CUDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id c8-20020a170903234800b001d09013a13csi8269504plh.329.2023.12.12.11.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 11:05:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0BACF80A90C9; Tue, 12 Dec 2023 11:05:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbjLLTFW convert rfc822-to-8bit (ORCPT + 99 others); Tue, 12 Dec 2023 14:05:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbjLLTFS (ORCPT ); Tue, 12 Dec 2023 14:05:18 -0500 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19310D2; Tue, 12 Dec 2023 11:05:23 -0800 (PST) Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3b8652c0bd2so476252b6e.1; Tue, 12 Dec 2023 11:05:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702407909; x=1703012709; 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=acI53ybdHT2Ybz8qt+m1BvwwM9zmui8Iu0a8RDnCHxk=; b=SlhSFn2bKYKv0v+sGQveSqnRWymzPtVFgumTRPWhI3qM8GAGQSeV19ZnSs4cp2+0ts qeH4PevC8r4pYuXZBZSqVCppEabeF6nTCyYenN2GUFtXBFot1h6rMGYPvNvq8Z1sfYc2 LEMUU+vaD3YBifKYYM7lZ57HSg3cOQaXBMYULdGENtzjNYHF4AOWMfAT1J9c6W1aHeaf tp2ZXjpwjgB2YMFKGRzkugMjmvJZD7ZBIY3CkMu3uttxdT1EzfDvmOkJMtj+kr5egHmp UUildqRqlq0WSn5LFQIp350a2yEPUx1RbQaQSZ1/B6AO3JkEjsD0MaCXzqidzW+9G9hP nijw== X-Gm-Message-State: AOJu0YwqwmO75MFah4O7lNoJTvDjxGK4H7SKQEoJBAol/PK6H8dQtmwI 5zMmcDOxfzzntkcfLCcv+F52DrALHJHffy9QJgQ= X-Received: by 2002:a4a:a7c4:0:b0:590:6585:5c41 with SMTP id n4-20020a4aa7c4000000b0059065855c41mr10944482oom.0.1702407909102; Tue, 12 Dec 2023 11:05:09 -0800 (PST) MIME-Version: 1.0 References: <5737811.DvuYhMxLoT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 12 Dec 2023 20:04:58 +0100 Message-ID: Subject: Re: [PATCH v1] thermal: trip: Send trip change notifications on all trip updates To: Daniel Lezcano Cc: "Rafael J. Wysocki" , Linux PM , Srinivas Pandruvada , Zhang Rui , Linux ACPI , LKML , Lukasz Luba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 11:05:42 -0800 (PST) On Wed, Dec 6, 2023 at 5:01 PM Rafael J. Wysocki wrote: > > Hi Daniel, > > On Wed, Dec 6, 2023 at 3:38 PM Daniel Lezcano wrote: > > > > > > Hi Rafael, > > > > On 05/12/2023 20:18, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > The _store callbacks of the trip point temperature and hysteresis sysfs > > > attributes invoke thermal_notify_tz_trip_change() to send a notification > > > regarding the trip point change, but when trip points are updated by the > > > platform firmware, trip point change notifications are not sent. > > > > > > To make the behavior after a trip point change more consistent, > > > modify all of the 3 places where trip point temperature is updated > > > to use a new function called thermal_zone_set_trip_temp() for this > > > purpose and make that function call thermal_notify_tz_trip_change(). > > > > > > Note that trip point hysteresis can only be updated via sysfs and > > > trip_point_hyst_store() calls thermal_notify_tz_trip_change() already, > > > so this code path need not be changed. > > > > Why the ACPI driver is not calling thermal_zone_device_update() after > > changing the trip point like the other drivers? > > It calls that function, but because it may update multiple trips in > one go, it does that after all of the updates are done, via > acpi_thermal_check_fn(). > > > It would make sense to have the thermal framework to be notified about > > this change and check if there is a trip violation, no ? > > It is notified as noted above, but not synchronously. I believe that the question above has been answered, so are there any other comments or concerns regarding this patch?