boards, include, sched: Remove CONFIG_SPINLOCK_IRQ

Summary:
- This commit removes CONFIG_SPINLOCK_IRQ to avoid complexity

Impact:
- None

Testing:
- Tested with the following configs
- spresense:wifi, spresense:smp
- esp32-devkitc:smp (QEMU), sabre-6quad:smp (QEMU)
- maix-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi
This commit is contained in:
Masayuki Ishikawa
2021-02-05 22:50:04 -08:00
committed by Xiang Xiao
parent 6547c3df55
commit ad2e85433a
14 changed files with 12 additions and 31 deletions
@@ -132,7 +132,6 @@ CONFIG_SMARTFS_MULTI_ROOT_DIRS=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPI=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_SPRESENSE_EXTENSION=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=16
@@ -49,7 +49,6 @@ CONFIG_SDCLONE_DISABLE=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPI=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_START_DAY=3
CONFIG_START_MONTH=10
CONFIG_START_YEAR=2019
@@ -148,7 +148,6 @@ CONFIG_SMARTFS_MAXNAMLEN=30
CONFIG_SMARTFS_MULTI_ROOT_DIRS=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPINLOCK_IRQ=y
CONFIG_SPRESENSE_EXTENSION=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=16
@@ -57,7 +57,6 @@ CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=192
CONFIG_SCHED_INSTRUMENTATION=y
CONFIG_SMP=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_STACK_COLORATION=y
CONFIG_START_MONTH=3
CONFIG_START_YEAR=2016
@@ -117,7 +117,6 @@ CONFIG_SERIAL_TERMIOS=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPI=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_START_DAY=3
CONFIG_START_MONTH=10
CONFIG_START_YEAR=2013
@@ -113,7 +113,6 @@ CONFIG_SERIAL_TERMIOS=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPI=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_START_DAY=3
CONFIG_START_MONTH=10
CONFIG_START_YEAR=2013
@@ -165,7 +165,6 @@ CONFIG_SERIAL_TERMIOS=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPI=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=3
CONFIG_START_MONTH=10
@@ -116,7 +116,6 @@ CONFIG_SERIAL_TERMIOS=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPI=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_START_DAY=3
CONFIG_START_MONTH=10
CONFIG_START_YEAR=2013
@@ -50,7 +50,6 @@ CONFIG_RR_INTERVAL=200
CONFIG_SCHED_INSTRUMENTATION=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_SPINLOCK_IRQ=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=8
CONFIG_START_YEAR=2020
@@ -46,7 +46,6 @@ CONFIG_SMP=y
CONFIG_SMP_IDLETHREAD_STACKSIZE=3072
CONFIG_SMP_NCPUS=2
CONFIG_SPI=y
CONFIG_SPINLOCK_IRQ=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
+6 -6
View File
@@ -273,7 +273,7 @@ void leave_critical_section(irqstate_t flags);
* Name: spin_lock_irqsave
*
* Description:
* If SMP and SPINLOCK_IRQ are enabled:
* If SMP is are enabled:
* Disable local interrupts and take the global spinlock (g_irq_spin)
* if the call counter (g_irq_spin_count[cpu]) equals to 0. Then the
* counter on the CPU is increment to allow nested call.
@@ -282,7 +282,7 @@ void leave_critical_section(irqstate_t flags);
* or internal data structure) in SMP mode. But do not use this API
* with kernel APIs which suspend a caller thread. (e.g. nxsem_wait)
*
* If SMP and SPINLOCK_IRQ are not enabled:
* If SMP is not enabled:
* This function is equivalent to enter_critical_section().
*
* Input Parameters:
@@ -294,7 +294,7 @@ void leave_critical_section(irqstate_t flags);
*
****************************************************************************/
#if defined(CONFIG_SMP) && defined(CONFIG_SPINLOCK_IRQ)
#if defined(CONFIG_SMP)
irqstate_t spin_lock_irqsave(void);
#else
# define spin_lock_irqsave() enter_critical_section()
@@ -304,13 +304,13 @@ irqstate_t spin_lock_irqsave(void);
* Name: spin_unlock_irqrestore
*
* Description:
* If SMP and SPINLOCK_IRQ are enabled:
* If SMP is enabled:
* Decrement the call counter (g_irq_spin_count[cpu]) and if it
* decrements to zero then release the spinlock (g_irq_spin) and
* restore the interrupt state as it was prior to the previous call to
* spin_lock_irqsave().
*
* If SMP and SPINLOCK_IRQ are not enabled:
* If SMP is not enabled:
* This function is equivalent to leave_critical_section().
*
* Input Parameters:
@@ -322,7 +322,7 @@ irqstate_t spin_lock_irqsave(void);
*
****************************************************************************/
#if defined(CONFIG_SMP) && defined(CONFIG_SPINLOCK_IRQ)
#if defined(CONFIG_SMP)
void spin_unlock_irqrestore(irqstate_t flags);
#else
# define spin_unlock_irqrestore(f) leave_critical_section(f)
-7
View File
@@ -240,13 +240,6 @@ config SPINLOCK
CONFIG_ARCH_HAVE_MULTICPU. This permits the use of spinlocks in
other novel architectures.
config SPINLOCK_IRQ
bool "Support Spinlocks with IRQ control"
default n
---help---
Enables support for spinlocks with IRQ control. This feature can be
used to protect data in SMP mode.
config IRQCHAIN
bool "Enable multi handler sharing a IRQ"
default n
-2
View File
@@ -36,10 +36,8 @@
CSRCS += irq_initialize.c irq_attach.c irq_dispatch.c irq_unexpectedisr.c
ifeq ($(CONFIG_SMP),y)
ifeq ($(CONFIG_SPINLOCK_IRQ),y)
CSRCS += irq_spinlock.c
endif
endif
ifeq ($(CONFIG_IRQCOUNT),y)
CSRCS += irq_csection.c
+6 -6
View File
@@ -30,7 +30,7 @@
#include "sched/sched.h"
#if defined(CONFIG_SMP) && defined (CONFIG_SPINLOCK_IRQ)
#if defined(CONFIG_SMP)
/****************************************************************************
* Public Data
@@ -52,7 +52,7 @@ static volatile uint8_t g_irq_spin_count[CONFIG_SMP_NCPUS];
* Name: spin_lock_irqsave
*
* Description:
* If SMP and SPINLOCK_IRQ are enabled:
* If SMP is enabled:
* Disable local interrupts and take the global spinlock (g_irq_spin)
* if the call counter (g_irq_spin_count[cpu]) equals to 0. Then the
* counter on the CPU is increment to allow nested call.
@@ -61,7 +61,7 @@ static volatile uint8_t g_irq_spin_count[CONFIG_SMP_NCPUS];
* or internal data structure) in SMP mode. But do not use this API
* with kernel APIs which suspend a caller thread. (e.g. nxsem_wait)
*
* If SMP and SPINLOCK_IRQ are not enabled:
* If SMP is not enabled:
* This function is equivalent to enter_critical_section().
*
* Input Parameters:
@@ -93,13 +93,13 @@ irqstate_t spin_lock_irqsave(void)
* Name: spin_unlock_irqrestore
*
* Description:
* If SMP and SPINLOCK_IRQ are enabled:
* If SMP is enabled:
* Decrement the call counter (g_irq_spin_count[cpu]) and if it
* decrements to zero then release the spinlock (g_irq_spin) and
* restore the interrupt state as it was prior to the previous call to
* spin_lock_irqsave().
*
* If SMP and SPINLOCK_IRQ are not enabled:
* If SMP is not enabled:
* This function is equivalent to leave_critical_section().
*
* Input Parameters:
@@ -126,4 +126,4 @@ void spin_unlock_irqrestore(irqstate_t flags)
up_irq_restore(flags);
}
#endif /* CONFIG_SMP && CONFIG_SPINLOCK_IRQ */
#endif /* CONFIG_SMP */