From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD25B393DE8 for ; Tue, 18 Nov 2025 16:15:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763482539; cv=none; b=J5TQAtR7n64sUOcpcKkID5tXROiyY1LBimxFiDwOUecrmlBWHSXQXLuEaXqxiNltwOUCnre0oTmMK6EowYVuPSvwQ6j01BNuYTxFqCX35i1E36byfKvAW1z7PBdqgdzJB8usssyXRARnhbbcNbdNwZQF/MUX/gMRRJhmemF8EZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763482539; c=relaxed/simple; bh=CH1QPu2GqTouc6JmQl/PvcmV2Q7kfaSd+QJjaITvltQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=htz08Sa+rW2vn1fAMjdxe+ZduIXj1RfeW8dSEuT1G6a0en3d/L/1IawjtHmIJaNLThM6TD5WVXkgCZLU+AiuRXDTkiJKfQpG/d+gNKyuD/WWfOZCJs011XknxWsBwyatcHCZ0f1D/4B2zXV5JLNIH98ArAvFEMRzOXkUFNabXcM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rpzqsYzp; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rpzqsYzp" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-47790b080e4so23651555e9.3 for ; Tue, 18 Nov 2025 08:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763482535; x=1764087335; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gJbSaVfQsu8Be7gi3N3Qdz/1czwLOuz34Pc1Hp3AGq4=; b=rpzqsYzpKadJvYBuNJkOf6nBFZkbzz+AVM77nHEvA4TCD9pIKsvH9l0kK44EYAy3Zw Pi0YE3LcAac5mwvw5PFynnQNJWAxtoY9J9fgh9MuQq1gbn7RxPDeWXTgmkxawEAy7hyF NBA89cVfjNDVYim0nNt/pUSNwhKa7UzpOv2jGZ3QCyXxSTrMhWKXZWO4sd9s/cZm5iRC NXGYPYOOrSPJJB6ZvP7TzvL8VenRk3QlePQfkaxwx7jc9r5Lr32k335rhXcc5FI7KYqd 3L4q0rUyxkY/nL4ieUx3cT6ydI5OtibExcKNP75j4tjWdyQxPq5qDVGHA0nuD7BHv+9b zcdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763482535; x=1764087335; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gJbSaVfQsu8Be7gi3N3Qdz/1czwLOuz34Pc1Hp3AGq4=; b=NS5I6HQTO/XtZS/uyK2eNAhAmdlvjmgUZOvfeynnvdAztQa0cC3LPi2TW6ed1ewREK UzUQhMTlKI1vjOL/QKjyK2ljp07uCkkh28OqPWWqjoOcyuHfC8bIUMxqxsUveip8W0cD nDYFcfjdba0wxPptRd7jgQzucq2P7e1Ret/rJ37iQ7+x241LBSx0SrNICHwcgq5eUdlN jQ+A6kh+nlzXP3v7P6wAWtV7YQzvIJ3SOwf1DPc8VOUH39ne9zMRiNFTVDAMCe7S7Vdo xpr+vcGKNXPaiUDNtKh4L/zZjD5jwDCPmt6MMH5O31AjjCRvszkk9aOszNGdlfmZhsVg ossA== X-Forwarded-Encrypted: i=1; AJvYcCWtJw6grpxyBfx+dSkGj+pYyCZJDzpT/wd2ldsfeV62sGRoNjfHFukKtgrJTBA/iph+acDbPIcR8lqdwHg=@vger.kernel.org X-Gm-Message-State: AOJu0Ywr2WdH4P5kZ5LTUIlsnHHKt6ZlNMIlJimVkN75oxUyBv1ycbQu mS5Doeq+mAZ79WHD8PURn4/Zapc2eg0ZIqYqFSx+u9ljScuBzqxJGkBw6hpOede721k= X-Gm-Gg: ASbGnctKC2wUzvA1pRIjfANGYX8dsPTtusDLIeK15s7VpzG5Jh6uKL8KtBRGmFVc2Kx py5Fp/Sw31+Bclsmm65Y4CHPNKt0kcB/gMOVBYyg44ksVm5lAG5rV2OSinnWgaQfv/r0ViPRzz6 Sygzz5XiP8KttcZeUQHPblPlZFFOSSz38QyR/yJo5/OCxEgETT7J/uPu5RjHJbIh+OOLH6XhHMV e1WEJL0lnYgRNgjlsAncK2aEp1FKkGwKEYPdQLhRJeF1v3+XjvVMM+XHpfQ0BZyFyDj289FMJdp wtYIY81+8K6sdk/2xU4f3zoaSSmBL0VgKLlrvRfmL6WT1jrH2L/4U801ZtldbxgPBIIPGKqh0zL B7JbPWmj7pfiDFLp8ZMxs0yXGWVy2kRMsOBQpEzLGTRrJIPLO7/7X2X8xFJrLCU70u9RnAF/Dai I6C3tNZhhSAIyaAaQ3 X-Google-Smtp-Source: AGHT+IFNyjTOc2O+E2kBBP4fBbkcbWJS9AWlQK7jCUXfXz1xZUJdgxvuleAKgQPv4ma+ub1UTOpP7g== X-Received: by 2002:a05:600c:a43:b0:477:3543:3a3b with SMTP id 5b1f17b1804b1-4778fe59f2amr146578905e9.6.1763482534892; Tue, 18 Nov 2025 08:15:34 -0800 (PST) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-477a974cdc8sm22479365e9.2.2025.11.18.08.15.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Nov 2025 08:15:33 -0800 (PST) Message-ID: <4003a48f-73e0-4296-bcdc-6a975807c2d5@linaro.org> Date: Tue, 18 Nov 2025 16:15:31 +0000 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 v4 13/13] coresight: docs: Document etm4x timestamp interval option To: Leo Yan Cc: Suzuki K Poulose , Mike Leach , Alexander Shishkin , Jonathan Corbet , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <20251112-james-cs-syncfreq-v4-0-165ba21401dc@linaro.org> <20251112-james-cs-syncfreq-v4-13-165ba21401dc@linaro.org> <20251114180503.GM3568724@e132581.arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20251114180503.GM3568724@e132581.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/11/2025 6:05 pm, Leo Yan wrote: > On Wed, Nov 12, 2025 at 03:22:19PM +0000, James Clark wrote: >> Document how the new field is used, maximum value and the interaction >> with SYNC timestamps. >> >> Signed-off-by: James Clark >> --- >> Documentation/trace/coresight/coresight.rst | 15 +++++++++++++-- >> 1 file changed, 13 insertions(+), 2 deletions(-) >> >> diff --git a/Documentation/trace/coresight/coresight.rst b/Documentation/trace/coresight/coresight.rst >> index 806699871b80..80b5ed09d69b 100644 >> --- a/Documentation/trace/coresight/coresight.rst >> +++ b/Documentation/trace/coresight/coresight.rst >> @@ -613,8 +613,19 @@ They are also listed in the folder /sys/bus/event_source/devices/cs_etm/format/ >> - Session local version of the system wide setting: :ref:`ETM_MODE_RETURNSTACK >> ` >> * - timestamp >> - - Session local version of the system wide setting: :ref:`ETMv4_MODE_TIMESTAMP >> - ` >> + - Controls generation and interval of timestamps. >> + >> + 0 = off, 1 = maximum interval .. 15 = minimum interval. > > I am struggling to understand the "maximum" and "minimum" usage here. > > Seems to me, you are saying: > > 1 = maximum frequency .. 15 = minimum frequency > Yes the documentation was the wrong way around. Will flip it. >> + >> + Values 1 - 14 use a counter that decrements every cycle to generate a >> + timestamp on underflow. The reload value for the counter is 2 raised to >> + the power of timestamp interval - 1. If the value is 1 then the reload >> + value is 1, if the value is 11 then the reload value is 1024 etc. > > I saw your replying to Randy, yeah, the formula would be much clear. > >> + >> + Setting the minimum interval (15) will disable the counter generated >> + timestamps, freeing the counter resource, leaving only ones emitted when >> + a SYNC packet is generated for every 4096 bytes of trace. > > "every 4096 bytes" is not always true. > > Isn't this defined in TRCSYNCPR.PERIOD? Maybe just say "... for every > period of trace defined in TRCSYNCPR.PERIOD", or even more general > "... for every period of trace". > > Thanks, > Leo > It would only not be true when using a custom config. I can say that it's TRCSYNCPR.PERIOD but that the default is 4096 bytes. >> + >> * - cc_threshold >> - Cycle count threshold value. If nothing is provided here or the provided value is 0, then the >> default value i.e 0x100 will be used. If provided value is less than minimum cycles threshold >> >> -- >> 2.34.1 >>