nuttx/arch/xtensa/src/common
ligd f9d20ea4d2 sigdeliver: fix system block when kill signal to idle in SMP
Bug description:

CONFIG_SMP=y

Suppose we have 2 cores in SMP, here is the ps return:

PID GROUP CPU PRI POLICY TYPE    NPX STATE     STACK   USED  FILLED COMMAND
  0     0   0   0 FIFO   Kthread N-- Assigned 004076 000748  18.3%  CPU0 IDLE
  1     0   1   0 FIFO   Kthread N-- Running  004096 000540  13.1%  CPU1 IDLE

nsh> kill -4 0
or:
nsh> kill -4 1

system blocked.

Reason:

In func xx_sigdeliver() restore stage, when saved_irqcount == 0, that means
rtcb NOT in critical_section before switch to xx_sigdeliver(), then we need
reset the critical_section state before swith back.

Fix:

Add condition to cover saved_irqcount == 0.

Change-Id: I4af7f95e47f6d78a4094c3757d39b01ac9d533b3
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-03 15:03:32 +00:00
..
xtensa.h arch/xtensa: Print backtrace on assertions. 2020-11-21 11:31:46 -03:00
xtensa_abi.h arch/xtensa/src/common/xtensa_abi.h: nxstyle fixes 2020-03-13 18:58:04 -06:00
xtensa_assert.c arch/xtensa: Fix some typos and correct some comments. 2020-09-30 13:55:28 -03:00
xtensa_attr.h Appease many of nxstyle errors for esp32 related files 2020-03-12 07:45:44 -06:00
xtensa_backtrace.S xtensa/esp32: Fix typos reported by codespell 2021-02-25 15:02:15 +00:00
xtensa_blocktask.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
xtensa_checkstack.c arch: xtensa: Fix stack coloring 2021-02-18 19:05:07 -08:00
xtensa_context.S xtensa/esp32: Fix typos reported by codespell 2021-02-25 15:02:15 +00:00
xtensa_coproc.S arch/xtensa: Few typos and style fixes. 2020-09-21 19:14:19 -04:00
xtensa_copystate.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
xtensa_cpenable.c Xtensa: Adapt co-processor state save/restore functions so that they are call-able from C with Windows ABI. 2016-10-30 08:35:09 -06:00
xtensa_cpuint.S arch/xtensa: Few typos and style fixes. 2020-09-21 19:14:19 -04:00
xtensa_cpupause.c arch, sched: Fix global IRQ control logics for SMP 2020-12-10 08:33:42 +01:00
xtensa_createstack.c arch: xtensa: Fix stack coloring 2021-02-18 19:05:07 -08:00
xtensa_dumpstate.c arch: xtensa: Fix a compile warning in xtensa_dumpstate.c 2021-02-18 09:11:27 +00:00
xtensa_exit.c arch & sched: task: Fix up_exit() and nxtask_exit() for SMP 2020-12-21 23:29:56 -06:00
xtensa_hostfs.c xtensa_hostfs.c: Change the license to Apache 2.0 2020-03-12 09:03:31 -05:00
xtensa_idle.c arch/: Trivial typos, mostly "their is" to "there is" 2020-09-09 14:09:43 -04:00
xtensa_initialize.c esp32/esp32_allocateheap.c: Support the maximum available internal heap configuration 2021-03-02 18:27:20 -08:00
xtensa_initialstate.c arch: Initialize the idle thread stack info directly 2020-12-16 09:54:29 +09:00
xtensa_int_handlers.S xtensa/esp32: Fix typos reported by codespell 2021-02-25 15:02:15 +00:00
xtensa_interruptcontext.c arch: xtensa: Fix up_interrupt_context() for SMP 2020-09-30 08:32:25 -06:00
xtensa_irqdispatch.c Appease many of nxstyle errors for esp32 related files 2020-03-12 07:45:44 -06:00
xtensa_loadstore.S esp32: emulate byte access for module text 2020-03-16 07:54:49 -06:00
xtensa_lowputs.c Xtensa: Keep task state in TCB (unless you want to redesign signal handling). Lots of cosmetic clean-up. 2016-10-16 07:57:16 -06:00
xtensa_mdelay.c Xtensa: Keep task state in TCB (unless you want to redesign signal handling). Lots of cosmetic clean-up. 2016-10-16 07:57:16 -06:00
xtensa_mm.h esp32/esp32_allocateheap.c: Support the maximum available internal heap configuration 2021-03-02 18:27:20 -08:00
xtensa_modifyreg8.c Xtensa: Keep task state in TCB (unless you want to redesign signal handling). Lots of cosmetic clean-up. 2016-10-16 07:57:16 -06:00
xtensa_modifyreg16.c Xtensa: Keep task state in TCB (unless you want to redesign signal handling). Lots of cosmetic clean-up. 2016-10-16 07:57:16 -06:00
xtensa_modifyreg32.c Xtensa: Keep task state in TCB (unless you want to redesign signal handling). Lots of cosmetic clean-up. 2016-10-16 07:57:16 -06:00
xtensa_panic.S Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
xtensa_puts.c Xtensa: Keep task state in TCB (unless you want to redesign signal handling). Lots of cosmetic clean-up. 2016-10-16 07:57:16 -06:00
xtensa_releasepending.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
xtensa_releasestack.c arch/xtensa/src/common: Refactor the mm_ macros into a separate file. 2020-10-25 20:20:01 -03:00
xtensa_reprioritizertr.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
xtensa_schedsigaction.c arch: Remove critical section inside up_schedule_sigaction 2021-01-22 08:34:07 +01:00
xtensa_sigdeliver.c sigdeliver: fix system block when kill signal to idle in SMP 2021-03-03 15:03:32 +00:00
xtensa_sigtramp.S Xtensa ESP32: Correct copyright info; update some comments 2016-12-22 12:34:55 -06:00
xtensa_simcall.S xtensa: Implement simcall 2020-03-12 09:03:31 -05:00
xtensa_stackframe.c arch/xtensa: Fix stack's alignment 2020-11-28 10:24:12 -03:00
xtensa_testset.c armv7-a, armv7-r, armv7-m: Add atomic read-add-write and read-subtract-write functions. 2018-02-04 12:22:03 -06:00
xtensa_timer.h Appease many of nxstyle errors for esp32 related files 2020-03-12 07:45:44 -06:00
xtensa_udelay.c Appease many of nxstyle errors for esp32 related files 2020-03-12 07:45:44 -06:00
xtensa_unblocktask.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
xtensa_user_handler.S xtensa/esp32: Fix typos reported by codespell 2021-02-25 15:02:15 +00:00
xtensa_usestack.c arch: Remove the special check for idle thread in up_use_stack 2020-12-16 09:54:29 +09:00
xtensa_vectors.S arch/xtensa: Fix some alingments and typos in assembly code. 2020-10-11 00:53:38 +08:00
xtensa_window_vector.S arch/xtensa/src/common: Don't include ESP32 files directly, include them 2020-11-28 10:24:12 -03:00
xtensa_windowspill.S arch/xtensa/src/common: Don't include ESP32 files directly, include them 2020-11-28 10:24:12 -03:00