From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFB42C46467 for ; Mon, 16 Jan 2023 14:03:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9E66F56E0; Mon, 16 Jan 2023 15:02:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9E66F56E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1673877802; bh=4h4KUC5FpuOyk6IZUK3W1vwu6OuiMUrZWu9qOR0sw4s=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=bzbxhbJjP2gAiJwizdlPOb/cVBTJkaonY+XBoRrGatAZbMgX6LzzTE1FbuDkFdJbG 2OnHW+47k8KInKJnd7vs3knUMLofvwk6vTSYODoAtsDLNLvoFH8eg7RG+F57CV4JcT U1gtcYBDud/GWLPTJ5BnqsmlobX8eSVntJr7Oa6M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 198E9F80551; Mon, 16 Jan 2023 15:02:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B955FF80542; Mon, 16 Jan 2023 15:02:12 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 121B5F80240; Mon, 16 Jan 2023 15:02:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 121B5F80240 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ljQKFWxM Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7BC8A60FD1; Mon, 16 Jan 2023 14:02:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80EF4C43392; Mon, 16 Jan 2023 14:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673877722; bh=4h4KUC5FpuOyk6IZUK3W1vwu6OuiMUrZWu9qOR0sw4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ljQKFWxMIQgs8HojcaGKkMlvjXiaPBQ7NO37bVra0z3vxkc/knhw9c7eJdRXvrLcJ FRobung3tvjcwKIkYhdEXeZh+QaZIKj3lHZaTqQG7Gp/HylEbIS4EfCYS+AZUOnuX1 Q63cnGEvQKfBuT7jcCueQ70uxfwLjwmHscBDo7TntuMO6oSWRr4mD8853gaRhIMMJc rVldQ7UcDyp+250r5iDIfPc6QeHevUd44h+axUfB9/yb6GRbkwVPFgmlNxPIUa4g/y r7M7Sav4P8XLTuEULIea2Pcx7YxNSAST2dEGbyupIKG3MY9K3xZE98epFGIlVrCl5q WShhxuoP7XGmA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 04/53] ASoC: SOF: Add FW state to debugfs Date: Mon, 16 Jan 2023 09:01:04 -0500 Message-Id: <20230116140154.114951-4-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230116140154.114951-1-sashal@kernel.org> References: <20230116140154.114951-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , alsa-devel@alsa-project.org, lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com, tiwai@suse.com, Ranjani Sridharan , daniel.baluta@nxp.com, Pierre-Louis Bossart , Mark Brown , Curtis Malainey , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , sound-open-firmware@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Curtis Malainey [ Upstream commit 9a9134fd56f6ba614ff7b2b3b0bac0bf1d0dc0c9 ] Allow system health detection mechanisms to check the FW state, this will allow them to check if the FW is in its "crashed" state going forward to help automatically diagnose driver state. Signed-off-by: Curtis Malainey Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221220125629.8469-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sof/debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index d9a3ce7b69e1..ade0507328af 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -353,7 +353,9 @@ int snd_sof_dbg_init(struct snd_sof_dev *sdev) return err; } - return 0; + return snd_sof_debugfs_buf_item(sdev, &sdev->fw_state, + sizeof(sdev->fw_state), + "fw_state", 0444); } EXPORT_SYMBOL_GPL(snd_sof_dbg_init); -- 2.35.1