Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2551730rdb; Fri, 8 Dec 2023 11:21:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3tARZph8FVqjJIymSA2nI7B+GbwIt2+BI8SiST32P9XyVF6RltG5P24FMABho47dqCCD6 X-Received: by 2002:a17:902:e9c5:b0:1d0:6ffd:6e8d with SMTP id 5-20020a170902e9c500b001d06ffd6e8dmr488692plk.133.1702063272638; Fri, 08 Dec 2023 11:21:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702063272; cv=none; d=google.com; s=arc-20160816; b=FBCe2xmCs9Sz3apfI10J/ENPprX1UDrcquycKWpnFsARUQYfiwTR/OiBoFpie2UuuA WEjoIPySLrCTuMj4BJSRicDlNxLSc8SWRjEjLCqAsvjmb04gKZ+WeLYIvOz1jQHl8f/O iRNGls8cdciqLtYkGAbWGyEWzSy6U0Lrdg1g9Cnc6zLGLW3B6c+q/rLbHR5xfazZh/vX oJ0NKQf0f16ZzsKw1wLh6nQKz7HTupgVl0W7tSdflliEUdhmdFnXFchRDwB+pvEGpDdv uIRau27qKKlqobVS2YYeXOdjVl1/3FCSB7A6JJLxOv7jUWnrUSpD9BaeCqTGXzbRZKfp nn2g== 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=ND5kAFsONbrLFBBG7FBTn9sNePI0QE4tN0I6XY9//2c=; fh=PrtSuD01Zw+FPDhsRSNqLGqZbVeJkC2wpKMU0Il46xE=; b=g2mRdWLjFIH2HICtGaZWM7+0iAXMTr6OcOQFXWmlriYRxKw5zdOC3HSL6acHwbuvpN 2aQeQ9EBDKhxkZ0Pqm75DscLyKNBqbFEVk6Lx9vmpY180X4+l7aDI2OcTcAZbMsq4Shc R7i5+QsLhjZYAPG2UYxSrgsWdDOOK2lRm0A5ErEjm+MPGmR0gemU536rd2SIFJ9gmAln P7UDYmQK/sVjuaNRgynUNr5RysPs9yeyiGkqmetbt9Dpr1OZFl2fdq9ZiNrH6eV0A9re mYNh+LPfuMadUTV68yY4vMp7KWxMApieV0gGP8AvZMe6SIgfh1MB6gw9maYqVIeIebSf CEwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w21-20020a170902a71500b001d0087eecb6si1517607plq.389.2023.12.08.11.21.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 11:21:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 0C0AF81065B6; Fri, 8 Dec 2023 11:21:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574671AbjLHTUw (ORCPT + 99 others); Fri, 8 Dec 2023 14:20:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjLHTUk (ORCPT ); Fri, 8 Dec 2023 14:20:40 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D88EF10FA; Fri, 8 Dec 2023 11:20:46 -0800 (PST) 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.4.0) id 3ceef50cff98a7b6; Fri, 8 Dec 2023 20:20:45 +0100 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 cloudserver094114.home.pl (Postfix) with ESMTPSA id DD0AF6688FC; Fri, 8 Dec 2023 20:20:44 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: Srinivas Pandruvada , Daniel Lezcano , Zhang Rui , Linux ACPI , LKML , Lukasz Luba Subject: [PATCH v1 0/3] thermal: core: Remove thermal zones during unregistration Date: Fri, 08 Dec 2023 20:11:51 +0100 Message-ID: <1880915.tdWV9SEqCh@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: gggruggvucftvghtrhhoucdtuddrgedvkedrudekiedguddvhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeffffffkefgheehffelteeiveeffeevhfelteejvddvieejjeelvdeiheeuveeuffenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeejpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphht thhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 08 Dec 2023 11:21:10 -0800 (PST) Hi All, This patch series adds a mechanism to guarantee that thermal_zone_device_unregister() will not return until all of the active references to the thermal zone device object in question have been dropped and it has been deleted (patch [1/3]). This supersedes the approach used so far in which all thermal zone sysfs attribute callbacks check if the zone device is still registered under the zone lock, so as to return early if that is not the case, as it means that device_del() has been called for the thermal zone in question (and returned). It is not necessary to do that any more after patch [1/3], so patch [2/3] removes those checks from the code and drops zone locking that is not necessary any more either. Patch [3/3] uses the observation that the thermal subsystem does not need to check if a thermal zone device is registered at all, because it can use its own data to determine whether or not the thermal zone is going away and so it may not be worth updating it, for example. Please refer to the patch changelogs for details. The series depends on new thermal material in linux-next, but it should not substantially depend on any changes that have not made it into linux-next yet. Thanks!