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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 378A6C61DA4 for ; Thu, 2 Feb 2023 20:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233088AbjBBUyr (ORCPT ); Thu, 2 Feb 2023 15:54:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232500AbjBBUyo (ORCPT ); Thu, 2 Feb 2023 15:54:44 -0500 Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8025E820D9 for ; Thu, 2 Feb 2023 12:54:41 -0800 (PST) Received: by mail-vk1-xa2d.google.com with SMTP id i38so1565738vkd.0 for ; Thu, 02 Feb 2023 12:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=v5EQvloJ9CpdHZjfadgqWrDLzLydTeMlPjVvp1vgvMA=; b=QJoOIXxEb/sQrUTYQ6QfhIamMl4W35y/1RrelnQLl7cXtxwFglFcxnxS6n7d2JTE+q nZPbcT4vAdYOL19XHSDzrOyzRnsYoFRhI5JvKe31jBHExFzkHXmH/N2DcyltPvLuCbnB vnvRdaXk3n+xfSG8wkrmeMrVvTE/zTQMS5XC0u46sSGGGPTQdlBFH9/uHmvEDStKZwZf m1f4Zfh7pflNf+vsbh9RICPCUifVq4n+/cDro984zH/2vyxqPW1esllqXWbcTYngll93 9ThPSxwcjxa3ezgePioMl7XbOKYq8m7v4xDOwqYkCQpzrnhWBd7D8c6r3LCejxQbrh3t B5/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v5EQvloJ9CpdHZjfadgqWrDLzLydTeMlPjVvp1vgvMA=; b=iMQUepIfs4YV8JtQTnL4YA1rtn+S3Tm8SIwajaKLWbqe7apVX6CvwvbHolY0TFn0ml lzX/c/ImQ0hGrB5ijWxfy8YN0oQUtXAq1FDjpezxRut6MuZxhtJDvNm3w98fGc5J6Mth c+JlUPAybqp0LAC3dEmE+JFd+rfEtz0bvKyYBsKym29c6JeHVK42JZV5gZx8FijNd2bi kFEPjI5ryh6lBjbwTg0AVZU3BG0xnf290rVJqK9acb8I7+O1Ow2C1dN4OUOd3XETDQ30 bIMIiPz8pYJ9ShcEIYv8M5ESZA2Jf6ck4+ME+FiuXOEVSmXv3w0w4uJN8UFX4qwLuhkp 0OXg== X-Gm-Message-State: AO0yUKWxetBqf2nAjyHFmDpejqsvgmj6S7hOLvuYuA0HPwBF1BQWelwh 8Jz/wJR33elsdHYWaXcDBXKRn8XXcjq5CeFDu9xi X-Google-Smtp-Source: AK7set8Vo0d8OHsOn0nyqDdpPp7uFKPSYXZLIFKMmBYS9Vbdh+E8ONBZWaZO9FQKeWyegfll2tOqabWyBTxxvWx/esc= X-Received: by 2002:a05:6122:792:b0:3ea:704:c196 with SMTP id k18-20020a056122079200b003ea0704c196mr1167056vkr.11.1675371280470; Thu, 02 Feb 2023 12:54:40 -0800 (PST) MIME-Version: 1.0 References: <417c4e3a-6fa8-5210-dd27-669a5d9e255c@arm.com> <20230127231001.1920947-1-yabinc@google.com> In-Reply-To: From: Yabin Cui Date: Thu, 2 Feb 2023 12:54:29 -0800 Message-ID: Subject: Re: [PATCH v2] coresight: tmc: Don't enable TMC when it's not ready. To: Suzuki K Poulose Cc: Mike Leach , Mathieu Poirier , Leo Yan , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > There is a similar unprepare function in ETR - this should have similar updates. Thanks for reminding me! I will update the patch to fix it. > > The tmc_flush_and_stop() function also calls tmc_wait_for_tmcready(). > > I think this already an error message there, when it fails to complete > the flush.I thought of adding a WARN_ON, but thought it is not worth much. I can see error messages when tmc flush timeouts or tmcready timeouts. I don't know how the callers (read_buffer and disable) can handle this error. I think the perf event call chain doesn't accept failures when disabling coresight devices. So I feel reporting the error is the best effort we can do. Thanks, Yabin