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 868F53A168C for ; Tue, 21 Apr 2026 08:57:06 +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=1776761827; cv=none; b=br3vWBGaspjkXLN/05I4prgcNhbMJOBu76KuExDKD4Jvt7/FN8GgJzjg6+1Qs5FhCwYdtS3CuZjQ0pqrYcW9CxvF07LGZa+GzFvw/yXBZBM8ITpXfH/bqE6bWM8IbuXdU5HE3F+rLIS3aV4iWaP+xC8NY9eiLwCJYfw3tfo5Ed8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776761827; c=relaxed/simple; bh=YzXsmTk6+sj47O3aTuKHVkLOmVtcoX1WjbZAjbXxFEg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Xz35DbHjn2u6nahInZJEwtvE08eNFG6YOpoyEq7q0M3E+y6qwwwSko7JGeeLLBsXwSMEoM8xvomirdVQqWDA16MTEY2hAh3IjI8vGdNxem95MTdYcs71OCGEmCgeQB03iuTgWpUBwW9CnNwtLNHnqoWaOuWFTBs7zDmOvaCjTGE= 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=sse1rosc; 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="sse1rosc" 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 4F06225E0; Tue, 21 Apr 2026 01:57:00 -0700 (PDT) Received: from [10.57.17.241] (unknown [10.57.17.241]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7FDBA3F915; Tue, 21 Apr 2026 01:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1776761825; bh=YzXsmTk6+sj47O3aTuKHVkLOmVtcoX1WjbZAjbXxFEg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sse1rosczzldQRUmugXX1KsoKRgsoUFkpat/bsOXjt61vLGQ/WXzOgA06irj3umSk eMkKmeY71bDfDZhQmoModxUliH+aK/XMN+/rd31appzqEAFIHXJ8NbfqT/CbXRW60o HqJa2/q10dtoRD7W7xwxp6KnbKImE83rRuqW9l9k= Message-ID: <57dbea1b-670b-4b8f-a590-1d4239bc2c76@arm.com> Date: Tue, 21 Apr 2026 09:57:02 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 04/12] coresight: etm4x: exclude ss_status from drvdata->config Content-Language: en-GB To: Leo Yan , Yeoreum Yun 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, jie.gan@oss.qualcomm.com References: <20260415165528.3369607-1-yeoreum.yun@arm.com> <20260415165528.3369607-5-yeoreum.yun@arm.com> <20260416155118.GM356832@e132581.arm.com> From: Suzuki K Poulose In-Reply-To: <20260416155118.GM356832@e132581.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 16/04/2026 16:51, Leo Yan wrote: > On Wed, Apr 15, 2026 at 05:55:20PM +0100, Yeoreum Yun wrote: > > [...] > >> @@ -573,11 +573,9 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata) >> etm4x_relaxed_write32(csa, config->res_ctrl[i], TRCRSCTLRn(i)); >> >> for (i = 0; i < caps->nr_ss_cmp; i++) { >> - /* always clear status bit on restart if using single-shot */ >> - if (config->ss_ctrl[i] || config->ss_pe_cmp[i]) >> - config->ss_status[i] &= ~TRCSSCSRn_STATUS; >> etm4x_relaxed_write32(csa, config->ss_ctrl[i], TRCSSCCRn(i)); >> - etm4x_relaxed_write32(csa, config->ss_status[i], TRCSSCSRn(i)); >> + /* always clear status and pending bits on restart if using single-shot */ >> + etm4x_relaxed_write32(csa, 0x0, TRCSSCSRn(i)); > > In Arm ARM, D24.4.60 TRCSSCSR, bits[0..3] are RO. I think it is > fine for directly clear the regiser with zero (means it will only > clear status / pending bits). > > [...] > >> @@ -1841,10 +1839,11 @@ static ssize_t sshot_status_show(struct device *dev, >> { >> unsigned long val; >> struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); >> + const struct etmv4_caps *caps = &drvdata->caps; >> struct etmv4_config *config = &drvdata->config; >> >> raw_spin_lock(&drvdata->spinlock); >> - val = config->ss_status[config->ss_idx]; >> + val = caps->ss_cmp[config->ss_idx]; >> raw_spin_unlock(&drvdata->spinlock); >> return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); >> } > > This sysfs knob never can print out a realtime status for sshot, I am Won't it give the status, when the ETM was disabled (and saved back to config), for as sysfs mode operation, where the user collects information about the status via sysfs ? ( The question of if someone actually makes use of this is a different question ) Cheers Suzuki > fine for only printing caps->ss_cmp, this can avoid any misleading. > > @Suzuki, @Mike, do you agree with the change above? > > If maintainers agree with this, as Jie suggested, it is good to add a > comment in the code and update the document: > > Documentation/trace/coresight/coresight-etm4x-reference.rst > > Thanks, > Leo