From: JiaJie Ho <jiajie.ho@starfivetech.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Olivia Mackall <olivia@selenic.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Emil Renner Berthing <kernel@esmil.dk>,
Conor Dooley <conor.dooley@microchip.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>
Subject: RE: [PATCH v2 2/3] hwrng: starfive - Add TRNG driver for StarFive SoC
Date: Mon, 9 Jan 2023 04:33:26 +0000 [thread overview]
Message-ID: <ea5aecd72cd24670a85d9cf04f5ee71e@EXMBX168.cuchost.com> (raw)
In-Reply-To: <Y7uRVNvplGjrZxa4@gondor.apana.org.au>
> -----Original Message-----
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Sent: 9 January, 2023 12:00 PM
> To: JiaJie Ho <jiajie.ho@starfivetech.com>
> Cc: Olivia Mackall <olivia@selenic.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Emil Renner
> Berthing <kernel@esmil.dk>; Conor Dooley <conor.dooley@microchip.com>;
> linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-riscv@lists.infradead.org
> Subject: Re: [PATCH v2 2/3] hwrng: starfive - Add TRNG driver for StarFive
> SoC
>
> On Mon, Jan 09, 2023 at 03:41:14AM +0000, JiaJie Ho wrote:
> >
> > The average wait time is around 20 microseconds.
> > I measured from writel cmd to wait_for_completion done.
>
> Do you know of an upper bound? E.g., if we limit it to 40us how many
> requests would fail on average?
>
I don't have the upper bound.
I ran the rngtest with 1000 blocks, none of the wait time exceeded 30us.
> Having a maximum delay of 40us would be OK with wait == 0. So you could
> implement it in a way such that if the wait time exceeded 40us then you
> return if wait == 0, otherwise you can wait longer.
>
I'll do this then.
Thanks
Jia Jie
next prev parent reply other threads:[~2023-01-09 4:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 7:11 [PATCH v2 0/3] hwrng: starfive - Add driver for TRNG module Jia Jie Ho
2022-12-28 7:11 ` [PATCH v2 1/3] dt-bindings: rng: Add StarFive " Jia Jie Ho
2022-12-28 7:11 ` [PATCH v2 2/3] hwrng: starfive - Add TRNG driver for StarFive SoC Jia Jie Ho
2023-01-06 8:39 ` Herbert Xu
2023-01-08 14:13 ` JiaJie Ho
2023-01-09 2:58 ` JiaJie Ho
2023-01-09 3:03 ` Herbert Xu
2023-01-09 3:41 ` JiaJie Ho
2023-01-09 4:00 ` Herbert Xu
2023-01-09 4:33 ` JiaJie Ho [this message]
2022-12-28 7:11 ` [PATCH v2 3/3] riscv: dts: starfive: Add TRNG node for VisionFive 2 Jia Jie Ho
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=ea5aecd72cd24670a85d9cf04f5ee71e@EXMBX168.cuchost.com \
--to=jiajie.ho@starfivetech.com \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=kernel@esmil.dk \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=olivia@selenic.com \
--cc=robh+dt@kernel.org \
/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).