The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/1] loongson: Fix idle VS timer enqueue
@ 2025-02-08 10:19 Marco Crivellari
  2025-02-08 10:19 ` [PATCH v2 1/1] [PATCH] " Marco Crivellari
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Crivellari @ 2025-02-08 10:19 UTC (permalink / raw)
  To: loongarch, linux-kernel
  Cc: Huacai Chen, WANG Xuerui, Frederic Weisbecker, Jinyang He,
	Marco Crivellari, Tiezhu Yang, Jiaxun Yang, Bibo Mao

This patch aim to fix issues if timers are queued because __arch_cpu_idle()
only checks if TIF_NEED_RESCHED is set before going to sleep.

Changes are described in [1], and [2] improve the patch further.

The following patch is the result of [1] and [2] combined.
Code compiled successfully, but I couldn't test the changes because of some
trouble emulating a loongarch machine; I tried to boot with and without
this patch, but a panic occurred, due likely to a wrong VM configuration
(panic occurred right after the i8042 probing).


- [1] https://lore.kernel.org/all/20230811170049.308866-5-frederic@kernel.org/#t
- [2] https://lore.kernel.org/all/06cf8750-901d-2f65-fb9e-81980688e017@loongson.cn/

---
Changes in v2:
 - arch/loongarch/kernel/genex.S: code improved as suggested by Huacai: 
	https://lore.kernel.org/loongarch/CAAhV-H6OKwmxhF_iWJEc8OEZ==h8dTdorTwkE8oMUMWAbU6xeg@mail.gmail.com/
 - arch/loongarch/kernel/reset.c: asm inline inside the while loops

Marco Crivellari (1):
  loongson: Fix idle VS timer enqueue

 arch/loongarch/kernel/genex.S | 31 +++++++++++++++++--------------
 arch/loongarch/kernel/idle.c  |  3 +--
 arch/loongarch/kernel/reset.c | 18 +++++++++---------
 3 files changed, 27 insertions(+), 25 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-10  8:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08 10:19 [PATCH v2 0/1] loongson: Fix idle VS timer enqueue Marco Crivellari
2025-02-08 10:19 ` [PATCH v2 1/1] [PATCH] " Marco Crivellari
2025-02-09 19:08   ` kernel test robot
2025-02-10  2:19   ` Huacai Chen
2025-02-10  8:27     ` Marco Crivellari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox