lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFBinCAvLzDQCDh6z9soDiyq4sBXZ7XUQf3-Np4pFZTPmHN2AA@mail.gmail.com>
Date: Tue, 22 Jul 2025 21:39:52 +0200
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: chuan.liu@...ogic.com
Cc: Neil Armstrong <neil.armstrong@...aro.org>, Kevin Hilman <khilman@...libre.com>, 
	Jerome Brunet <jbrunet@...libre.com>, linux-arm-kernel@...ts.infradead.org, 
	linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] soc: amlogic: clk-measure: Optimize measurement accuracy

On Tue, Jul 22, 2025 at 8:09 AM Chuan Liu via B4 Relay
<devnull+chuan.liu.amlogic.com@...nel.org> wrote:
>
> From: Chuan Liu <chuan.liu@...ogic.com>
>
> The cycle count register has a 20-bit effective width, but the driver
> only utilizes 16 bits. This reduces the sampling window when measuring
> high-frequency clocks, resulting in (slightly) degraded measurement
> accuracy.
>
> The input clock signal path from gate (Controlled by MSR_RUN) to internal
> sampling circuit in clk-measure has a propagation delay requirement: 24
> clock cycles must elapse after mux selection before sampling.
>
> The measurement circuit employs single-edge sampling for clock frequency
> detection, resulting in a ±1 cycle count error within the measurement window.
>
> +1 cycle: 3 rising edges captured in 2-cycle measurement window.
>     __    __    __
>  __↑  |__↑  |__↑  |__
>   ^             ^
>
> -1 cycle: 2 rising edges captured in 3-cycle measurement window.
>     __    __    __
>  __↑  |__↑  |__↑  |__↑
>     ^               ^
>
> Change-Id: If367c013fe2a8d0c8f5f06888bb8f30a1e46b927
> Signed-off-by: Chuan Liu <chuan.liu@...ogic.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
and with the Change-Id (sorry, I missed that part) dropped as Neil
suggested also:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>


Best regards,
Martin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ