From patchwork Mon Feb 5 21:12:33 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: 770526 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 D4E8A5026A; Mon, 5 Feb 2024 21:21:18 +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=1707168081; cv=none; b=VuR3E8J3ajtXz1lEAIvpXknye+HnvzVlYVYIvJJ9801PUbalt81JPc35zNcgtHo+4DqSgRUEVf4/QdjbKFU/728YnqE32j3rDVDyaKSoflYYNQlJ7lXv9AiueaARX9LgF21D7HuFF9pTS+kzGDq3rQNdGtN3LIjgznmzQvFw2T0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707168081; c=relaxed/simple; bh=HVGgXslPQ6bGCCMvRaK9fSD472mb6+oVdz6RewVdO8k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=s/ghCTMC9Ily4JmlLgAVQq+gv81cVQWwMwYHR/43jXZQsw+JwO9eZzbJ4qLju3Mmeniax+v4HvOcByOd1+jxkB+zvSvDkttOJBRGZyV6iVEMDUqFtb76xHJNR5UztSmvN0vrUVm6wsnKEV2KTMpqBJCP0qQh8EaKcv4o+zG5q+4= 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 faa7787fa9156fb3; Mon, 5 Feb 2024 22:21:11 +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 83860669A1B; Mon, 5 Feb 2024 22:21:10 +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 Subject: [PATCH v1 0/6] thermal: Store trips table and ops in thermal_zone_device Date: Mon, 05 Feb 2024 22:12:33 +0100 Message-ID: <2728491.mvXUDI8C0e@kreacher> Precedence: bulk X-Mailing-List: linux-pm@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: gggruggvucftvghtrhhoucdtuddrgedvkedrfedvuddgheehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepledprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=9 Fuz1=9 Fuz2=9 Hi Everyone, 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. Thanks!