linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Damian Muszynski <damian.muszynski@intel.com>
Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
	qat-linux@intel.com,
	Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Subject: Re: [PATCH v3 3/5] crypto: qat - add measure clock frequency
Date: Thu, 22 Jun 2023 21:26:18 +0300	[thread overview]
Message-ID: <ZJSSSnFhuDR9CkEc@smile.fi.intel.com> (raw)
In-Reply-To: <20230622180405.133298-4-damian.muszynski@intel.com>

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



  reply	other threads:[~2023-06-22 18:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 18:04 [PATCH v3 0/5] crypto: qat - add heartbeat feature Damian Muszynski
2023-06-22 18:04 ` [PATCH v3 1/5] crypto: qat - add internal timer for qat 4xxx Damian Muszynski
2023-06-22 18:04 ` [PATCH v3 2/5] crypto: qat - drop obsolete heartbeat interface Damian Muszynski
2023-06-22 18:04 ` [PATCH v3 3/5] crypto: qat - add measure clock frequency Damian Muszynski
2023-06-22 18:26   ` Andy Shevchenko [this message]
2023-06-22 18:04 ` [PATCH v3 4/5] crypto: qat - add heartbeat feature Damian Muszynski
2023-06-22 18:04 ` [PATCH v3 5/5] crypto: qat - add heartbeat counters check Damian Muszynski
2023-06-22 18:21 ` [PATCH v3 0/5] crypto: qat - add heartbeat feature Andy Shevchenko
2023-06-22 18:27 ` Andy Shevchenko
2023-06-26 11:22   ` Damian Muszynski
2023-06-26 11:31   ` Giovanni Cabiddu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZJSSSnFhuDR9CkEc@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=damian.muszynski@intel.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=qat-linux@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).