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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 35D40C3ABA9 for ; Wed, 30 Apr 2025 13:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=N6NbxkgJwSpz8OS3sV20Kt0uXRR9XFEj7Tcmx/PecEc=; b=szN0lLGRc63OZuiw8gCJizz6xV dKA3VexHAcroSjfdaWriMFaVIcrpNBo7zw624gOl/4e8y53jN8SlZBQMSYsvHxKRB+tBt0ck/D/kW Ofq0wNSI8BH6BF1RPYtd2xvq/48x9xTFrb4q8cyTLN7GiJZLE8fbK0VzlbVS9FME5qHGf3Rlc2PRX NzVp7/VZKKJyAXlKnUAoXMPlzfxOjUHDIt5JKYsTTPJ/ynziuMl/GPc3bYSpaeQtow74Du/eGaINg 5p0W8rxpY390LtMJawQvexpLjI+Yovgx1nEw4mLR9Vilk0kcsSMkiOKCJ21Tgw9U51KkKHnPavlgl 6GCYIr3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uA73e-0000000CufH-0v2f; Wed, 30 Apr 2025 13:01:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uA6yc-0000000Ctet-092A for linux-arm-kernel@lists.infradead.org; Wed, 30 Apr 2025 12:55:51 +0000 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 A10FB106F; Wed, 30 Apr 2025 05:55:39 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 599C23F5A1; Wed, 30 Apr 2025 05:55:46 -0700 (PDT) Date: Wed, 30 Apr 2025 13:55:41 +0100 From: Leo Yan To: Mao Jinlong Cc: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] coresight: Disable MMIO logging for coresight stm driver Message-ID: <20250430125541.GJ551819@e132581.arm.com> References: <20250430110347.2091013-1-quic_jinlmao@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250430110347.2091013-1-quic_jinlmao@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250430_055550_116918_2D3ECC40 X-CRM114-Status: GOOD ( 17.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 30, 2025 at 04:03:47AM -0700, Mao Jinlong wrote: > When read/write registers with readl_relaxed and writel_relaxed, > log_read_mmio and log_write_mmio will be called. If mmio trace > is enabled to STM, STM driver will write the register to send the > trace and writel_relaxed will be called again. The circular call > like callstack below will happen. Disable mmio logging for stm > driver to avoid this issue. > > [] stm_source_write[stm_core]+0xc4 > [] stm_ftrace_write[stm_ftrace]+0x40 > [] trace_event_buffer_commit+0x238 > [] trace_event_raw_event_rwmmio_rw_template+0x8c > [] log_post_write_mmio+0xb4 > [] writel_relaxed[coresight_stm]+0x80 > [] stm_generic_packet[coresight_stm]+0x1a8 > [] stm_data_write[stm_core]+0x78 > [] ost_write[stm_p_ost]+0xc8 > [] stm_source_write[stm_core]+0x7c > [] stm_ftrace_write[stm_ftrace]+0x40 > [] trace_event_buffer_commit+0x238 > [] trace_event_raw_event_rwmmio_read+0x84 > [] log_read_mmio+0xac > [] readl_relaxed[coresight_tmc]+0x50 > > Signed-off-by: Mao Jinlong LGTM: Reviewed-by: Leo Yan > --- > drivers/hwtracing/coresight/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/hwtracing/coresight/Makefile b/drivers/hwtracing/coresight/Makefile > index 4ba478211b31..f3158266f75e 100644 > --- a/drivers/hwtracing/coresight/Makefile > +++ b/drivers/hwtracing/coresight/Makefile > @@ -22,6 +22,8 @@ condflags := \ > $(call cc-option, -Wstringop-truncation) > subdir-ccflags-y += $(condflags) > > +CFLAGS_coresight-stm.o := -D__DISABLE_TRACE_MMIO__ > + > obj-$(CONFIG_CORESIGHT) += coresight.o > coresight-y := coresight-core.o coresight-etm-perf.o coresight-platform.o \ > coresight-sysfs.o coresight-syscfg.o coresight-config.o \ > -- > 2.25.1 > > _______________________________________________ > CoreSight mailing list -- coresight@lists.linaro.org > To unsubscribe send an email to coresight-leave@lists.linaro.org