Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp542450rdh; Wed, 14 Feb 2024 04:51:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUGDawYcUw4f5g/xXQI0Cvm6+tbXJyhFivXCp+n01BmzYnS3bmuLnyBBAJFWzYN/qUhddDRxmZ5Vy1u5MthwdXYg5i7niKpQzM6gfNJTQ== X-Google-Smtp-Source: AGHT+IGwjATMgBFObrkfu5YDj488R8wAzK7It+SQh1Dqjhv58TkenvV7OY90Try8iYzZQKr7SnOL X-Received: by 2002:a05:622a:11d2:b0:42c:66b7:de02 with SMTP id n18-20020a05622a11d200b0042c66b7de02mr3042847qtk.24.1707915100753; Wed, 14 Feb 2024 04:51:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707915100; cv=pass; d=google.com; s=arc-20160816; b=oAYVm5ieLUnNtJlVUg6+irYDvmYQw7OQbuArBERRKdeC2gKGg7Q/F0AXA/rGIbzP7z Lb/qkREqOeyYZkPkYLI/7a/FATuEJ3iwJNe0Fkc2ZbPOe2Q2AFD8NdEdyRCP+X9QfKGE /RbvtOmBIzWqpU59xrax/2+wP9f0KOdCzLp4si3DmRpQWmV2NXFxSOnqjkiMikaysJ0w jeqQWaaCvkG0a5qZEa8zkKphxJyW4aUaCbOebStlp+A9r/cfmPE/9nki8RLiqov2nYpA ZFi+TXfgW7o7v11iq2ErgjglIdVJ09P5raliF8HmdPYFmJDEwbif0/oO1G2pKeYKj2Pv UdbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=qkcX7GAJKvWw9UvDCbkQDOQwj5z9zTsv2GXrL4UNPe8=; fh=RkYt3eI/aSYuomGjdq88WXjj8h3dPEMcauv71us2Qt8=; b=FckBeNtXREKl/8QdH7y5sp4sZThjaj5DgxwltBRnNgRWwu3NLRPQBkoKNGxMydZbj1 6BtAojYMSIzwcHdVLt7BpiV66mseXMOaN1ZYafTXm70RkA2qDMUPb9tYTleQrHRbTksu mnydbJCz1uqaO5axbnavkrTaObhUFU1LRDMNh93AHu4GgOpOKWGa0Ecl6U1nWt5H126N ruFMvI0YGxzTb/9jOO7tonO9jJRN01z3h7SFDIcNwNcKpFL82EcwnkyUdrrvg3YqEhG+ S/NCBUlNRjdr0+WVFnykySf7GJZufSc/unLgt631IoAKyPz8TTsu3RFlehzbrkshdXpA A8Aw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-65217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65217-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXaY4yPKfmHIr289qnHkkwP7bAKtAEhjKXHlUKGCke2zhyjlSARchQQl79THaQfkh+vvsZquCB6gqcaOZRb+SvKVsNNxFSXvQxusVEsTw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b13-20020ac844cd000000b0042c73f02782si4972169qto.75.2024.02.14.04.51.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 04:51:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-65217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65217-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 819221C21D83 for ; Wed, 14 Feb 2024 12:51:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F45E54BDE; Wed, 14 Feb 2024 12:50:10 +0000 (UTC) Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C936535B4; Wed, 14 Feb 2024 12:50:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707915009; cv=none; b=U2jK7zzm0Fw9xg5MTFMmcnjR8DuVObFzsHDM67O5PXi63+d/iscKzzrR6Ou0dpX/5Cp/iaozYcvro+n774MopqzJXGDovqjI+g71junVBOttLhAo4IKxWK665uSHu07hc63RjyYnxmX8kmYT7IdlTjmUY9FWSijEHda6RBCfhGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707915009; c=relaxed/simple; bh=E01dX0hF3D+HtqydAJ3tYA9NLjs5Y6+afi+6TvtZ2Bc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uOUsbV+LDgCT0cgy8fExZ6Na0vr8UBwkdmemB2MTVu+yr/BIWarCmNxi09dLv8mAklVSGTo7H4dfH9KSh5Z7I8//1Kiwte5O5OJ8QWx9gSgLWSg+ynPSmzcRTMmTcgqHSQmkpp4Es8/8qrUHOdvczPpoiSxuUTnQruIM+nesgwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net 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 e7bea7f855a21fc7; Wed, 14 Feb 2024 13:49:59 +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 A6B8C669DB7; Wed, 14 Feb 2024 13:49:58 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: Daniel Lezcano , LKML , Linux ACPI , Lukasz Luba , Zhang Rui , Srinivas Pandruvada , Stanislaw Gruszka , AngeloGioacchino Del Regno , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v2 0/6] thermal: Store trips table and ops in thermal_zone_device Date: Wed, 14 Feb 2024 13:25:25 +0100 Message-ID: <4551531.LvFx2qVVIh@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: gggruggvucftvghtrhhoucdtuddrgedvledrudejgdeghecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeegfffhudejlefhtdegffekteduhfethffhieettefhkeevgfdvgfefieekiefgheenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepudegpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhg vghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehluhhkrghsiidrlhhusggrsegrrhhmrdgtohhmpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=14 Fuz1=14 Fuz2=14 Hi Everyone, This is an update of https://lore.kernel.org/linux-pm/2728491.mvXUDI8C0e@kreacher/ that has been rebased on top of https://lore.kernel.org/linux-pm/6017196.lOV4Wx5bFT@kreacher/ and includes some bug fixes. The original series description still applies: "This series changes the PM core to copy the trips and zone ops directly into struct thermal_zone_device so as to allow the callers of the zone registration function to discard their own copies of those things after zone registration and/or possibly allocate them as read-only. The first patch makes the thermal core create a copy of the trips table which is declared as a flex array to enable additional bounds checking on it. The next two patches update the ACPI thermal driver and Intel thermal drivers to take benefit of that change. In a similar pattern, patch [4/6] makes the thermal core create an internal copy of the zone ops supplied by the zone creator, so as to allow the original ops structure to be discarded after zone registration or allocated as read-only, and the next two patches update the ACPI thermal driver and Intel thermal drivers to actually do that. The other thermal drivers need not be changed, although in principle they may be simplified a bit too in the future. As usual, please refer to the individual patch changelogs for details." However, the imx thermal driver is modified by patch [1/6], because it uses its local trips table and expects it to contain the current passive trip temperature value (as set via sysfs), and the thermal_of driver is modified by patch [4/6], because it uses the ops pointer from the thermal zone device to free the ops. Thanks!