Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp515773rdh; Wed, 7 Feb 2024 11:13:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVRQHy89hA7+eI6P3qT2ZX1zg37FQIMGI+wmRgVlSjbiV2Yri0e8fluGqnfW90obAVOzNt0uvfBXUMD7JoVn2/nisbumYz22nxQ3EpDDA== X-Google-Smtp-Source: AGHT+IFAFh1CoyxuQ/XBN5YUGxeyvBYKeqgT9VHIzG4TVYiz1S9NzTLiulaNl9lLbIgXUPozplqo X-Received: by 2002:a19:ac4b:0:b0:511:485d:6231 with SMTP id r11-20020a19ac4b000000b00511485d6231mr4228303lfc.30.1707333236827; Wed, 07 Feb 2024 11:13:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707333236; cv=pass; d=google.com; s=arc-20160816; b=aOspLj2A3IJsTF6ok5ISijy0KBZh+KKvrJV4Z8BTjOXH7peM3WD6so/lLGmSFhJchn Wwo9yN62ddlrO14oLxDIhNnvrg0p44II14t0HqmSUkYK0d++HylVeyOcX/FDauwonlE5 aUcCGkChjbwExQMIIxsvwIbBNR44wbSyP8QatBlFNua+fiNtMNTb71KPWUVjanBkNbD8 n9wvPE9+wpNq+8IE4BxOzCx22Jf9VASdpdZnOGx6gPcXz3xrmfeMYG2aMiNXgtz8qJN5 OgHiuSXYM3ksS3Jly6QvAyl3EO9XRnXVYcaS1+aOuz92R2NL8z66ff/NqtaWvbQLD4N8 /7kQ== 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=TZKVit15B0suGlPgkcLzzxHXqeQuP9KCC2TMwub5boM=; fh=j7/R1wCS7JdrusBn5Bm2791jsuCVbdM2Jg48hBIEXFE=; b=fUJgQBPKMN2sTgij+/F/LzAnHAk0Sv7FQwYYNwAEjvx+kvLcHkvV1GaAn4uSQLnEYj Ert8PVmPxHn1avYHYtoDpTxkiQzpQxNxm+nnm+HOYoTb6CrkiqzM3MPk9X/qQ27sMVW6 9dsKF3h/b8vM+OMzPCpsSSvUu3w5hoU+uXzI9jctYs61jb4uG2sYpcfHDwZP+U0wt1bu QIMx9E9FWe+kUN7lZKx5OwZ7GjsWmIwcxiIDS8xBuUaCvQ3FUjfxEBtmvnDIzSXc8eGW WRIa+UL2ABhVQNKaq70r1TPq4WkVst5vz67dvO2+GgVEnssfrjp1eXW1MWsCnpOrqsMc CvSQ==; 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-wireless+bounces-3308-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3308-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUwOZ+wR2U2xAAhhRT03ZHXN2QSCZ955gBO5X/JpIxQQhp6cuSMGN3FURlQavJiEn5vFFBu1l5DVR9h2TUwB7boZxlR3RBLGtyvWSKmHA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e11-20020a170906374b00b00a3849f53810si1202089ejc.29.2024.02.07.11.13.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 11:13:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3308-linux.lists.archive=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-wireless+bounces-3308-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3308-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 880B21F24288 for ; Wed, 7 Feb 2024 19:13:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4215A126F2A; Wed, 7 Feb 2024 19:13:02 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org 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 E9D9185954; Wed, 7 Feb 2024 19:12:58 +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=1707333182; cv=none; b=mXZaUPWeqoyVRPYy7RRGKDA3aVqAGHB6xcsGjgcvk13edL3mfUZdcrO7Y+vWWgqQJulqO8PzDFZDjfUHqFsJiKmuK+RqgXjtgWavAhS7Micfsn2d/mDUk68NWr9q6R8IjbcyQ3DoM7enQsKug9S2j39VLlH/tHE3A5qYHB33PRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707333182; c=relaxed/simple; bh=mrBbjhTnXeyV6fjV83s22Ro95nfA5WuWbc6HKUQTVrM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=j++aIRA9daJ1bsDfPA68OYEC1bLsCPPx+5gy0yQkToypzbl3iJN+mQ7dT2b8WTHwPX0NAgJ/E954uU4gprpuSjQeiSvyPIRQC5E5AaUTo5p+ZY8HF2TgyutT6uAv4+9e6PZpUcOvxJSsWIvhzHbXPm5f048tC3qXbS/9BDR4XgM= 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 f148895491a4f1fa; Wed, 7 Feb 2024 20:12:51 +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 B4C9D669B2E; Wed, 7 Feb 2024 20:12:50 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: Gregory Greenman , Miri Korenblit , Kalle Valo , Johannes Berg , linux-wireless@vger.kernel.org, LKML , Daniel Lezcano , Stanislaw Gruszka Subject: [PATCH v1 0/3] iwlwifi: mvm: Thermal management fixes Date: Wed, 07 Feb 2024 20:08:18 +0100 Message-ID: <1892445.tdWV9SEqCh@kreacher> Precedence: bulk X-Mailing-List: linux-wireless@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: gggruggvucftvghtrhhoucdtuddrgedvledrtddvgdduudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepgeffhfdujeelhfdtgeffkeetudfhtefhhfeiteethfekvefgvdfgfeeikeeigfehnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeelpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepghhrvghgohhrhidrghhrvggvnhhmrghnsehinhhtvghlrdgtohhmpdhrtghpthhtohepmhhirhhirghmrdhrrggthhgvlhdrkhhorhgvnhgslhhithesihhnthgvlhdrtghomhdprhgtphhtthhopehkvhgrlhhosehk vghrnhgvlhdrohhrghdprhgtphhtthhopehjohhhrghnnhgvshdrsggvrhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqfihirhgvlhgvshhssehvghgvrhdrkhgvrhhnvghlrdhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=9 Fuz1=9 Fuz2=9 Hi Everyone, There are a few thermal management shortcomings in the iwlwifi driver that are addressed by this series. First off, the fw_trips_index[] array field in struct iwl_mvm_thermal_device is only populated and never read, and the code populating it has problems, so patch [1/3] removes it. Second, iwl_mvm_thermal_zone_register() populates the trip table after passing it to thermal_zone_device_register_with_trips() which is too late, because it can get used before it is populated. It also may as well use THERMAL_TEMP_INVALID as the "invalid temperature" value. Both these issues are addressed by patch [2/3]. Finally, iwl_mvm_send_temp_report_ths_cmd() accesses the trip tables used during thermal zone registration directly in order to obtain the current trip point temperature values, which is not guaranteed to work in the future, because the core will store the trips information in its own copy of the trip table - see this patch series: https://lore.kernel.org/linux-pm/2728491.mvXUDI8C0e@kreacher/ If possible, I'd like to route the $subject series through the thermal tree, it is requisite for the above one. Thanks!