mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
arch/xtensa: Add support to disable signals actions related data struct
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
committed by
Alan C. Assis
parent
7dbd568477
commit
1b8d8f7565
@@ -189,6 +189,7 @@ struct xcpt_syscall_s
|
|||||||
|
|
||||||
struct xcptcontext
|
struct xcptcontext
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||||
/* These are saved copies of registers used during signal processing.
|
/* These are saved copies of registers used during signal processing.
|
||||||
*
|
*
|
||||||
* REVISIT: Because there is only one copy of these save areas,
|
* REVISIT: Because there is only one copy of these save areas,
|
||||||
@@ -199,10 +200,6 @@ struct xcptcontext
|
|||||||
|
|
||||||
uint32_t *saved_regs;
|
uint32_t *saved_regs;
|
||||||
|
|
||||||
/* Register save area */
|
|
||||||
|
|
||||||
uint32_t *regs;
|
|
||||||
|
|
||||||
#ifndef CONFIG_BUILD_FLAT
|
#ifndef CONFIG_BUILD_FLAT
|
||||||
/* This is the saved address to use when returning from a user-space
|
/* This is the saved address to use when returning from a user-space
|
||||||
* signal handler.
|
* signal handler.
|
||||||
@@ -210,6 +207,10 @@ struct xcptcontext
|
|||||||
|
|
||||||
uintptr_t sigreturn;
|
uintptr_t sigreturn;
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||||
|
/* Register save area */
|
||||||
|
|
||||||
|
uint32_t *regs;
|
||||||
|
|
||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
/* The following array holds the return address and the exc_return value
|
/* The following array holds the return address and the exc_return value
|
||||||
|
|||||||
@@ -69,14 +69,16 @@ list(
|
|||||||
xtensa_perf.c
|
xtensa_perf.c
|
||||||
xtensa_releasestack.c
|
xtensa_releasestack.c
|
||||||
xtensa_registerdump.c
|
xtensa_registerdump.c
|
||||||
xtensa_sigdeliver.c
|
|
||||||
xtensa_swint.c
|
xtensa_swint.c
|
||||||
xtensa_stackframe.c
|
xtensa_stackframe.c
|
||||||
xtensa_saveusercontext.c
|
xtensa_saveusercontext.c
|
||||||
xtensa_schedsigaction.c
|
|
||||||
xtensa_usestack.c
|
xtensa_usestack.c
|
||||||
xtensa_tcbinfo.c)
|
xtensa_tcbinfo.c)
|
||||||
|
|
||||||
|
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||||
|
list(APPEND SRCS xtensa_schedsigaction.c xtensa_sigdeliver.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Configuration-dependent common Xtensa files
|
# Configuration-dependent common Xtensa files
|
||||||
|
|
||||||
if(CONFIG_ARCH_USE_TEXT_HEAP)
|
if(CONFIG_ARCH_USE_TEXT_HEAP)
|
||||||
@@ -106,8 +108,10 @@ endif()
|
|||||||
if(CONFIG_BUILD_PROTECTED)
|
if(CONFIG_BUILD_PROTECTED)
|
||||||
target_sources(arch_interface PRIVATE xtensa_signal_handler.S)
|
target_sources(arch_interface PRIVATE xtensa_signal_handler.S)
|
||||||
list(APPEND SRCS xtensa_dispatch_syscall.S)
|
list(APPEND SRCS xtensa_dispatch_syscall.S)
|
||||||
list(APPEND SRCS xtensa_signal_dispatch.c xtensa_task_start.c
|
list(APPEND SRCS xtensa_task_start.c xtensa_pthread_start.c)
|
||||||
xtensa_pthread_start.c)
|
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||||
|
list(APPEND SRCS xtensa_signal_dispatch.c)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(arch PRIVATE ${SRCS})
|
target_sources(arch PRIVATE ${SRCS})
|
||||||
|
|||||||
@@ -37,13 +37,17 @@ CMN_CSRCS += xtensa_getintstack.c xtensa_initialize.c xtensa_initialstate.c
|
|||||||
CMN_CSRCS += xtensa_irqdispatch.c xtensa_lowputs.c
|
CMN_CSRCS += xtensa_irqdispatch.c xtensa_lowputs.c
|
||||||
CMN_CSRCS += xtensa_modifyreg8.c xtensa_modifyreg16.c xtensa_modifyreg32.c
|
CMN_CSRCS += xtensa_modifyreg8.c xtensa_modifyreg16.c xtensa_modifyreg32.c
|
||||||
CMN_CSRCS += xtensa_mpu.c xtensa_nputs.c xtensa_oneshot.c xtensa_perf.c
|
CMN_CSRCS += xtensa_mpu.c xtensa_nputs.c xtensa_oneshot.c xtensa_perf.c
|
||||||
CMN_CSRCS += xtensa_releasestack.c xtensa_registerdump.c xtensa_sigdeliver.c
|
CMN_CSRCS += xtensa_releasestack.c xtensa_registerdump.c
|
||||||
CMN_CSRCS += xtensa_swint.c xtensa_stackframe.c
|
CMN_CSRCS += xtensa_swint.c xtensa_stackframe.c
|
||||||
CMN_CSRCS += xtensa_saveusercontext.c xtensa_schedsigaction.c
|
CMN_CSRCS += xtensa_saveusercontext.c
|
||||||
CMN_CSRCS += xtensa_usestack.c xtensa_tcbinfo.c
|
CMN_CSRCS += xtensa_usestack.c xtensa_tcbinfo.c
|
||||||
|
|
||||||
# Configuration-dependent common Xtensa files
|
# Configuration-dependent common Xtensa files
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||||
|
CMN_CSRCS += xtensa_schedsigaction.c xtensa_sigdeliver.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_USE_TEXT_HEAP),y)
|
ifeq ($(CONFIG_ARCH_USE_TEXT_HEAP),y)
|
||||||
CMN_ASRCS += xtensa_loadstore.S
|
CMN_ASRCS += xtensa_loadstore.S
|
||||||
endif
|
endif
|
||||||
@@ -80,5 +84,8 @@ endif
|
|||||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||||
CMN_UASRCS += xtensa_signal_handler.S
|
CMN_UASRCS += xtensa_signal_handler.S
|
||||||
CMN_ASRCS += xtensa_dispatch_syscall.S
|
CMN_ASRCS += xtensa_dispatch_syscall.S
|
||||||
CMN_CSRCS += xtensa_signal_dispatch.c xtensa_task_start.c xtensa_pthread_start.c
|
CMN_CSRCS += xtensa_task_start.c xtensa_pthread_start.c
|
||||||
|
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||||
|
CMN_CSRCS += xtensa_signal_dispatch.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ g_intstacktop:
|
|||||||
* signal context (ref: xtensa_schedulesigaction.c):
|
* signal context (ref: xtensa_schedulesigaction.c):
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if CONFIG_ARCH_INTERRUPTSTACK < 15
|
#if (CONFIG_ARCH_INTERRUPTSTACK < 15) && defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||||
addi sp, sp, -XCPTCONTEXT_SIZE
|
addi sp, sp, -XCPTCONTEXT_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ g_intstacktop:
|
|||||||
|
|
||||||
addi sp, sp, XCHAL_NUM_INTERRUPTS / 8
|
addi sp, sp, XCHAL_NUM_INTERRUPTS / 8
|
||||||
|
|
||||||
#if CONFIG_ARCH_INTERRUPTSTACK < 15
|
#if (CONFIG_ARCH_INTERRUPTSTACK < 15) && defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||||
addi sp, sp, XCPTCONTEXT_SIZE
|
addi sp, sp, XCPTCONTEXT_SIZE
|
||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <arch/syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
#if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@@ -74,4 +74,4 @@ void up_signal_dispatch(_sa_sigaction_t sighand, int signo,
|
|||||||
(uintptr_t)info, (uintptr_t)ucontext);
|
(uintptr_t)info, (uintptr_t)ucontext);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_BUILD_FLAT && __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user