Hi Adrian,
Am 30.09.2024 um 21:38 schrieb John Paul Adrian Glaubitz:
Hello Jean-Michel,
On Mon, 2024-09-30 at 10:19 +0200, Jean-Michel Hautbois wrote:
I wanted to try PREEMPT_RT. I added the support for it:
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index c7880f375518..b0360167574d 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -39,6 +39,7 @@ config M68K
select OLD_SIGSUSPEND3
select UACCESS_MEMCPY if !MMU
select ZONE_DMA
+ select ARCH_SUPPORTS_RT
config CPU_BIG_ENDIAN
def_bool y
And set PREEMPT_RT then it fails to boot:
[ 6.517000] BUG: scheduling while atomic: init/1/0x00010001
(...)
Any idea, thoughts :-) ?
From what I know an architecture has to be explicitly ported to support
a realtime kernel. Simply enabling the feature therefore won't work.
Making sure softirqs are run from a separate kernel thread and not from
atomic context would be a good start. Adding preempt_disable() /
preempt_enable() around more critcal sections may be needed as well.
Git history of those architectures that support PREEMPT_RT might be
informative.
Cheers,
Michael
Adrian