Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp103083lqb; Tue, 28 May 2024 09:57:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUd+nKq1Tkp4eHcQP5rEwxJz5A2OP28We2G9uPc9/ZPwkBrAjC89RzFG7ji4AAs7cDP9SHy0bLbdj0EsTBkwd/kaRsTD+ZyRxpEtR5Auw== X-Google-Smtp-Source: AGHT+IGPXm0DAr9VjZAsln7DMYSz8c2XEgDGvVSq11sw8oQWhNswZBNWx4Y25mkoXXYV0EBkpweC X-Received: by 2002:a17:90a:fe8b:b0:2c0:76b:f46c with SMTP id 98e67ed59e1d1-2c0076bf531mr2464844a91.3.1716915476690; Tue, 28 May 2024 09:57:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716915476; cv=pass; d=google.com; s=arc-20160816; b=y+TEeeLe/E2SfKiGM2mXiE9CLHH8jpjqzU/64kdPdTUVahsCkMFN+kiSaQXTLOUHQV zgklqsScXKoKqkAhLxn7DEaaTBFpGksshswQdDLenSLE9pg5l+OKyaarUiW870XqKuaV u1/N8ckAoV2ZLSzBFCDgBgtG/gpGAfgxujnTspfy8WxkfC3xBO4Ai9rtDIcScrTeL2j3 9FG09FsEBKLWtiCjxTODVU0A2IQzb/KYa77a4ny2FsVkkyOQRfC0FLjEHKX70j5xhccO H5BSEJRBJH2yncusmXBmy0zMLubFS1vF70F0ZSrWmuniGd+4wLZEhCYTO7e9h4OWtJJ/ 0UsA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=RfgJU37cMXeNnP85IGdD9axouE+T2R0o54426mJyCxs=; fh=GzCkp9dboMjnsRASvUnR8RkBPyyMxU6lLzxcgnbmqi0=; b=wQBwsEkq8SY9QH2Go68EZ4t6pJV45/+UG+3MYNELh60qMYBY2GCma05SpZW6GoDWrM VK3b8IGMCzlpp88bUYTqgoVeUvRRvZaxVclBoWBa2RNQEX214uDg0XQgEnELsHJyizzH D9RYMTr1EtlmsqYLf7idImHaow4CbF3ibWecXXPD6KvUUE4gYXUY9HCrkDaU9hd0rC7B TZ55KPbUMyoQehuKlJJsnU7zNcUmSOy/m9IjQEy506SrHZvQ71+Xm4MStb/nDu1aXpti Boo5iWuN6dcfBEKimrYLhvIkS1vUysL/Qcumafwj3TNn3R+AUZsHUbPVK9PAx57/5Hpk y4wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@rjwysocki.net header.s=dkim header.b=YJH4dREI; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-192779-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192779-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bf73ce5583si7408178a91.150.2024.05.28.09.57.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 09:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192779-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=fail header.i=@rjwysocki.net header.s=dkim header.b=YJH4dREI; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-192779-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192779-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E504AB244ED for ; Tue, 28 May 2024 16:54:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FCD2173343; Tue, 28 May 2024 16:54:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="YJH4dREI" 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 7A2AA171E44; Tue, 28 May 2024 16:54:21 +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=1716915264; cv=none; b=RZP6Jvz/2q23p2juERjhHkL03p4obP7DBGD88s3GjwVzgLk/8V5aPPNabSOMg3TiZ4hLQG7aSl7DVrTWg3xRKimFuEOtKR5gPdz873tgjQFnYqRtKlx/0j2/bqMx6OY/o70C9th51VW5bVU3+X874Zy317cwj2yqQ1J2V5qeqa8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716915264; c=relaxed/simple; bh=vn9XxyYsOXd3b8Z5/62CmIgn6KJhgsWt9QkmG3kKn8c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=S7+piFPNT+tj4SazaNyGryiR0VWEeNWfZvIt7ssm3XnvjcafRvzgjTA7tVPzI9InbtQff1lwysStC1QM39UpwvbjYmznsZ1aS8C/e80H9s7kCn2dW2pAH4Bg4Fr7wqpYq5d8v2hOX0E536tSW5HTPT5PunYGzust8nyHobH3kks= 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; dkim=fail (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=YJH4dREI reason="signature verification failed"; 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 6.1.0) id f373c1def34ea047; Tue, 28 May 2024 18:54:20 +0200 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 718306A5036; Tue, 28 May 2024 18:54:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1716915259; bh=vn9XxyYsOXd3b8Z5/62CmIgn6KJhgsWt9QkmG3kKn8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YJH4dREI8/Vr8uo1uwGWWHDErIuzLs2mdWD56iPWcETlbRPWL2Nxwpd/gTaUu6bvd jlFCtHivPCgzBRe2YRDU5LU2vi01FWKPiZ1fI3xG6H3wjROiueyepojkLXNgd/qm+s w7692MnIvi1pAIqsgvub12lBW4Y9zYVwC/RnHbe65mNbeOT6JfpAe1or9P3bDlmVmF w9fXNzHUXgz79EHQkAubVNgFYhl5VFEMvqKUPBF12OV91OhW25Gp6MJkY5GSflnRUT vKRFHmY2J0KJagmGdZrH+DdGGfEoz9SSJevLeCxMv+PM3zf8cNK1Z8FLZDAocf+oZt lGwOrG9RcjsMQ== From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , "Rafael J. Wysocki" , Lukasz Luba , Daniel Lezcano , Srinivas Pandruvada , Zhang Rui Subject: [PATCH v2 5/5] thermal: core: Avoid calling .trip_crossed() for critical and hot trips Date: Tue, 28 May 2024 18:54:11 +0200 Message-ID: <8392684.T7Z3S40VBb@kreacher> In-Reply-To: <12458899.O9o76ZdvQC@kreacher> References: <12458899.O9o76ZdvQC@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@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: gggruggvucftvghtrhhoucdtuddrgedvledrvdejkedgjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrrghfrggvlheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopegurghnihgvlhdrlhgviigt rghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 From: Rafael J. Wysocki Invoking the governor .trip_crossed() callback for critical and hot trips is pointless because they are handled directly by the core, so make thermal_governor_trip_crossed() avoid doing that. Signed-off-by: Rafael J. Wysocki --- v1 -> v2: Rebase. --- drivers/thermal/thermal_core.c | 3 +++ 1 file changed, 3 insertions(+) Index: linux-pm/drivers/thermal/thermal_core.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.c +++ linux-pm/drivers/thermal/thermal_core.c @@ -463,6 +463,9 @@ static void thermal_governor_trip_crosse const struct thermal_trip *trip, bool crossed_up) { + if (trip->type == THERMAL_TRIP_HOT || trip->type == THERMAL_TRIP_CRITICAL) + return; + if (governor->trip_crossed) governor->trip_crossed(tz, trip, crossed_up); }