Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp837736lqt; Fri, 19 Apr 2024 11:52:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzzPsKnjoYxHW3a3zUeMTmQ6EbdT1ehFmzbjiIO9MPxASHtgno6QtJLIcURMV9Se5pGfBy9Vb6JWgyE0tCdyZeb2Fe7T/kH6hKjKqO+g== X-Google-Smtp-Source: AGHT+IHwNYIvxfHmCoAmnqKgM6XRmU+5133e2xnEJ/Jc2pOCBqWzU+JrzsX10QQ4v+CJjYYoiSXj X-Received: by 2002:aca:2210:0:b0:3c7:443f:1ae7 with SMTP id b16-20020aca2210000000b003c7443f1ae7mr2665137oic.58.1713552752778; Fri, 19 Apr 2024 11:52:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713552752; cv=pass; d=google.com; s=arc-20160816; b=06EGFoLbyluG5NDWvRJlkj9RF13mH1d9qFQ6wzuxrVSboGwMXNaOy9HEjmSgOmR/HQ VyYflyXGGi0RATa6CQmlzGmO4uFEW4S0oqbAsLCyV4iVO1JzTOxJxA1JavgGRjlyon5P WrueHUC/7T/Q3A1t3APkKIJD4R6/V6hytm6iIrXhxegZkVAItWJDFoEgGR/qnMjgbHKR svPXSaMp+82+wT+g4zgL6ASl1v6UlRaB02Pk3P2FQghJEnLlo8ExqwKC2ysTXi/hzXq1 nI6kTmhEawc/vWv+/wUqpHNmGUo0UDV31cX7Ff8AIq5rDHO5nuGOsjRS/fK3ab48/3c+ Nt1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=bWWHW8yHkkN/79JNGE5c2JHaz8Zo2gc94HUrTwvjH/c=; fh=L6Hnm07BMLj8sa3YCg8bfB9Os3oGuokwqKcExN/SQLs=; b=IjSr3g45cJhfkrdw74nExGwceAD6VOhiF/OBxrBP8RliI1btNW0+TjvcJfwjTmBIsv GhDULqyjQkMcfKvhoHBeANLLiL48yuNrU1nAQGeUiGwZyV4F6jZEUkmzdIC9+MZepdCW qvEk0VV0xz6m7wVQapjnfxWchtLimyUhU7n0MvNGBKcUaIsY2vqZtaoHeuaZzH9QZ5bB aqcW2lmfyD73bR5AfeofzG0MMf679nDoKa20QopUJDeGuP6Re1C+gY0YmnCVM59bXdMg WOpCywSE2GSCsbcpjKSK+BIZlePeCPL7TyJGL4ortucN9thqlEONp8n0QwyieqC3KguJ PCBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-151885-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id vr19-20020a05620a55b300b0078d63cf9e51si4413311qkn.657.2024.04.19.11.52.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 11:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151885-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-151885-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 1D0101C21A7A for ; Fri, 19 Apr 2024 18:52:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8B12130AC9; Fri, 19 Apr 2024 18:52:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6F7E12D748; Fri, 19 Apr 2024 18:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713552734; cv=none; b=kxWtbGDklNmt6pjv6HDMv4z5eAOiL38nzoZy+pznTMVtW0RgG98QI4PpAq+cUEHp52NuOyYmb6Iy17/BuPAC7Z71IBPQhAul7+k4IPnS8dvyCJ1GAkSp6F7eLW6n6my5pFZIplJ3HySvrPs/Smw4ao7yTkIgVmXzUMUvywI7RPQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713552734; c=relaxed/simple; bh=LvzbHY6wjPzDhWTFvAMUoScyMQIzNkpOgmAl4nAWw1c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mDDrBsAgNnY7WfgQ9cej0nEocuYeG/a2dZQVkSuQstHhlVuIRp/TfDiBoxjtrD1KRyAMKYbkPoIUqBvkKnpb9POiRzFhfMqpZu3JQNPkR53zD625PxM+9HoDZBLBA08yhge9JIoZpmZ1fPBcUuHKZb60v3f3PeUCu4A+mtQyoZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6B8C8339; Fri, 19 Apr 2024 11:52:40 -0700 (PDT) Received: from [10.57.77.69] (unknown [10.57.77.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A4E23F64C; Fri, 19 Apr 2024 11:52:11 -0700 (PDT) Message-ID: Date: Fri, 19 Apr 2024 19:52:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 16/16] thermal: core: Relocate critical and hot trip handling To: "Rafael J. Wysocki" , Linux PM Cc: LKML , Daniel Lezcano , Srinivas Pandruvada References: <13515747.uLZWGnKmhe@kreacher> <9337957.rMLUfLXkoz@kreacher> Content-Language: en-US From: Lukasz Luba In-Reply-To: <9337957.rMLUfLXkoz@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/10/24 18:44, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > Subject: [PATCH v1] > > Modify handle_thermal_trip() to call handle_critical_trips() only after > finding that the trip temperature has been crossed on the way up and > remove the redundant temperature check from the latter. > > No intentional functional impact. > > Signed-off-by: Rafael J. Wysocki > --- > drivers/thermal/thermal_core.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > Index: linux-pm/drivers/thermal/thermal_core.c > =================================================================== > --- linux-pm.orig/drivers/thermal/thermal_core.c > +++ linux-pm/drivers/thermal/thermal_core.c > @@ -350,10 +350,6 @@ void thermal_zone_device_critical_reboot > static void handle_critical_trips(struct thermal_zone_device *tz, > const struct thermal_trip *trip) > { > - /* If we have not crossed the trip_temp, we do not care. */ > - if (trip->temperature <= 0 || tz->temperature < trip->temperature) > - return; > - > trace_thermal_zone_trip(tz, thermal_zone_trip_id(tz, trip), trip->type); > > if (trip->type == THERMAL_TRIP_CRITICAL) > @@ -405,10 +401,11 @@ static void handle_thermal_trip(struct t > list_add_tail(&td->notify_list_node, way_up_list); > td->notify_temp = trip->temperature; > td->threshold -= trip->hysteresis; > - } > > - if (trip->type == THERMAL_TRIP_CRITICAL || trip->type == THERMAL_TRIP_HOT) > - handle_critical_trips(tz, trip); > + if (trip->type == THERMAL_TRIP_CRITICAL || > + trip->type == THERMAL_TRIP_HOT) > + handle_critical_trips(tz, trip); > + } > } > > static void update_temperature(struct thermal_zone_device *tz) > > > Reviewed-by: Lukasz Luba