Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH v5 0/1] MIPS: Fix idle VS timer enqueue
@ 2025-02-28 10:05 Marco Crivellari
  2025-02-28 10:05 ` [PATCH v5 1/1] " Marco Crivellari
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Crivellari @ 2025-02-28 10:05 UTC (permalink / raw)
  To: linux-mips, linux-kernel
  Cc: Thomas Bogendoerfer, Marco Crivellari, Frederic Weisbecker,
	Anna-Maria Behnsen, Thomas Gleixner, Peter Zijlstra, Huacai Chen,
	Maciej W . Rozycki

This patch aims to fix idle routine while the CPU receive an interrupt,
because __r4k_wait() only checks if TIF_NEED_RESCHED is set before
going to sleep.
The same behavior has been changed in LoongArch [1].

Code (cross) compiled successfully and I manage to test it on a VM
emulating a malta board. I ran QEMU with:

qemu-system-mips64el -M malta -m 2G -kernel vmlinux -serial stdio -drive \
file=rootfs.ext2,format=raw -append "rootwait root=/dev/sda" -cpu 5Kc

rootfs generated using buildroot (malta default configuration).

- [1] https://github.com/chenhuacai/linux/commit/a8aa673ea46c03b3f62992ffa4ffe810ac84f6e3

---
Changes in v5:
 - comment: idle interrupt region, instead of rollback region

Changes in v4:
 - comments: 36 byte region

Changes in v3:
 - changed "daddiu k0, 1" with PTR_ADDIU k0, 5
 - replaced CONFIG_CPU_MICROMIPS with 3 _ssnop followed by _ehb
 - integrated the commit message with explanation about
   CONFIG_CPU_MICROMIPS replacement

Changes in v2:
 - Changes introduced by Huacai:
    https://lore.kernel.org/linux-mips/20250214105047.150835-1-marco.crivellari@suse.com/T/#m75d9c587829e15e0d7baec13078be4e65c936408

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

 arch/mips/kernel/genex.S | 42 ++++++++++++++++++++++------------------
 arch/mips/kernel/idle.c  |  1 -
 2 files changed, 23 insertions(+), 20 deletions(-)

-- 
2.48.1


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

end of thread, other threads:[~2025-03-05 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 10:05 [PATCH v5 0/1] MIPS: Fix idle VS timer enqueue Marco Crivellari
2025-02-28 10:05 ` [PATCH v5 1/1] " Marco Crivellari
2025-02-28 13:32   ` Frederic Weisbecker
2025-03-02  0:54   ` Maciej W. Rozycki
2025-03-03  8:13     ` Huacai Chen
2025-03-05 14:13       ` Marco Crivellari

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