Thread (58 messages) 58 messages, 7 authors, 2019-01-28

Re: [PATCH v8 09/26] arm64: Unmask PMR before going idle

From: Julien Thierry <hidden>
Date: 2019-01-18 17:17:25
Also in: lkml


On 18/01/2019 16:23, Catalin Marinas wrote:
On Tue, Jan 08, 2019 at 02:07:27PM +0000, Julien Thierry wrote:
quoted
CPU does not received signals for interrupts with a priority masked by
ICC_PMR_EL1. This means the CPU might not come back from a WFI
instruction.

Make sure ICC_PMR_EL1 does not mask interrupts when doing a WFI.

Since the logic of cpu_do_idle is becoming a bit more complex than just
two instructions, lets turn it from ASM to C.
I haven't checked all the call paths, so asking here: does the core code
normally call arch_cpu_idle() with IRQs off?
If you look at do_idle() in kernel/sched/idle.c, it does:

	while (!need_resched()) {
		[...]
		local_irq_disable();
		arch_cpu_idle_enter();

		[...]
		} else {
			cpuidle_idle_call();
		}
	}


Then cpuidle_idle_call() will call default_idle_call() (which calls
arch_cpu_idle()) either directly or via the cpuidle driver. My
understanding is that it always does the call with interrupts disabled.

Thanks,

-- 
Julien Thierry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help