linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] powerpc/rng: wire up during setup_arch
Date: Sat, 11 Jun 2022 09:23:06 +0000	[thread overview]
Message-ID: <05dc2709-aeeb-bdfd-7170-e7e686947208@csgroup.eu> (raw)
In-Reply-To: <YqReQbGQ3G5JxSgP@zx2c4.com>



Le 11/06/2022 à 11:20, Jason A. Donenfeld a écrit :
> Hi Christophe,
> 
> On Sat, Jun 11, 2022 at 09:16:24AM +0000, Christophe Leroy wrote:
>> Le 11/06/2022 à 10:11, Jason A. Donenfeld a écrit :
>>> The platform's RNG must be available before random_init() in order to be
>>> useful for initial seeding, which in turn means that it needs to be
>>> called from setup_arch(), rather than from an init call. Fortunately,
>>> each platform already has a setup_arch function pointer, which means
>>> it's easy to wire this up for each of the three platforms that have an
>>> RNG. This commit also removes some noisy log messages that don't add
>>> much.
>>
>> Can't we use one of the machine initcalls for that ?
>> Like machine_early_initcall() or machine_arch_initcall() ?
> 
> No, unfortunately. I tried this, and it's still too late. This must be
> done in setup_arch().

Ok

> 
>> Today it is using  machine_subsys_initcall() and you didn't remove it.
>> It means rng_init() will be called twice. Is that ok ?
> 
> I did remove the calls to machine_subsys_initcall(). I just double
> checked:
> 
> zx2c4@thinkpad ~/Projects/random-linux/arch/powerpc $ rg machine_subsys_initcall platforms/*/rng.c
> zx2c4@thinkpad ~/Projects/random-linux/arch/powerpc $

Oops, I overlooked it, sorry.

Christophe

      reply	other threads:[~2022-06-11  9:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11  8:11 [PATCH] powerpc/rng: wire up during setup_arch Jason A. Donenfeld
2022-06-11  9:16 ` Christophe Leroy
2022-06-11  9:17   ` Christophe Leroy
2022-06-11  9:22     ` Jason A. Donenfeld
2022-06-11  9:27       ` Christophe Leroy
2022-06-11  9:58         ` Jason A. Donenfeld
2022-06-11 10:06           ` Jason A. Donenfeld
2022-06-11 10:41           ` Christophe Leroy
2022-06-11  9:20   ` Jason A. Donenfeld
2022-06-11  9:23     ` Christophe Leroy [this message]

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=05dc2709-aeeb-bdfd-7170-e7e686947208@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).