Re: [PATCH v3 3/5] crypto: qat - add measure clock frequency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 22, 2023 at 08:04:04PM +0200, Damian Muszynski wrote:
> The QAT hardware does not expose a mechanism to report its clock
> frequency. This is required to implement the Heartbeat feature.
> 
> Add a clock measuring algorithm that estimates the frequency by
> comparing the internal timestamp counter incremented by the firmware
> with the time measured by the kernel.
> The frequency value is only used internally and not exposed to
> the user.

...

> +	/*
> +	 * Enclose the division to allow the preprocessor to precalculate it,
> +	 * and avoid promoting macro to 64bits before division.

"...promoting r-value to 64-bit..."

> +	 */
> +	*frequency = temp * (HZ_PER_MHZ / 10);

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux