From patchwork Mon Oct 2 17:58:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 14819 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1612536vqb; Mon, 2 Oct 2023 11:27:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHswbJUtCvFb/rmoMG3RX/lJyx/5bhcnj70IyJERFVWpWx6r7G+3qIYeU78oST1QnGNComh X-Received: by 2002:a05:6a20:3c8e:b0:13f:9cee:ff42 with SMTP id b14-20020a056a203c8e00b0013f9ceeff42mr15774942pzj.41.1696271246137; Mon, 02 Oct 2023 11:27:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696271246; cv=none; d=google.com; s=arc-20160816; b=A4K1JUqD8+fHOYoPaK/UlFNMVFebm5buNUQwQw8SNEUAS6zZffn3xLM+5Hj5pDpxft XA4L+9uGHwO8PRNn2MciMhQn6dxi7PZJBKN/0PfbAHZB3Bo+a1kc+Tzh38DslaPciqSe KpNXjC/6lMUiJ0eISOYg/H8Z9fVN2R/G0CEuOI7bGzkd8tENGEhnNb9wuHW3CDGERpy5 g2hqSkw2uH/CXDU+2aRqrBmzhGOGmu4uG2jj2JrcUIJ8VjO90kntGwwbMhBO769feywx bkp7KDuIsE6a1itHBnEEV57Py3rkRziMBtKvwbDY8i62kKGfjXTveXYTiKOYzOPHL5Oj TLnA== 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=zDFq+cqQDk6Y7P1MGxbllgLtCnp+Q9JH1i292SIqL5U=; fh=99EXAs+vKBd0HJG3OZyygM2izuzSBDrYNgeLDvqQNA4=; b=ZShWuqLZniG+cvprhkMlc1LHPjhQ8YJ5VXElF5w1n5qzUnmo37VRg63MeVCl0jt7Y9 9BNx0swrw45ohLzcWiX6Im79TOVLDqckjXstrb3EnBQ4WiOWTcWvXvZQID12NNYjJ/se EjL+Iwk3P0wqAB5fedkUGum/sNTIzfAIGnejoK0SRBeKHdxAujrHB0rqagLHAH9EPZsS gpok+GZFEZ2zPhcyARvaAkfY5fhYkPgSAJmnfsxOqZn3MvS+hzXwFB/3SmZ9yzlyz2Oi wg8yBADGfPE+T13CV/psxd6UK82bsjcIuUqxn9CLjhY/G/30bQzQcKi+GK4Xo135tHwK 5mAA== 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 Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bv64-20020a632e43000000b00578666614f1si28168891pgb.63.2023.10.02.11.27.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 11:27:26 -0700 (PDT) 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5DCAB80236C1; Mon, 2 Oct 2023 11:04:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238754AbjJBSET (ORCPT + 18 others); Mon, 2 Oct 2023 14:04:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238720AbjJBSEK (ORCPT ); Mon, 2 Oct 2023 14:04:10 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5135FDA; Mon, 2 Oct 2023 11:04:07 -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 af39c7079f2a98ab; Mon, 2 Oct 2023 20:04:05 +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 51AB66658DF; Mon, 2 Oct 2023 20:04:05 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Linux ACPI , Daniel Lezcano , Zhang Rui , Srinivas Pandruvada , "Rafael J. Wysocki" Subject: [PATCH v1 0/4] thermal: Improve iteration over trip points Date: Mon, 02 Oct 2023 19:58:11 +0200 Message-ID: <4871671.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelgdduvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthht oheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhm 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 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]); Mon, 02 Oct 2023 11:04:45 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778669317994016607 X-GMAIL-MSGID: 1778669317994016607 Hi All, 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/4] adds a helper function for that and patch [2/4] changes the ACPI thermal driver in accordance with this observation. Next, patch [3/4] drops thermal_zone_device_exec() that is not used any more and patch [4/4] 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. Thanks!