Re: [PATCH 07/19] LoongArch: Add process management

From
Arnd Bergmann <arnd@arndb.de>
Date
2021-07-06 10:16:56
Reply to
Huacai Chen, 2021-07-06
On Tue, Jul 6, 2021 at 6:18 AM Huacai Chen [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+void arch_cpu_idle(void)
+{
+       local_irq_enable();
+       __arch_cpu_idle();
+}
This looks racy: What happens if an interrupt is pending and hits before
entering __arch_cpu_idle()?

Usually CPU idle instructions are designed to be called with interrupts disabled
and wait until an interrupt happens, including one that was already pending.

           Arnd
Thread (110 messages) 110 messages, 12 authors, last reply 2021-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help