From 6b6ecc0803564ad186b5123db9c63c8bba0f3cf0 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 6 Sep 2018 09:07:47 -0500 Subject: [PATCH] Revert "kernel: Enable interrupts for MULTITHREADING=n on supported arch's" This reverts commit 17e9d623b417d7a0e9b32ca9b5c4b6cd89062ec0. Single thread keep introducing more issues, decided to remove the feature completely and push any required changes for after 1.13. See #9808 Signed-off-by: Anas Nashif --- include/arch/arm/cortex_m/asm_inline_gcc.h | 2 -- include/arch/x86/arch.h | 3 --- kernel/init.c | 13 ------------- 3 files changed, 18 deletions(-) diff --git a/include/arch/arm/cortex_m/asm_inline_gcc.h b/include/arch/arm/cortex_m/asm_inline_gcc.h index 3266b440ba3..d64bf7902b2 100644 --- a/include/arch/arm/cortex_m/asm_inline_gcc.h +++ b/include/arch/arm/cortex_m/asm_inline_gcc.h @@ -175,8 +175,6 @@ static ALWAYS_INLINE void _arch_irq_unlock(unsigned int key) #endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */ } -/* Used to unconditionally enable interrupts when MULTITHREADING=n */ -#define Z_ARCH_INT_ENABLE() _arch_irq_unlock(0) #endif /* _ASMLANGUAGE */ diff --git a/include/arch/x86/arch.h b/include/arch/x86/arch.h index c28a1a03098..01bb41b4e55 100644 --- a/include/arch/x86/arch.h +++ b/include/arch/x86/arch.h @@ -445,9 +445,6 @@ static ALWAYS_INLINE void _arch_irq_unlock(unsigned int key) _do_irq_unlock(); } -/* Used to unconditionally enable interrupts when MULTITHREADING=n */ -#define Z_ARCH_INT_ENABLE() _arch_irq_unlock(0x200) - /** * The NANO_SOFT_IRQ macro must be used as the value for the @a irq parameter * to NANO_CPU_INT_REGISTER when connecting to an interrupt that does not diff --git a/kernel/init.c b/kernel/init.c index d2050d64fb7..127101d2536 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -436,18 +436,6 @@ sys_rand32_fallback: extern uintptr_t __stack_chk_guard; #endif /* CONFIG_STACK_CANARIES */ -#ifndef CONFIG_MULTITHREADING -static void enable_interrupts(void) -{ -#ifdef Z_ARCH_INT_ENABLE - Z_ARCH_INT_ENABLE(); -#else -# pragma message "Z_ARCH_INT_ENABLE not defined for this architecture." -# pragma message "Entry to MULTITHREADING=n app code will be with interrupts disabled." -#endif -} -#endif - /** * * @brief Initialize kernel @@ -502,7 +490,6 @@ FUNC_NORETURN void _Cstart(void) prepare_multithreading(dummy_thread); switch_to_main_thread(); #else - enable_interrupts(); bg_thread_main(NULL, NULL, NULL); irq_lock();