From: moreau francis <francis_moreau2000@yahoo.fr>
To: Michael Buesch <mb@bu3sch.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re : [HW_RNG] How to use generic rng in kernel space
Date: Wed, 9 Aug 2006 10:02:53 +0000 (GMT) [thread overview]
Message-ID: <20060809100253.78092.qmail@web25801.mail.ukl.yahoo.com> (raw)
In-Reply-To: <200608081934.31694.mb@bu3sch.de>
Michael Buesch wrote:
> On Tuesday 08 August 2006 17:39, moreau francis wrote:
>> Michael Buesch wrote:
>>> So, if you have a special hwrng on your embedded board and you
>>> have some special driver in that board, why not interface
>>> directly from the driver to the hwrng-driver?
>> This is what I'm currently doing. I was just thinking to use the
>> new HW-RNG layer and drop common code...
>>
>>> This is all pretty special case.
>>> In the hwrng-driver you could still additionally do a
>>> hrwng_register() to export the functionality to
>>> userspace, though.
>>>
>> yes I would like to do that but there is a problem: I have no
>> access to "rng_mutex" to synchronise hw accesses and I'm
>> wondering if there's any issue to use a mutex in driver init
>> code.
>
> Use your own mutex or spinlock in the data_read callback
> and use that to serialize accesses to the hardware.
>
I think I miss something there but I need to lock this whole
sequence when reading a random data:
lock(hwrng);
rng_data_present();
rng_data_read();
unlock(hwrng);
not only data_read callback. To do that I can only use "rng_mutex",
no ?
thanks
Francis
prev parent reply other threads:[~2006-08-09 10:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 12:09 moreau francis
2006-08-01 13:29 ` Alan Cox
2006-08-01 13:28 ` Re : " moreau francis
2006-08-01 20:49 ` Michael Buesch
2006-08-04 13:00 ` Re : " moreau francis
2006-08-04 21:08 ` Michael Buesch
2006-08-05 1:44 ` Jeff Garzik
2006-08-08 15:39 ` Re : " moreau francis
2006-08-08 17:34 ` Michael Buesch
2006-08-09 10:02 ` moreau francis [this message]
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=20060809100253.78092.qmail@web25801.mail.ukl.yahoo.com \
--to=francis_moreau2000@yahoo.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@bu3sch.de \
/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
all inboxes | Powered by JetHome®