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 9254D299948 for ; Tue, 21 Apr 2026 09:37:12 +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=1776764234; cv=none; b=SzJP1e9Yh3D8f6Jf5mYjTFBFM10vwaluSwWUs8r+9rBHgyazvo3tBO7+PmzOiAjEJ9t/SC4Pq0Gwk587AEll6bVV4EhSB4Lm/chRd8ZOgEoVg1OLvlaY4cGxvqNbYIZgB29R3lWW8OpxfZ90OPV+ubrl7+VxdGYMrU7Dl/18taw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776764234; c=relaxed/simple; bh=QkpWi8ED+jPXeiW/oTqfzU9UcXZCIKOl4ggmomHOz4U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=scfqUtcFB0zwnsPM6FAoDnqRCQW7BjvJIf826uCXe8GLdLtOn3rIpInkTsUHfHTAiVQgeM5FdnHwiKqrxuF8pPZIS2IWKs9kTD8xFC//nHVNRb4l1vVqryR9jk+zAsKyETfbYFQpazF3z4hULucw8Zsm034mStpR182IywD8mHE= 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=F7AqUJ81; 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="F7AqUJ81" 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 6A89325E4; Tue, 21 Apr 2026 02:37:06 -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 8AE493F641; Tue, 21 Apr 2026 02:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1776764232; bh=QkpWi8ED+jPXeiW/oTqfzU9UcXZCIKOl4ggmomHOz4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F7AqUJ81h3Z+O8hkCQVPSTNfKNcpscfJBocVsdr9hbj5Z4ZClbTA71NtCHa9zLamI DTP65cyiQArSP8wL1Loi0bDMmnYsLnDhSQIU3Bgg8bGTCGRgvlIZrG1TweSv1tOoWK bh3xv2XmTV5SnYH4b7wHOkoypvfSSO54Cxkp64QE= Date: Tue, 21 Apr 2026 10:37:08 +0100 From: Yeoreum Yun To: Suzuki K Poulose Cc: Leo Yan , 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, jie.gan@oss.qualcomm.com Subject: Re: [PATCH v5 02/12] coresight: etm4x: fix underflow for nrseqstate Message-ID: References: <20260415165528.3369607-1-yeoreum.yun@arm.com> <20260415165528.3369607-3-yeoreum.yun@arm.com> <20260416151102.GL356832@e132581.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: Hi Suzuki, > On 16/04/2026 16:11, Leo Yan wrote: > > On Wed, Apr 15, 2026 at 05:55:18PM +0100, Yeoreum Yun wrote: > > > TCRSEQEVR is implemented only when TCRIDR5.NUMSEQSTATE is 0b100, > > > in which case n ranges from 0 to 2; otherwise, TCRIDR5.NUMSEQSTATE is 0b000. > > > > My suggestion in previous version is not quite right, thanks for > > making this correct. > > > > [...] > > > > > @@ -1395,6 +1395,8 @@ static ssize_t seq_idx_store(struct device *dev, > > > struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); > > > struct etmv4_config *config = &drvdata->config; > > > + if (!drvdata->nrseqstate) > > > + return -EINVAL; > > > > For "nrseqstate = 0" case, would it return -EOPNOTSUPP instead? > > Or should we make this only visible if the nrseqstore is meaningful ? We could by chanige the attributes permission and nullify the store operation for that device attributes. Not only this, we can apply similar approach to other sysfs entries too: - vinst_pe_cmp_start_stop_store (when nr_pe_cmp == 0) - seq_event_reset_store (when nrseqstate == 0) - ctxid_pid_store (when !caps->ctxid_size || !caps->numcidc) - ctxid_masks_store (when !caps->ctxid_size || !caps->numcidc) and others.. Would you like to include those changes in this patchset? I think it would be better to send seperate patchset.. Thanks! -- Sincerely, Yeoreum Yun