hw_random: use add_hwgenerator_randomness() for early entropy
Rather than calling add_device_randomness(), the add_early_randomness() function should use add_hwgenerator_randomness(), so that the early entropy can be potentially credited, which allows for the RNG to initialize earlier without having to wait for the kthread to come up. This requires some minor API refactoring, by adding a `sleep_after` parameter to add_hwgenerator_randomness(), so that we don't hit a blocking sleep from add_early_randomness(). Tested-by: NAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: NAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: NDominik Brodowski <linux@dominikbrodowski.net> Acked-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
Showing
想要评论请 注册 或 登录