Re: [SPLAT 1/3] arm_pmu: Sleeping spinlocks down armpmu_alloc_atomic()

Thomas Gleixner
2021-08-10T17:16:34Z

On Tue, Aug 10 2021 at 15:54, Sebastian Andrzej Siewior wrote:
> On 2021-08-10 14:41:25 [+0100], Valentin Schneider wrote:
>> [ 4.172817] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:35
>
> Would it work to allocate the memory upfront and invoke the HP callback
> via smp_function_call()?

Huch? If the memory is allocated during the prepare stage then the
actual hotplug callback can just use it. So what's the SMP function call
for?

Thanks,

tglx