On Wed, Jun 15, 2022 at 04:36:05PM -0400, Adrien Thierry wrote: > We've been encountering a BUG: scheduling while atomic while running the > 5.18.0-rt11 kernel on a Qualcomm SoC (see stacktrace below). > > It seems to occur because a spinlock is taken in the PSCI idle code path > in the idle loop. With the RT patchset applied and CONFIG_PREEMPT_RT > enabled, spinlocks can sleep, thus triggering the bug. > > In order to prevent this, replace the generic_pm_domain spinlock by a > raw spinlock. Ick. I'll leave this to the RT people, but having a spinlock sleep feels totally wrong overall and I didn't think that was something that actually happened. For mainline, I don't think this is a valid change at this point in time untill you all work out the details more. thanks, greg k-h