linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] m68k: skip kernel premption if interrupts were disabled
@ 2024-03-22  1:48 Michael Schmitz
       [not found] ` <fcabda73-4b16-ee2c-e993-2bfcf392a26a@linux-m68k.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Schmitz @ 2024-03-22  1:48 UTC (permalink / raw)
  To: linux-m68k, geert; +Cc: schmitzmic, Finn Thain

Comparing m68k with mips, we are missing the tests for
disabled interrupts present in the low level kernel
preemption code for mips.

Adding that test results in no more 'table already freed'
messages when running stress-ng --zombie (on ARAnyM).

Needs testing on qemu / Mac as this test result may be
Atari specific due to the hsync interrupt disable scheme
there.

Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
Link: https://lore.kernel.org/all/7858a184cda66e0991fd295c711dfed7e4d1248c.1696603287.git.geert@linux-m68k.org/
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@linux-m68k.org>
---
 arch/m68k/kernel/entry.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 9933679ea28b..f2cdea3cbc93 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -249,6 +249,10 @@ ENTRY(ret_from_exception)
 	jpl	1f
 
 	movel	%a0@(TINFO_PREEMPT),%d1
+	jne	1f
+
+					| check if interrupts disabled
+	bfextu	%sp@(PT_OFF_SR){#0,#3},%d1
 	jne	1f
 
 	pea	1f
-- 
2.17.1


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

end of thread, other threads:[~2024-03-31  6:14 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22  1:48 [PATCH RFC] m68k: skip kernel premption if interrupts were disabled Michael Schmitz
     [not found] ` <fcabda73-4b16-ee2c-e993-2bfcf392a26a@linux-m68k.org>
     [not found]   ` <e89bf618-2fa8-7cbd-16ed-d021a9a7f740@gmail.com>
     [not found]     ` <948c12e4-e85f-a86c-ae95-a1eb03ca026d@gmail.com>
     [not found]       ` <40928e38-0de7-75a6-d5f7-8c913155da03@linux-m68k.org>
2024-03-23  6:32         ` Michael Schmitz
2024-03-25  6:41           ` Michael Schmitz
2024-03-25 22:28             ` Finn Thain
2024-03-25 22:31               ` Michael Schmitz
2024-03-26  0:41                 ` Finn Thain
2024-03-26  9:58                 ` Finn Thain
2024-03-26 19:59                   ` Michael Schmitz
2024-03-26 22:03                     ` Finn Thain
2024-03-26 22:35                       ` Michael Schmitz
2024-03-27  3:50                         ` Finn Thain
2024-03-27  6:56                           ` Michael Schmitz
2024-03-27 23:29                             ` Spinlock debug, was " Finn Thain
     [not found]                               ` <7aee9fd9-1c0e-4874-bb86-e512a7c0caa6@gmail.com>
2024-03-28  2:48                                 ` Finn Thain
2024-03-28 19:54                                   ` Michael Schmitz
2024-03-30  2:46                                     ` Michael Schmitz
2024-03-30  6:23                                       ` Finn Thain
2024-03-31  6:14                                         ` Michael Schmitz
2024-03-27  8:38                           ` Finn Thain
2024-03-27 22:59                             ` Michael Schmitz
2024-03-27  8:22                     ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).