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: 19964 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1174597dyb; Mon, 5 Feb 2024 14:07:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKoJqBIjY598voJPiRirbKwtqXXItYqNtLXvGNPiZQ+pltHZE50p/4JZkssQTd7cJY2N8a X-Received: by 2002:a05:651c:1183:b0:2d0:a893:6a74 with SMTP id w3-20020a05651c118300b002d0a8936a74mr273592ljo.30.1707170874474; Mon, 05 Feb 2024 14:07:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707170874; cv=pass; d=google.com; s=arc-20160816; b=nMWZ000jtWFWKAH21OtxvRkr3Gh4PWDWKSJ2Xh3RwyvLPyVnz92dhXepAvpGMwE7BK +QmqlqAB8MNSemxgUugyMMyTqKgTAhLctfp18hhygjdu5mOtaCmscvxf8iQMsytof8wQ Bv77DeL0W5AwfvdcUuDduBX7mc4afVGGUxkqTzo2w0RHzkit5yb3tHPNT243HEEm1jQE PoE2989VUiqGE4UEugcx49tHUfycNKpn+EKP7Ih0vM3h/tjGs0A3VcQZWm22CTfkfZJc G9B/IC/591LIHD5waUeCW5W5Od5Hx0CQcKSODWSNGNcW5oErylPDdQE/t/NpKIXyQkWQ AaNg== 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=BeJZxqiVX4d39L8A3pJAx5jXnM+g3FPOMrHlj1yVnAw=; fh=/1J15WYgvZ5hl0v7W0A+tghkNLwZ/TJG58k66s2T5NY=; b=B7CAACOEpXdWVML5NuvMMtdapIJCchoWcJFxe02PRPjJ4c8Rhs7dStiidZh8wbe2Tz +ehJi/S//blQmAlaNJfNZBWtgvrsppJF0lRwRxNvHb+Pg8nEtUpSKelqzou+SRmH6isS GtW2D9dZzv8gMC3656TzrinDJyjb4YdmFVJvV4ASBNq8IL8hK5nYgv0EcFFBta0VpDdv kSf+9kYMnB/prQ3ukShQYKdlyuTBvUNlf5MUXvcqTd3oKs2c7rHnMGZizcIlzv9euoQZ QJh1VlF1LCfLSMg/T60l0q9QpTV0EKb1saKzrrzJj+2FgkpBN4YnfeZNqtawWtFGR7hH PfCA==; 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-53974-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53974-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUpzASKZPFnSoR+Fwe9vIEl5ei30ze6Qw3kjQqph2NGn2kLXEUNYRyEFfpilH+1y7Qnx6RpPHil2Ozb5zfjQjwGpJNZIA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dm19-20020a05640222d300b0055fc1ffced4si328084edb.545.2024.02.05.14.07.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 14:07:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53974-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-53974-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53974-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 122E41F25F8B for ; Mon, 5 Feb 2024 22:07:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D891354BC7; Mon, 5 Feb 2024 21:21:22 +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 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-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: gggruggvucftvghtrhhoucdtuddrgedvkedrfedvuddgheehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepledprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthht oheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=9 Fuz1=9 Fuz2=9 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790098407091960493 X-GMAIL-MSGID: 1790098407091960493 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!