On Tue, Oct 22, 2013 at 1:05 PM, William Orr <w...@worrbase.com> wrote: > Hey tech@ > > Here's a patch that adds octeon's onboard rng chip as a source of > entropy. Currently I fire this off every second, which neither seemed to > increase the load on my ERL or produce duplicate outputs. > > This patch also maps out the rnm register which controls the status of > the rng and entropy.
This doesn't compile. OCTEON_RNG_BASE needs to be defined somewhere. Also, timeout_add(thing, 1) is not once per second, it's once per tick. A couple of other nits while I'm here: > diff -N dev/cn30xxrnmreg.h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ dev/cn30xxrnmreg.h 22 Oct 2013 02:55:23 -0000 > + > +#ifndef _CN30XXPKOREG_H_ > +#define _CN30XXPKOREG_H_ This should be changed so it doesn't collide with cn30xxpkoreg.h > diff -N dev/octrng.c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ dev/octrng.c 22 Oct 2013 02:55:23 -0000 > + > + /* Add a 5 second timeout to collect entropy for > + * the pool > + */ Might as well remove this comment before it gets further out of sync with reality. The code is pretty self explanatory.