Message ID | 4846448.GXAFRqVoOG@kreacher |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2084808vqb; Tue, 3 Oct 2023 06:27:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8gAOO4CyXEg9FPI7NjRaeZDjYZ5P4+KbD+FF3hgtGuPJLOgrX66zpm80JE2j/PTaKIpHP X-Received: by 2002:a17:902:ce8b:b0:1c5:be5c:bb5b with SMTP id f11-20020a170902ce8b00b001c5be5cbb5bmr14059382plg.59.1696339675179; Tue, 03 Oct 2023 06:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339675; cv=none; d=google.com; s=arc-20160816; b=DUXJjBpoYc7nCBvLTIy9UdRbfQdM5aogtl0T+I9iBVywy3jz52Yin8Rw7Q7FK0KdOa YocZIODYT7ef3NtCtb3fHry7R4M8WshvFpQYJQ38siIWbqRoJdC3vsQ+UVkVV7kObslQ zl+XXZ0XdEmGbQdWnN/CiUTcCHoRMzdD1vR8m//mUpkuCZy98udq1Y4Izf65VcqXii52 QbTPAZlA6avTzel/s+bW4pkwT0xKV5USWD/pehbxotjKsTJoPLXyPmTw1/vdVvmp1XHr YfjkOsBsKcITK8V2vZlwdleXcpTCAwM44n23SQdF6BmGSfSi4Jtda/8YgdHKPGTQBPDm wiFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Bz9DF2MFMY0nxUCOrYqmvw/dCxAuW7+RmK8iSBY+hZ0=; fh=99EXAs+vKBd0HJG3OZyygM2izuzSBDrYNgeLDvqQNA4=; b=PdHXYJo2DqOFQ5Ud81J+2vM9UMcDTaarmURgrYj037Y71kUtoT1MaeOsHue0lIIZFy 924C+dt5CAKa/xE/bbczn9HJ/1WCWJ7lLt932dd+nnueOp6ESsrad7KNKaPIbryn8uOU yntX4Vu1lAWG3+nvIaMiywpA30m7ZmQof805eml125tKwtzrphQc6N7BxhIj/08nv1ME Qj9eIeV+4yAFSUfa/mpyDXVIdscUcKpKjokHaT/iPfBW4M46T5mT7Af0GrNAGotkWpgC 7ZMI2UjIQ/3f4zdV1vKeU/lWDnufUrxlUSFkFpfJObENotSFOtUgKBIcvPYEPTlql5P8 d0XQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ik21-20020a170902ab1500b001c61ad51779si1342485plb.623.2023.10.03.06.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9540F8035AE7; Tue, 3 Oct 2023 06:27:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237343AbjJCN1R (ORCPT <rfc822;chrisfriedt@gmail.com> + 17 others); Tue, 3 Oct 2023 09:27:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235666AbjJCN04 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 09:26:56 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6561CCC; Tue, 3 Oct 2023 06:26:52 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.2.0) id 0c737ab238faee0f; Tue, 3 Oct 2023 15:26:50 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 532036659AF; Tue, 3 Oct 2023 15:26:50 +0200 (CEST) From: "Rafael J. Wysocki" <rjw@rjwysocki.net> To: Linux PM <linux-pm@vger.kernel.org> Cc: LKML <linux-kernel@vger.kernel.org>, Linux ACPI <linux-acpi@vger.kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Zhang Rui <rui.zhang@intel.com>, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, "Rafael J. Wysocki" <rafael@kernel.org> Subject: [PATCH v2 0/6] thermal: Improve iteration over trip points Date: Tue, 03 Oct 2023 15:15:51 +0200 Message-ID: <4846448.GXAFRqVoOG@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrfeeigdeifecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeegfffhudejlefhtdegffekteduhfethffhieettefhkeevgfdvgfefieekiefgheenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghn oheslhhinhgrrhhordhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:27:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778741071695150227 X-GMAIL-MSGID: 1778741071695150227 |
Series |
thermal: Improve iteration over trip points
|
|
Message
Rafael J. Wysocki
Oct. 3, 2023, 1:15 p.m. UTC
Hi All, This is a new version of https://lore.kernel.org/linux-acpi/4871671.31r3eYUQgx@kreacher which is being posted, because I've realized that the ACPI piece could be somewhat simpler. Namely, it is not really necessary to store the indices of active trip points in the ACPI thermal driver (so as to use them to invoke the appropriate ACPI methods), because they can be readily computed, but IMO it is better to make changes in more steps in order to use this observation. This is still true: It turns out that the notification-handling code in the ACPI thermal driver can be rearranged to iterate over trip points once, with the help of for_each_thermal_trip() called directly under the zone lock, so patch [1/6] adds a helper function for that. This time, however, more changes are made in order to use this new function in the ACPI thermal driver: * One function is relocated (so that the subsequent changes look cleaner) in patch [2/6]. * Two functions are merged into one (so as to prepare the code for the next change) in patch [3/4] * Patch [4/6] changes the ACPI thermal driver to use the function introduced in patch [1/6] and to reduce the number of trip point walks after a notification from the platform firmware from 2 to 1. Next, patch [5/6] drops thermal_zone_device_exec() that is not used any more and patch [6/6] changes the int340x thermal driver to also use the new helper to iterate over trip points, so it need not make risky assumptions regarding the core functionality. Please see the individual patch changelogs for details. Thanks!