Messages in this thread | | | From | "Jason A. Donenfeld" <> | Date | Fri, 4 Feb 2022 17:12:15 +0100 | Subject | Re: [PATCH v3] random: remove batched entropy locking |
| |
Hi Sebastian,
On Fri, Feb 4, 2022 at 4:57 PM Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > Does this compile and work?
It does, yes.
> From the looks of it, this should be: > > local_lock_irqsave(&batched_entropy_u64.lock, flags); > batch = this_cpu_ptr(&batched_entropy_u64);
I wasn't aware you could reference percpu things statically like that without going through the ptr helper. Anyway, I'll switch to yours, as taking that lock prior seems better anyway.
> > and we could do s/this_cpu_ptr/raw_cpu_ptr/
Ack.
Jason
| |