diff options
author | Corentin Labbe <clabbe@baylibre.com> | 2020-12-14 20:02:31 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-01-03 08:41:36 +1100 |
commit | b1f578b85a13c4228d7862a203b428e774f87653 (patch) | |
tree | 442eaa2c6e195c4aad93a9e818c1d7fc9533e56a /drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | |
parent | 9bc3dd24e7dccd50757db743a3635ad5b0497e6e (diff) |
crypto: sun4i-ss - enabled stats via debugfs
This patch enable to access usage stats for each algorithm.
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c')
-rw-r--r-- | drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c index 729aafdbea84..152841076e3a 100644 --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c @@ -32,6 +32,11 @@ int sun4i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, if (err < 0) return err; + if (IS_ENABLED(CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG)) { + algt->stat_req++; + algt->stat_bytes += todo; + } + spin_lock_bh(&ss->slock); writel(mode, ss->base + SS_CTL); |