From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] clocksource: omit seeding of RNG in PBL
Date: Thu, 24 Apr 2025 10:48:33 +0200 [thread overview]
Message-ID: <20250424084833.2920664-1-a.fatoum@pengutronix.de> (raw)
We do not maintain a PRNG in the PBL, so we should omit the call to
srand_xor in PBL, otherwise it expands to BUG() and breaks the newly
introduced PBL clocksource support.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/clock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/clock.c b/common/clock.c
index 517116e3b9a3..50941fb00822 100644
--- a/common/clock.c
+++ b/common/clock.c
@@ -228,7 +228,8 @@ int init_clock(struct clocksource *cs)
cs->cycle_last = cs->read() & cs->mask;
current_clock = cs;
- srand_xor(cs->cycle_last);
+ if (IN_PROPER)
+ srand_xor(cs->cycle_last);
return 0;
}
--
2.39.5
reply other threads:[~2025-04-24 9:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250424084833.2920664-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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