Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EF7DC05027 for ; Mon, 23 Jan 2023 19:32:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231642AbjAWTb7 (ORCPT ); Mon, 23 Jan 2023 14:31:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230346AbjAWTb5 (ORCPT ); Mon, 23 Jan 2023 14:31:57 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69E57B771; Mon, 23 Jan 2023 11:31:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674502316; x=1706038316; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=d0TymjITAt4p1WrJetdkWvEzktXVON3Q9fS07Rfw2Dw=; b=BgyzU9ubY6sLTsfSmRRowMLzTINdrQvJbq6Zwr0QgPw7pOo+YRaw8uxc qgFdzVKb3xZNi7mO6hBo3X3i3cErYx+MUzvTmn9VdMgSi/wWvsNUr+4GY 3VyQhk/vwdBsDoM795+6IDbeCfWCE8o524qlP5HgsJLa9OfFuM+kyFcXm +W+Hf9niTJ3+eZCl3sWOKSIm+oMGo7QF+NoOFSoQAoDu4lTBB/ZsEVQYs hC0TMwPPN1/Hrcz84hafAJ3eIduQst6y7w6qgAJzZUzgvBm+a53u6nhMd aJQ8w1Ng4zy85Jpb776k6yshsp/Q8KU/IVbiEes1axZj3UGuFx7IU7Uo1 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="328216791" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="328216791" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2023 11:31:56 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="750552130" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="750552130" Received: from mhkirsch-mobl1.amr.corp.intel.com (HELO spandruv-desk1.amr.corp.intel.com) ([10.212.134.26]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2023 11:31:55 -0800 Message-ID: Subject: Re: [PATCH 2/3] thermal/drivers/intel: Use generic trip points for processor_thermal_device_pci From: srinivas pandruvada To: Daniel Lezcano , rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Amit Kucheria , Sumeet Pawnikar , Shang XiaoJing Date: Mon, 23 Jan 2023 11:31:54 -0800 In-Reply-To: <7b263423-11f8-d3e8-d040-e045dc2fb74c@linaro.org> References: <20230118181622.33335-1-daniel.lezcano@linaro.org> <20230118181622.33335-2-daniel.lezcano@linaro.org> <7b263423-11f8-d3e8-d040-e045dc2fb74c@linaro.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, On Mon, 2023-01-23 at 19:02 +0100, Daniel Lezcano wrote: > > Hi Srinivas, > > > On 18/01/2023 20:09, srinivas pandruvada wrote: > > On Wed, 2023-01-18 at 19:16 +0100, Daniel Lezcano wrote: > > > The thermal framework gives the possibility to register the trip > > > points with the thermal zone. When that is done, no get_trip_* > > > ops > > > are > > > needed and they can be removed. > > > > > > Convert ops content logic into generic trip points and register > > > them > > > with the > > > thermal zone. > > > > > In this scheme is the assumption is that trip point temperature > > never > > changes? If firmware updated the trip temperature, what needs to be > > done? > > I'm a bit confused about the situation where the firmware can change > the > trip point in the back of the OSPM. > > Does the firmware send a notification about the trip change? Or does > it > assume the OSPM will be reading the trip point while > monitoring/polling > the thermal zone ? Firmware sends an ACPI notification. For example INT3403. https://elixir.bootlin.com/linux/latest/C/ident/INT3403_PERF_TRIP_POINT_CHANGED > > Is the question for this particular driver? This PCH driver trips are not changed by firmware hence we don't have to worry about here. Thanks, Srinivas > > If the trip point is changed by the userspace (via sysfs), > thermal_zone_set_trip() is used which in turn changes the thermal > trip > temperature directly in the generic structure and then calls the back > set_trip_temp. >