1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.1/target/linux/bcm27xx/patches-6.1/0632-Revert-hwrng-bcm2835-use-hwrng_msleep-instead-of-cpu.patch

31 lines
1,005 B
Diff

From a9d98e9f7d84d7d66b02fdae9c37b19cd516c894 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 21 Mar 2023 16:43:22 +0000
Subject: [PATCH 632/726] Revert "hwrng: bcm2835 - use hwrng_msleep() instead
of cpu_relax()"
This reverts commit 96cb9d0554457086664d3bd10630b11193d863f1.
See: https://github.com/raspberrypi/linux/issues/5390
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/char/hw_random/bcm2835-rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
index cd1713c2d058..f9a4a89e762b 100644
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -71,7 +71,7 @@ static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max,
while ((rng_readl(priv, RNG_STATUS) >> 24) == 0) {
if (!wait)
return 0;
- hwrng_msleep(rng, 1000);
+ cpu_relax();
}
num_words = rng_readl(priv, RNG_STATUS) >> 24;
--
2.33.1