From patchwork Wed Feb 7 19:08:18 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: 20069 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2450049dyb; Wed, 7 Feb 2024 11:14:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX3YszP98Y7AWwOFoDp088Uif4DM2UUT7nKJ3fngyd1hRlHfwtqvP7543u9kZSJIcvg3vXPnnBvcp7mreat6JYayOI4/A== X-Google-Smtp-Source: AGHT+IE/7vPtKe+jW9oVpe4T4Dr8ajUX1TyUxrKBCP6y1PTn4VL0c4sctPGr2pnEP9en2+ZTSfv9 X-Received: by 2002:ac8:7f48:0:b0:42c:2494:7fd6 with SMTP id g8-20020ac87f48000000b0042c24947fd6mr7607763qtk.37.1707333255080; Wed, 07 Feb 2024 11:14:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707333255; cv=pass; d=google.com; s=arc-20160816; b=i6hzk2PUyqOI5CEL163JCg4FtaBxwHBtEsXQoVSjw4b+h6YBxvXvhpLifwIZRkLUVK j83SgK4Afr9qThx5Wex5w0IVMqFcul8J+YJ95dcGgie9D3788Uw09vXT08WoZCgcZd6V iswr5kjWPDuIYrXhkQ6DtovBeDEsQMqQAHjOMbpsVWM+f4qmsAd7bJD51ft4mbxhPVNv bcP6nBDFgu/RFM+lSF2jGtEms1miMzUZgs2BxGjMhDyQFSkgMCdzJr+r1BzkNzlEBVCl QPGsQGh3THZbf+6922Dkbm3GWqxyqJXJMt7xo08jVI0o2SLFt/CiWMImhou5QLp/GofQ Errw== 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=IF3B2M//Kh3OCDePj+0Zte6bFafk2xWDo7NFnAZ7QR4=; b=RAJwULY2DF7cq3rYYd8MKKFYOFDmhToAcNv4jGkpsy6neSY7lJf0MERT0JNlgL/WJg k58pzmVigtXLBBjjmiE8Bfi44sUrrESWsgLU10tz/iFe3vHjQK9S/PqIU74Cho6v6uHt hVnXCmt9Rq4cq7a3sIUpUvlxXGhdojVtQyYlPwvon+agdFrGHBhgHjCnSGd/QmkJWnJV Um3q/rcasXF78QLiXo9ql9iI2VTtTp503JpUag+irMgOssEThaNdlao5FoBi3yxeWGWD p/Je4ocKM3mx17Lhzc7WRjhxR0S7oflHqrVzmixLkqHNhT9SpAw2kJJrPlMtOjwO92IK 5bhA==; 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-56977-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56977-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCX6vL3252jP77Jj1h1KhHR4PsJsh03GLGcraeI25C8xF+N1KAZOmI/05/do3gfqojphgFYC+nztMLebWgFfzcj5OBsApw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j5-20020ac85f85000000b0042c2619f780si1794557qta.502.2024.02.07.11.14.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 11:14:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56977-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-56977-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56977-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 B3DA41C22A44 for ; Wed, 7 Feb 2024 19:14:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5854127B4C; Wed, 7 Feb 2024 19:13:03 +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 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-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: gggruggvucftvghtrhhoucdtuddrgedvledrtddvgdduudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepgeffhfdujeelhfdtgeffkeetudfhtefhhfeiteethfekvefgvdfgfeeikeeigfehnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeelpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepghhrvghgohhrhidrghhrvggvnhhmrghnsehinhhtvghlrdgtohhmpdhrtghpthhtohepmhhirhhirghmrdhrrggthhgvlhdrkhhorhgvnhgslhhithesihhnthgvlhdrtghomhdprhgtphhtthhopehkvhgrlhhosehk vghrnhgvlhdrohhrghdprhgtphhtthhopehjohhhrghnnhgvshdrsggvrhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqfihirhgvlhgvshhssehvghgvrhdrkhgvrhhnvghlrdhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=9 Fuz1=9 Fuz2=9 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790268674923213496 X-GMAIL-MSGID: 1790268674923213496 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! Acked-by: Miri Korenblit