From patchwork Wed Feb 14 12:25:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 20371 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1187342dyb; Wed, 14 Feb 2024 04:52:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVr7aHZnq0exf0LhKU9CblhT8JDvszwYUfY1c4T5IaKHQuGc3iVYr3R7oGacLlnkl+gc/0nCPI+dfTwrdtI3g0YVIRUuw== X-Google-Smtp-Source: AGHT+IF0jdYERLsRJgU7un9jgx7nr3SDxo9JuP6XOqmDaMQndIrb0hWdW1OKwwqxVpUFPaeCLTXN X-Received: by 2002:a05:6214:319d:b0:68d:1634:1369 with SMTP id lb29-20020a056214319d00b0068d16341369mr3446734qvb.16.1707915121600; Wed, 14 Feb 2024 04:52:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707915121; cv=pass; d=google.com; s=arc-20160816; b=HNSYl0ds5mL+3QUCmrQsu/FGuhQS/1EIJ6J3buiiQZCvYD9RRahZ39JMGw0GdIdhma zFMUj/RYMA8ljGSSk10SJHOtxALvclrSQLRMEKazb/bZ8mFL3CECr+RUBMFElbnNGQjH xv+tC9GYB5fcG7DkK0RhvG3i97nzqjuBA5g2JKT4+JX6KsGY+mOvqUZwePAkajFZd/ap cYbNgAbjiktmSr3oP+W4c2SZLBnavhPnv/0+BXpvEJwx5fAD2zzXFquONq9H7cXEBsjM zV3hEHtorL9y7emQx7ln9djUeexNRDbXffAss9yuzNeTB6AHC734FSb8iYvMpFy8Mu3t LpMg== 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=HMu4xOHsY9U5X4f96lSLXahH9ZJfhxFVZrc2Fo8iPb8=; b=eg0jQ4P627AQSPFthdwpK86zv94hiLvUc2p0XzyUZt1R4Cfk2S5qdv/V08ltr/HpDw rpODRuDgVOu2ld6kC2wOzg3VrXJRA2gBiQRRd1TtUFNheqCLiKLsf6fwm5CrU9+qn/es 9yR2OW2fPZXAaHI2PYh4RUizskWITPECDCQfhH4tr70cmdujMg3S0XeDMOEPo2xQ6Cha /W/lyDIVrmPct2cbXuMdcEkHMO4nEK49OmiaelW6TXENxArfWe7Z+NKuBjQnF6A6N0vN 6b0c9oOIaJwzvys4538J0bz9Sf9gagHxH2V/qtuEba9NeVea+lgEzPfvjK5TPuLt1NBQ PQsA==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65217-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXWj09l1A8vPdibIPNSzFn8QmrnQwWlRtR7tZJHjPMzuxI1oOdwd4XjiDPwek2lrhxrJi23wu0P6sl+v1BI8gGYlgY9BQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id iv2-20020ad45ce2000000b0068c4ee6bb81si139377qvb.61.2024.02.14.04.52.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 04:52:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65217-ouuuleilei=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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65217-ouuuleilei=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 2D2A21C2140F for ; Wed, 14 Feb 2024 12:52:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2386754FA0; Wed, 14 Feb 2024 12:50:11 +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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790878806207713193 X-GMAIL-MSGID: 1790878806207713193 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! Acked-by: Daniel Lezcano