From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E291139A7FA for ; Mon, 1 Jun 2026 11:14:30 +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=1780312472; cv=none; b=c2CccIknf3tH0jV/HKlWlf3VckzHA0bOolZj7me0VA7HdOJPMrRxuI/yf3P95wMsfdXnY4Iz1DHoB4sw+vXFZ19dXT9qN1PF1lVhUBxAjohpt71CSjiFKgO5JieQ5VEN88vKWIBXDg5Gi/Q2eWahXfkY4I64Poc4Z3k8ZggRaJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780312472; c=relaxed/simple; bh=MJEmhjOmdUj3v3YoxPjxOovy5nrKF3eormxGdl+E/Y4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FUwDNCo8Thjt9+DLYV90jABzayUr0tC2oC94S9pcTj18ezvu7tm8jM54RxqF6FNsHYvs3CPMX+i4ZhN+Urvm6waaeW2uCoTi3MnGSCb2pMb6Jbxmb0/JxgdOOm/JtW/1USH1rTEwzzSOEKDAUnCBraf/q4cn/2bqiDvg346of8o= 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; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=jZYygagV; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="jZYygagV" 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 5921C1E7D; Mon, 1 Jun 2026 04:14:25 -0700 (PDT) Received: from e129823.arm.com (e129823.arm.com [10.1.197.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D9ADD3F632; Mon, 1 Jun 2026 04:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1780312470; bh=MJEmhjOmdUj3v3YoxPjxOovy5nrKF3eormxGdl+E/Y4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jZYygagVVpaHZP1QTAw4ZTR76Kg+S8BF/9T8dYGv5ddpFsKYXV84i0eiG1ifAQIxy vR1N6llyGApuNLVLKNxwl7ocwv6NjRGYdUSVaxKErK7e3ISEhLnYSSvZtZYIF9TR/4 E12p4XVIHf5qmWOyjV8TbJJcxC0p37ytkZK3Py68= Date: Mon, 1 Jun 2026 12:14:26 +0100 From: Yeoreum Yun To: Suzuki K Poulose Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mike.leach@arm.com, james.clark@linaro.org, alexander.shishkin@linux.intel.com, leo.yan@arm.com, jie.gan@oss.qualcomm.com Subject: Re: [PATCH v7 03/13] coresight: etm4x: introduce ETM_MAX_SEQ_TRANSITIONS Message-ID: References: <20260519154812.254884-1-yeoreum.yun@arm.com> <20260519154812.254884-4-yeoreum.yun@arm.com> <3144c7fb-b41d-4bca-a6a0-eeb9dfddc8b8@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3144c7fb-b41d-4bca-a6a0-eeb9dfddc8b8@arm.com> On Mon, Jun 01, 2026 at 10:53:38AM +0100, Suzuki K Poulose wrote: > On 19/05/2026 16:48, Yeoreum Yun wrote: > > According to IHI006H Embedded Trace Macrocell Architecture > > Specification [0], n could be 0-2 for TCRSEQEVR when > > TCRIDR5.NUMSEQSTATE is 0b100. > > > > Therefore, introduce ETM_MAX_SEQ_TRANSITIONS macro and apply this > > in TCRSEQEVR relevant fields. > > > > Link: https://developer.arm.com/documentation/ihi0064/latest/ [0] > > Suggestedby: Leo Yan > > Signed-off-by: Yeoreum Yun > > --- > > drivers/hwtracing/coresight/coresight-etm4x-cfg.c | 2 +- > > drivers/hwtracing/coresight/coresight-etm4x.h | 5 +++-- > > 2 files changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-cfg.c b/drivers/hwtracing/coresight/coresight-etm4x-cfg.c > > index c302072b293a..e1a59b434505 100644 > > --- a/drivers/hwtracing/coresight/coresight-etm4x-cfg.c > > +++ b/drivers/hwtracing/coresight/coresight-etm4x-cfg.c > > @@ -76,7 +76,7 @@ static int etm4_cfg_map_reg_offset(struct etmv4_drvdata *drvdata, > > } else if ((offset & GENMASK(11, 4)) == TRCSEQEVRn(0)) { > > /* sequencer state control registers */ > > idx = (offset & GENMASK(3, 0)) / 4; > > - if (idx < ETM_MAX_SEQ_STATES) { > > + if (idx < ETM_MAX_SEQ_TRANSITIONS) { > > reg_csdev->driver_regval = &drvcfg->seq_ctrl[idx]; > > err = 0; > > } > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h > > index 89d81ce4e04e..60e08ab085c5 100644 > > --- a/drivers/hwtracing/coresight/coresight-etm4x.h > > +++ b/drivers/hwtracing/coresight/coresight-etm4x.h > > @@ -614,6 +614,7 @@ static inline u32 etm4_res_sel_pair(u8 res_sel_idx) > > #define ETM_MAX_NR_PE 8 > > #define ETMv4_MAX_CNTR 4 > > #define ETM_MAX_SEQ_STATES 4 > > +#define ETM_MAX_SEQ_TRANSITIONS (ETM_MAX_SEQ_STATES - 1) > > Similar to the other comment on the patch, please don't tie this to > SEQ_STATES. Simpl define. > > #define ETM_MAX_SEQ_CTRLS 3 Okay. I'll untie them. Thanks! [...] -- Sincerely, Yeoreum Yun