[PATCHv2] hwrng: add support for picoxcell TRNG

Herbert Xu herbert at gondor.apana.org.au
Fri Jan 14 19:44:16 EST 2011


On Fri, Jan 14, 2011 at 06:44:21PM +0000, Jamie Iles wrote:
>
> +	/* Wait for some data to become available. */
> +	while (__raw_readl(csr) & CSR_OUT_EMPTY_MASK) {
> +		if (!wait)
> +			return 0;
> +		cpu_relax();
> +	}

This has the potential to loop indefinitely.  Please add a time-out
to prevent that (see existing RNG drivers for example).

Thanks!
-- 
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



More information about the linux-arm-kernel mailing list