Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8795157rwd; Tue, 20 Jun 2023 21:51:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Owru+PyibGLPAk71+eczpX4Br0t2VUmqJeAXl3rghfXhzq3yTOkienAX4cUOzdkUUfpDD X-Received: by 2002:a05:6359:c06:b0:131:e56:a7a2 with SMTP id gn6-20020a0563590c0600b001310e56a7a2mr870377rwb.26.1687323090486; Tue, 20 Jun 2023 21:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687323090; cv=none; d=google.com; s=arc-20160816; b=LSBbQlwRn74uZj4vWXlrJZFHGTC4H5ENrzPyLe3MQd9Z/aDG6EXVFV3m/o4i7eQU7W YIjFcUYbDTlZnAJc9VbeZAqiZgkMmfNpbQwFoM7wCLXxHUTE5DkMBXN15oHf7wr3L6XR RrB0xAS77z7BN39qE923iV+tzTPhzAvjzP9WKws1KrwhapThzIYa8evxI+qWMIGA9W7P vhs/zjalTAMcAL9Tf6qBKLkuu1G1dEcsDJPdAeEYH+Rt07Y59EHBv1F2eeknWIWmBVsZ joDKgXxsCWQ6DhDdvpJqSdbih9L2LvJGSAtK+lrKW/TRUq8IQD0ze7kfHroMVvlF23pE 7jbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RCuG+cOeBEFfXAg+oT7PZzBQqYuUTgHV8WdBLdGQiFE=; b=hol9YzVAHEeFO+KTfGvwmn4ow2XfKf/0GPpRQftIUqHC7V49k+M6ubwiAuWUNWTP5z huBRSQbYafhAt95t+aReTDs0B2uRMKu7erR+NDsivpEGTiphkyNBi2uZLG3QfVJeH16B 5Q1qfhj/jb0g34c2+BDscV8mt3vE7h2WuXE1MnI94eVgLs4GvGEftKmalNHO+HxnkVwf vRszM/mvR1T0C1fw55vJCClZZOvu0aJZ/EZsMsZ+rJPXSr+L3iJE9cKa7GQk6FRdT4bL gRfVp9qNFSWQUILyDNbp7lpdbA2Zc6Zz3Tli5AyAR39FDNPML21aAVFLDfSWU78V8Vsg XROg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LUcJ9ejp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020aa78885000000b0063286f81d35si229505pfe.262.2023.06.20.21.51.16; Tue, 20 Jun 2023 21:51:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LUcJ9ejp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229776AbjFUEtK (ORCPT + 99 others); Wed, 21 Jun 2023 00:49:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjFUEtH (ORCPT ); Wed, 21 Jun 2023 00:49:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEC99129; Tue, 20 Jun 2023 21:49:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 67F7361470; Wed, 21 Jun 2023 04:49:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 450A1C433C8; Wed, 21 Jun 2023 04:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687322945; bh=y6P2q6HkJrP6E+BmNyePqPuzpnfkzYRar4brXTlVguo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LUcJ9ejpSri1qvPY+/GTlfuzb6tmMOH2CfwaMMrrYECHO7HRP5yZ14Y8JBx2+EH/K CHbscO9s//W/C52JzxBqAUdYefzYz4c0Ol2D3jeX8QMc+KFlvUb6MEMSJnchVMwlhj D1KACC9dciMdfc6AHM/sU2HsnqiCoQVLQG4jYG2wmRPsMnPOvW57lpWH4OJ6Z7NJwt K2NPrJXp/tq8Uiokac+1w7BDg2DuOBhoZT4FFFlXP5wJPIgCHbc/6L63GnD/NHeXRD q8XVbjYAI16ieq0DXMJx1SO8ZdAcm9Lt+c8Sse8NdY7+6ooFU3ad2CCcO+TFkyJze6 TcWDDnSaG981Q== Date: Tue, 20 Jun 2023 21:49:03 -0700 From: Eduardo Valentin To: "Rafael J. Wysocki" Cc: Eduardo Valentin , eduval@amazon.com, linux-pm@vger.kernel.org, Daniel Lezcano , Amit Kucheria , Zhang Rui , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] ythermal: core: report errors to governors Message-ID: References: <20230519032719.2581689-1-evalenti@kernel.org> <20230519032719.2581689-7-evalenti@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 20, 2023 at 07:29:57PM +0200, Rafael J. Wysocki wrote: > > > > On Fri, May 19, 2023 at 5:27 AM Eduardo Valentin wrote: > > > > From: Eduardo Valentin > > > > Currently the thermal governors are not allowed to > > react on temperature error events as the thermal core > > skips the handling and logs an error on kernel buffer. > > This patch adds the opportunity to report the errors > > when they happen to governors. > > > > Now, if a governor wants to react on temperature read > > errors, they can implement the .check_error() callback. > > Explaining the use case for this would help a lot. Yeah I agree. I also did not send the full series and will also add the governor changes for this in the next patch series. The use case here is primarily when temperature reads can fail. Common use case, not limited to though, is an I2C device temperature sensor. While it can be, in many cases, reliable, it is not always guaranteed to have a successful temperature read. In fact, it is common to see a sporadic temperature read failure, followed by successful reads. This patch series will enhance the core to allow temperature update error communication to the governor so the governor can have the opportunity to act upon sensor failure. -- All the best, Eduardo Valentin