From: "enlin.mu" <enlin.mu@linux.dev>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: tglx@kernel.org, linux-kernel@vger.kernel.org,
enlin.mu@unisoc.com, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] genirq: Add the entropy pool function to the PPI interrupt handler
Date: Tue, 16 Jun 2026 15:17:00 +0800 [thread overview]
Message-ID: <1ec9d261-1f42-4553-8a09-0ba40c93f786@linux.dev> (raw)
In-Reply-To: <2026061658-unable-rarity-3253@gregkh>
On 2026/6/16 14:48, Greg KH wrote:
> A: http://en.wikipedia.org/wiki/Top_post
> Q: Were do I find info about this thing called top-posting?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top
>
> On Tue, Jun 16, 2026 at 02:26:18PM +0800, enlin.mu wrote:
>> Hi KH
>>
>> hardware: raspberrypi 5
>>
>> other patch(These two locations impact the entropy pool acceleration.
>> comment them out temporarily):
>> acer@raspberrypi:linux $ git diff drivers/of/fdt.c
>> drivers/char/hw_random/iproc-rng200.c
>> diff --git a/drivers/char/hw_random/iproc-rng200.c
>> b/drivers/char/hw_random/iproc-rng200.c
>> index 33bc28f429f6..af105faa88c6 100644
>> --- a/drivers/char/hw_random/iproc-rng200.c
>> +++ b/drivers/char/hw_random/iproc-rng200.c
>> @@ -296,10 +296,10 @@ static const struct dev_pm_ops iproc_rng200_pm_ops = {
>> };
>>
>> static const struct of_device_id iproc_rng200_of_match[] = {
>> - { .compatible = "brcm,bcm2711-rng200", },
>> - { .compatible = "brcm,bcm7211-rng200", },
>> - { .compatible = "brcm,bcm7278-rng200", },
>> - { .compatible = "brcm,iproc-rng200", },
>> + { .compatible = "brcm,bcm2711-rng2000", },
>> + { .compatible = "brcm,bcm7211-rng2000", },
>> + { .compatible = "brcm,bcm7278-rng2000", },
>> + { .compatible = "brcm,iproc-rng2000", },
>
> What is this change for?
This driver accelerates the initialization of the entropy pool. If this
dirver is added, the optimization effect of my patch will no longer be
clearly observable.
>
>
>> {},
>> };
>> MODULE_DEVICE_TABLE(of, iproc_rng200_of_match);
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index 331646d667b9..13308d58785d 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -1100,7 +1100,7 @@ int __init early_init_dt_scan_chosen(char *cmdline)
>>
>> rng_seed = of_get_flat_dt_prop(node, "rng-seed", &l);
>> if (rng_seed && l > 0) {
>> - add_bootloader_randomness(rng_seed, l);
>> + //add_bootloader_randomness(rng_seed, l);
>
> Why did you comment this out?
Before the kernel boots, the Raspberry Pi bootloader injects the
rng-seed property into the kernel's Device Tree to accelerate entropy pool
initialization. Therefore, I need to temporarily comment this out
to avoid interfering with the testing of my current patch.
>
>
>>
>> /* try to clear seed so it won't be found. */
>> fdt_nop_property(initial_boot_params, node, "rng-seed");
>> acer@raspberrypi:linux $
>>
>> Before testing:
>> acer@raspberrypi:linux $ dmesg | grep rng
>> [ 3.360898] random: crng init done
>>
>>
>> After testing:
>> acer@raspberrypi:~ $ dmesg | grep rng
>> [ 2.808880] random: crng init done
>
> I think people have talked about irq "randomness" lots of time in the
> past, you need to provide lots of real documentation about why this time
> it is somehow "different".
The test results shown above are just from a single run. Based on
multipe test runs, the overall performance gain is approximately 0.3 to
0.5 seconds.
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2026-06-16 7:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 5:50 [PATCH] genirq: Add the entropy pool function to the PPI interrupt handler Enlin Mu
2026-06-16 5:59 ` Greg KH
2026-06-16 6:26 ` enlin.mu
2026-06-16 6:48 ` Greg KH
2026-06-16 7:17 ` enlin.mu [this message]
2026-06-16 7:24 ` Greg KH
2026-06-16 7:40 ` enlin.mu
2026-06-16 7:49 ` Greg KH
2026-06-16 8:16 ` enlin.mu
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=1ec9d261-1f42-4553-8a09-0ba40c93f786@linux.dev \
--to=enlin.mu@linux.dev \
--cc=enlin.mu@unisoc.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.