From 44bd3212d403a343c1d3544946d04f62b53bb6eb Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 25 Feb 2022 15:40:21 +0800 Subject: [PATCH] arch: Remove SYS_RESERVED from Kconfg let's arch define the correct value instead Signed-off-by: Xiang Xiao --- arch/arm/include/syscall.h | 18 ++++-------------- arch/ceva/include/syscall.h | 18 ++++-------------- arch/mips/include/syscall.h | 6 +----- arch/mips/src/pic32mx/pic32mx_config.h | 16 ---------------- arch/misoc/include/syscall.h | 6 +----- arch/risc-v/include/syscall.h | 18 ++++-------------- arch/sparc/include/syscall.h | 6 +----- arch/sparc/src/bm3803/bm3803-config.h | 16 ---------------- arch/sparc/src/bm3823/bm3823-config.h | 17 ----------------- arch/xtensa/include/syscall.h | 18 ++++-------------- .../imxrt/imxrt1050-evk/configs/knsh/defconfig | 1 - .../imxrt/imxrt1060-evk/configs/knsh/defconfig | 1 - .../imxrt/imxrt1064-evk/configs/knsh/defconfig | 1 - .../lc823450-xgevk/configs/knsh/defconfig | 1 - .../lc823450-xgevk/configs/kostest/defconfig | 1 - .../lc823450-xgevk/configs/krndis/defconfig | 1 - .../lpc4088-devkit/configs/knsh/defconfig | 1 - .../lpc4088-quickstart/configs/knsh/defconfig | 1 - .../open1788/configs/knsh/defconfig | 1 - .../open1788/configs/knxterm/defconfig | 1 - .../pnev5180b/configs/knsh/defconfig | 1 - .../bambino-200e/configs/knsh/defconfig | 1 - .../arm/sam34/sam3u-ek/configs/knsh/defconfig | 1 - boards/arm/sama5/sama5d4-ek/README.txt | 4 ---- .../arm/sama5/sama5d4-ek/configs/elf/defconfig | 1 - .../sama5/sama5d4-ek/configs/knsh/defconfig | 1 - .../samv7/samv71-xult/configs/knsh/defconfig | 1 - .../clicker2-stm32/configs/knsh/defconfig | 1 - .../mikroe-stm32f4/configs/kostest/defconfig | 1 - .../olimex-stm32-p407/configs/kelf/defconfig | 1 - .../configs/kmodule/defconfig | 1 - .../olimex-stm32-p407/configs/knsh/defconfig | 1 - .../stm3240g-eval/configs/knxwm/defconfig | 1 - .../stm32f4discovery/configs/kostest/defconfig | 1 - .../stm32l476vg-disco/configs/knsh/defconfig | 1 - .../stm32l4r9ai-disco/configs/knsh/defconfig | 1 - .../lm3s6965-ek/configs/qemu-kostest/defconfig | 1 - .../configs/qemu-protected/defconfig | 1 - .../c906/smartl-c906/configs/knsh/defconfig | 1 - .../k210/maix-bit/configs/knsh/defconfig | 1 - .../k210/maix-bit/configs/knsh_smp/defconfig | 1 - .../k210/maix-bit/configs/kostest/defconfig | 1 - .../risc-v/mpfs/icicle/configs/knsh/defconfig | 1 - include/sys/syscall.h | 10 ++-------- include/syscall.h | 1 - syscall/Kconfig | 11 ----------- 46 files changed, 21 insertions(+), 176 deletions(-) diff --git a/arch/arm/include/syscall.h b/arch/arm/include/syscall.h index 320455aab8..9bcd1d0469 100644 --- a/arch/arm/include/syscall.h +++ b/arch/arm/include/syscall.h @@ -56,20 +56,10 @@ * be reserved. */ -#ifdef CONFIG_LIB_SYSCALL -# ifdef CONFIG_BUILD_PROTECTED -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 8" -# elif CONFIG_SYS_RESERVED != 8 -# error "CONFIG_SYS_RESERVED must have the value 8" -# endif -# else -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 4" -# elif CONFIG_SYS_RESERVED != 4 -# error "CONFIG_SYS_RESERVED must have the value 4" -# endif -# endif +#ifndef CONFIG_BUILD_FLAT +# define CONFIG_SYS_RESERVED 8 +#else +# define CONFIG_SYS_RESERVED 4 #endif /* Cortex-M system calls ****************************************************/ diff --git a/arch/ceva/include/syscall.h b/arch/ceva/include/syscall.h index 43427189ca..3276d0049e 100644 --- a/arch/ceva/include/syscall.h +++ b/arch/ceva/include/syscall.h @@ -48,20 +48,10 @@ * must be reserved. */ -#ifdef CONFIG_LIB_SYSCALL -# ifdef CONFIG_BUILD_PROTECTED -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 8" -# elif CONFIG_SYS_RESERVED != 8 -# error "CONFIG_SYS_RESERVED must have the value 8" -# endif -# else -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 4" -# elif CONFIG_SYS_RESERVED != 4 -# error "CONFIG_SYS_RESERVED must have the value 4" -# endif -# endif +#ifndef CONFIG_BUILD_FLAT +# define CONFIG_SYS_RESERVED 8 +#else +# define CONFIG_SYS_RESERVED 4 #endif /* CEVA system calls ********************************************************/ diff --git a/arch/mips/include/syscall.h b/arch/mips/include/syscall.h index 8fbb6243af..aa890698d0 100644 --- a/arch/mips/include/syscall.h +++ b/arch/mips/include/syscall.h @@ -50,11 +50,7 @@ */ #ifdef CONFIG_BUILD_KERNEL -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to the value 4" -# elif CONFIG_SYS_RESERVED != 4 -# error "CONFIG_SYS_RESERVED must have the value 4" -# endif +# define CONFIG_SYS_RESERVED 4 #endif /* sys_call macros **********************************************************/ diff --git a/arch/mips/src/pic32mx/pic32mx_config.h b/arch/mips/src/pic32mx/pic32mx_config.h index 397ec23acc..13985138ac 100644 --- a/arch/mips/src/pic32mx/pic32mx_config.h +++ b/arch/mips/src/pic32mx/pic32mx_config.h @@ -470,22 +470,6 @@ # error "CONFIG_PIC32MX_USBPRIO is too large" #endif -/* SYS calls ************************************************************************/ - -/* SYS call 1 and 2 are defined for internal use by the PIC32MX port (see - * arch/mips/include/mips32/syscall.h). In addition, SYS call 3 is the return from - * a SYS call in kernel mode. The first four syscall values must, therefore, be - * reserved (0 is not used). - */ - -#ifdef CONFIG_BUILD_KERNEL -# if !defined(CONFIG_SYS_RESERVED) || CONFIG_SYS_RESERVED < 4 -# error "CONFIG_SYS_RESERVED must be defined to be 4 for a kernel build" -# elif CONFIG_SYS_RESERVED > 4 -# warning "CONFIG_SYS_RESERVED should be defined to be 4 for a kernel build" -# endif -#endif - /* UARTs ****************************************************************************/ /* Don't enable UARTs not supported by the chip. */ diff --git a/arch/misoc/include/syscall.h b/arch/misoc/include/syscall.h index 564c200bad..d9dc583c04 100644 --- a/arch/misoc/include/syscall.h +++ b/arch/misoc/include/syscall.h @@ -50,11 +50,7 @@ */ #ifdef CONFIG_BUILD_KERNEL -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to the value 4" -# elif CONFIG_SYS_RESERVED != 4 -# error "CONFIG_SYS_RESERVED must have the value 4" -# endif +# define CONFIG_SYS_RESERVED 4 #endif /* sys_call macros **********************************************************/ diff --git a/arch/risc-v/include/syscall.h b/arch/risc-v/include/syscall.h index 3bd5189cd1..00ab6ead31 100644 --- a/arch/risc-v/include/syscall.h +++ b/arch/risc-v/include/syscall.h @@ -49,20 +49,10 @@ * values must be reserved. */ -#ifdef CONFIG_LIB_SYSCALL -# ifdef CONFIG_BUILD_PROTECTED -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 8" -# elif CONFIG_SYS_RESERVED != 8 -# error "CONFIG_SYS_RESERVED must have the value 8" -# endif -# else -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 4" -# elif CONFIG_SYS_RESERVED != 4 -# error "CONFIG_SYS_RESERVED must have the value 4" -# endif -# endif +#ifndef CONFIG_BUILD_FLAT +# define CONFIG_SYS_RESERVED 8 +#else +# define CONFIG_SYS_RESERVED 4 #endif /* RV64GC system calls ******************************************************/ diff --git a/arch/sparc/include/syscall.h b/arch/sparc/include/syscall.h index 279f3bf9cb..d867b20ae0 100644 --- a/arch/sparc/include/syscall.h +++ b/arch/sparc/include/syscall.h @@ -50,11 +50,7 @@ */ #ifdef CONFIG_BUILD_KERNEL -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to the value 4" -# elif CONFIG_SYS_RESERVED != 4 -# error "CONFIG_SYS_RESERVED must have the value 4" -# endif +# define CONFIG_SYS_RESERVED 4 #endif /* sys_call macros **********************************************************/ diff --git a/arch/sparc/src/bm3803/bm3803-config.h b/arch/sparc/src/bm3803/bm3803-config.h index aaea486262..c23e5cae8d 100644 --- a/arch/sparc/src/bm3803/bm3803-config.h +++ b/arch/sparc/src/bm3803/bm3803-config.h @@ -37,22 +37,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* SYS calls ****************************************************************/ - -/* SYS call 1 and 2 are defined for internal use by the BM3803 port (see - * arch/sparc/include/sparc32/syscall.h). In addition, SYS call 3 is the - * return from a SYS call in kernel mode. The first four syscall values - * must, therefore, be reserved (0 is not used). - */ - -#ifdef CONFIG_BUILD_KERNEL -# if !defined(CONFIG_SYS_RESERVED) || CONFIG_SYS_RESERVED < 4 -# error "CONFIG_SYS_RESERVED must be defined to be 4 for a kernel build" -# elif CONFIG_SYS_RESERVED > 4 -# warning "CONFIG_SYS_RESERVED should be defined to be 4 for a kernel build" -# endif -#endif - /* UARTs ********************************************************************/ /* Don't enable UARTs not supported by the chip. */ diff --git a/arch/sparc/src/bm3823/bm3823-config.h b/arch/sparc/src/bm3823/bm3823-config.h index fe9fe57ed4..b8d20758e5 100644 --- a/arch/sparc/src/bm3823/bm3823-config.h +++ b/arch/sparc/src/bm3823/bm3823-config.h @@ -37,23 +37,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* SYS calls ****************************************************************/ - -/* SYS call 1 and 2 are defined for internal use by the BM3823 port (see - * arch/sparc/include/sparc32/syscall.h). In addition, SYS call 3 is the - * return from a SYS call in kernel mode. The first four syscall values must - * therefore, be - * reserved (0 is not used). - */ - -#ifdef CONFIG_BUILD_KERNEL -# if !defined(CONFIG_SYS_RESERVED) || CONFIG_SYS_RESERVED < 4 -# error "CONFIG_SYS_RESERVED must be defined to be 4 for a kernel build" -# elif CONFIG_SYS_RESERVED > 4 -# warning "CONFIG_SYS_RESERVED should be defined to be 4 for a kernel build" -# endif -#endif - /* UARTs ********************************************************************/ /* Don't enable UARTs not supported by the chip. */ diff --git a/arch/xtensa/include/syscall.h b/arch/xtensa/include/syscall.h index d4330d7e0b..0c0236f300 100644 --- a/arch/xtensa/include/syscall.h +++ b/arch/xtensa/include/syscall.h @@ -61,20 +61,10 @@ * values must be reserved. */ -#ifdef CONFIG_LIB_SYSCALL -# ifdef CONFIG_BUILD_PROTECTED -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 9" -# elif CONFIG_SYS_RESERVED != 8 -# error "CONFIG_SYS_RESERVED must have the value 9" -# endif -# else -# ifndef CONFIG_SYS_RESERVED -# error "CONFIG_SYS_RESERVED must be defined to have the value 4" -# elif CONFIG_SYS_RESERVED != 4 -# error "CONFIG_SYS_RESERVED must have the value 4" -# endif -# endif +#ifdef CONFIG_BUILD_PROTECTED +# define CONFIG_SYS_RESERVED 8 +#else +# define CONFIG_SYS_RESERVED 4 #endif /* Xtensa system calls ******************************************************/ diff --git a/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig b/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig index 458240283e..dc15959e07 100644 --- a/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig +++ b/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig @@ -40,4 +40,3 @@ CONFIG_SCHED_WAITPID=y CONFIG_START_DAY=8 CONFIG_START_MONTH=6 CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig index fde23c33d0..28fcf72482 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig @@ -40,4 +40,3 @@ CONFIG_SCHED_WAITPID=y CONFIG_START_DAY=8 CONFIG_START_MONTH=6 CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig index d9568cb8d8..d44f5c937a 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig @@ -40,4 +40,3 @@ CONFIG_SCHED_WAITPID=y CONFIG_START_DAY=8 CONFIG_START_MONTH=6 CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig index edcde6d508..6fcd3447d1 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig @@ -110,7 +110,6 @@ CONFIG_START_YEAR=2013 CONFIG_SYSTEM_I2CTOOL=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_TIME64=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=24 CONFIG_UART0_RXBUFSIZE=512 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/kostest/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/kostest/defconfig index 6175b52f73..caa220773e 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/kostest/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/kostest/defconfig @@ -40,7 +40,6 @@ CONFIG_START_MONTH=10 CONFIG_START_YEAR=2013 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_TIME64=y -CONFIG_SYS_RESERVED=8 CONFIG_TESTING_OSTEST=y CONFIG_TESTING_OSTEST_NBARRIER_THREADS=3 CONFIG_TESTING_OSTEST_STACKSIZE=2048 diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig index 7e6c85e7f3..fbd5ac77ae 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig @@ -174,7 +174,6 @@ CONFIG_SYSTEM_NSH_SYMTAB_COUNTNAME="g_nsymbols" CONFIG_SYSTEM_NXPLAYER=y CONFIG_SYSTEM_PING=y CONFIG_SYSTEM_TIME64=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=24 CONFIG_TELNET_CHARACTER_MODE=y CONFIG_TESTING_OSTEST=y diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig index d45340e0b0..43f3ea0ac2 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig @@ -56,6 +56,5 @@ CONFIG_START_MONTH=3 CONFIG_START_YEAR=2013 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig index e068060810..86abcb0916 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig @@ -52,6 +52,5 @@ CONFIG_START_MONTH=3 CONFIG_START_YEAR=2013 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig index 4f47d2efc4..2f3b4d0669 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig @@ -56,6 +56,5 @@ CONFIG_START_MONTH=3 CONFIG_START_YEAR=2013 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig index b8719cc1fd..9b73fe9e04 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig @@ -67,6 +67,5 @@ CONFIG_START_MONTH=3 CONFIG_START_YEAR=2019 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_CLE=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/defconfig b/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/defconfig index e9229c5d6d..7706a6b0bb 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/defconfig +++ b/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/defconfig @@ -22,5 +22,4 @@ CONFIG_PASS1_BUILDIR="boards/arm/lpc17xx_40xx/pnev5180b/kernel" CONFIG_RAM_SIZE=32768 CONFIG_RAM_START=0x10000000 CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig b/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig index 0204a7385c..a7d84aad59 100644 --- a/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig +++ b/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig @@ -48,7 +48,6 @@ CONFIG_START_MONTH=7 CONFIG_START_YEAR=2012 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_TIMER=y CONFIG_UART1_SERIAL_CONSOLE=y diff --git a/boards/arm/sam34/sam3u-ek/configs/knsh/defconfig b/boards/arm/sam34/sam3u-ek/configs/knsh/defconfig index fdf13ff654..bdb9590b50 100644 --- a/boards/arm/sam34/sam3u-ek/configs/knsh/defconfig +++ b/boards/arm/sam34/sam3u-ek/configs/knsh/defconfig @@ -47,6 +47,5 @@ CONFIG_START_DAY=10 CONFIG_START_MONTH=3 CONFIG_START_YEAR=2013 CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/arm/sama5/sama5d4-ek/README.txt b/boards/arm/sama5/sama5d4-ek/README.txt index 840d170b43..bd63adb362 100644 --- a/boards/arm/sama5/sama5d4-ek/README.txt +++ b/boards/arm/sama5/sama5d4-ek/README.txt @@ -3847,7 +3847,6 @@ Configurations RTOS Features -> System call support CONFIG_LIB_SYSCALL=y : Enable system call support CONFIG_SYS_NNEST=2 : Max number of nested system calls - CONFIG_SYS_RESERVED=1 : SYStem call 0 is reserved on this platform Application Configurations -> Examples -> ELF Loader Example CONFIG_EXAMPLES_ELF_SYSCALL=y : Link apps with the SYStem call library @@ -4001,9 +4000,6 @@ Configurations CONFIG_INIT_FILEPATH="/bin/init" : The location of the startup CONFIG_SCHED_HAVE_PARENT=y : Needed to handle task exit - RTOS Features -> System call support - CONFIG_SYS_RESERVED=5 : More reserved SYSCALLs - RTOS Features -> RTOS hooks CONFIG_SCHED_ONEXIT=y : Needed to handle task exit CONFIG_SCHED_ONEXIT_MAX=2 diff --git a/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig b/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig index 3f356e8f52..199a5229e8 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig @@ -75,5 +75,4 @@ CONFIG_SCHED_HPWORKPRIORITY=192 CONFIG_SCHED_WAITPID=y CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_READLINE=y -CONFIG_SYS_RESERVED=4 CONFIG_USART3_SERIAL_CONSOLE=y diff --git a/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig b/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig index 0efc437cb6..1bad14b9ed 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig @@ -84,5 +84,4 @@ CONFIG_SCHED_WAITPID=y CONFIG_SDIO_BLOCKSETUP=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_NSH_PROGNAME="init" -CONFIG_SYS_RESERVED=7 CONFIG_USART3_SERIAL_CONSOLE=y diff --git a/boards/arm/samv7/samv71-xult/configs/knsh/defconfig b/boards/arm/samv7/samv71-xult/configs/knsh/defconfig index 39c2076330..27f36c2ba6 100644 --- a/boards/arm/samv7/samv71-xult/configs/knsh/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/knsh/defconfig @@ -81,5 +81,4 @@ CONFIG_START_YEAR=2015 CONFIG_SYSTEM_I2CTOOL=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_RAMTEST=y -CONFIG_SYS_RESERVED=8 CONFIG_USART1_SERIAL_CONSOLE=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig b/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig index fc3af2eb95..a0ed5f6f6f 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig @@ -51,6 +51,5 @@ CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_PWR=y CONFIG_STM32_USART3=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=32 CONFIG_USART3_SERIAL_CONSOLE=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig index 2b1f349f76..b04cf883ca 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig @@ -81,7 +81,6 @@ CONFIG_STM32_USART2=y CONFIG_SYSLOG_CHAR=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=11 CONFIG_TESTING_OSTEST=y CONFIG_USBDEV=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig index e09191cc69..a768c4a04a 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig @@ -56,7 +56,6 @@ CONFIG_STM32_SDIO=y CONFIG_STM32_USART3=y CONFIG_STM32_USBHOST=y CONFIG_SYMTAB_ORDEREDBYNAME=y -CONFIG_SYS_RESERVED=8 CONFIG_USART3_SERIAL_CONSOLE=y CONFIG_USBHOST_ISOC_DISABLE=y CONFIG_USBHOST_MSC=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig index df9462b56f..759b3f903b 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig @@ -51,7 +51,6 @@ CONFIG_STM32_PWR=y CONFIG_STM32_USART3=y CONFIG_STM32_USBHOST=y CONFIG_SYMTAB_ORDEREDBYNAME=y -CONFIG_SYS_RESERVED=8 CONFIG_USART3_SERIAL_CONSOLE=y CONFIG_USBHOST_ISOC_DISABLE=y CONFIG_USBHOST_MSC=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig index f6247e91d3..4b8ce7e265 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig @@ -51,6 +51,5 @@ CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_PWR=y CONFIG_STM32_USART3=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=32 CONFIG_USART3_SERIAL_CONSOLE=y diff --git a/boards/arm/stm32/stm3240g-eval/configs/knxwm/defconfig b/boards/arm/stm32/stm3240g-eval/configs/knxwm/defconfig index facd581a51..62017c19fd 100644 --- a/boards/arm/stm32/stm3240g-eval/configs/knxwm/defconfig +++ b/boards/arm/stm32/stm3240g-eval/configs/knxwm/defconfig @@ -92,7 +92,6 @@ CONFIG_STMPE811_THRESHX=39 CONFIG_STMPE811_THRESHY=51 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_READLINE=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_USART3_RXBUFSIZE=128 CONFIG_USART3_SERIAL_CONSOLE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig b/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig index 96d06bab3b..d827f8123b 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig @@ -38,7 +38,6 @@ CONFIG_START_YEAR=2013 CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_USART2=y CONFIG_SYMTAB_ORDEREDBYNAME=y -CONFIG_SYS_RESERVED=8 CONFIG_TESTING_OSTEST=y CONFIG_TESTING_OSTEST_NBARRIER_THREADS=3 CONFIG_TESTING_OSTEST_STACKSIZE=2048 diff --git a/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig b/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig index 4f4334af3e..c870d1a7dc 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig +++ b/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig @@ -68,6 +68,5 @@ CONFIG_STM32L4_RTC=y CONFIG_STM32L4_SAI1PLL=y CONFIG_STM32L4_USART2=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_USART2_SERIAL_CONSOLE=y diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig index 79b2acdbb6..ee543e3734 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig @@ -73,7 +73,6 @@ CONFIG_STM32L4_SRAM2_HEAP=y CONFIG_STM32L4_UART4=y CONFIG_STM32L4_USART2=y CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=0 CONFIG_UART4_BAUD=2000000 CONFIG_UART4_RXBUFSIZE=512 diff --git a/boards/arm/tiva/lm3s6965-ek/configs/qemu-kostest/defconfig b/boards/arm/tiva/lm3s6965-ek/configs/qemu-kostest/defconfig index d6fb62b2eb..387ec7be5b 100644 --- a/boards/arm/tiva/lm3s6965-ek/configs/qemu-kostest/defconfig +++ b/boards/arm/tiva/lm3s6965-ek/configs/qemu-kostest/defconfig @@ -38,7 +38,6 @@ CONFIG_START_DAY=23 CONFIG_START_MONTH=2 CONFIG_START_YEAR=2022 CONFIG_SYMTAB_ORDEREDBYNAME=y -CONFIG_SYS_RESERVED=8 CONFIG_TESTING_OSTEST=y CONFIG_TESTING_OSTEST_NBARRIER_THREADS=3 CONFIG_TESTING_OSTEST_STACKSIZE=2048 diff --git a/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig b/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig index f29198d069..933e1d560a 100644 --- a/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig +++ b/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig @@ -97,7 +97,6 @@ CONFIG_SYSTEM_NETDB=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_NTPC=y CONFIG_SYSTEM_PING=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=24 CONFIG_TESTING_OSTEST=y CONFIG_TIVA_ETHERNET=y diff --git a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig index bc710cb93a..441d885080 100644 --- a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig @@ -58,7 +58,6 @@ CONFIG_START_DAY=7 CONFIG_START_MONTH=3 CONFIG_START_YEAR=2021 CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=20 CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y diff --git a/boards/risc-v/k210/maix-bit/configs/knsh/defconfig b/boards/risc-v/k210/maix-bit/configs/knsh/defconfig index b3b2b3ecb9..ba1ec56b50 100644 --- a/boards/risc-v/k210/maix-bit/configs/knsh/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/knsh/defconfig @@ -47,7 +47,6 @@ CONFIG_START_DAY=12 CONFIG_START_MONTH=5 CONFIG_START_YEAR=2020 CONFIG_SYSTEM_NSH=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=20 CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y diff --git a/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig b/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig index bdd088b2d8..a62623d914 100644 --- a/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig @@ -52,7 +52,6 @@ CONFIG_START_YEAR=2021 CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_SYSTEM=y CONFIG_SYSTEM_TASKSET=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=20 CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y diff --git a/boards/risc-v/k210/maix-bit/configs/kostest/defconfig b/boards/risc-v/k210/maix-bit/configs/kostest/defconfig index bc86471754..b322781986 100644 --- a/boards/risc-v/k210/maix-bit/configs/kostest/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/kostest/defconfig @@ -43,7 +43,6 @@ CONFIG_STACK_COLORATION=y CONFIG_START_DAY=14 CONFIG_START_MONTH=2 CONFIG_START_YEAR=2020 -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=20 CONFIG_TESTING_OSTEST=y CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/risc-v/mpfs/icicle/configs/knsh/defconfig b/boards/risc-v/mpfs/icicle/configs/knsh/defconfig index b2e691059a..66f90ab782 100644 --- a/boards/risc-v/mpfs/icicle/configs/knsh/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/knsh/defconfig @@ -74,7 +74,6 @@ CONFIG_SYSTEM_CLE_CMD_HISTORY=y CONFIG_SYSTEM_COLOR_CLE=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_TIME64=y -CONFIG_SYS_RESERVED=8 CONFIG_TASK_NAME_SIZE=20 CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 598a5e5fcd..41df7466dc 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -32,20 +32,14 @@ # include #endif +#include + #ifdef CONFIG_LIB_SYSCALL /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Reserve the first system calls for platform-specific usage if so - * configured. - */ - -#ifndef CONFIG_SYS_RESERVED -# define CONFIG_SYS_RESERVED (0) -#endif - /* Note that the reported number of system calls does *NOT* include the * architecture-specific system calls. If the "real" total is required, * use SYS_maxsyscall. diff --git a/include/syscall.h b/include/syscall.h index af2b6e7ce9..545a1c39bc 100644 --- a/include/syscall.h +++ b/include/syscall.h @@ -28,7 +28,6 @@ /* This is just a wrapper around sys/syscall.h and arch/syscall.h */ #include -#include /**************************************************************************** * Pre-processor Definitions diff --git a/syscall/Kconfig b/syscall/Kconfig index 41524f8594..0eb9f1588c 100644 --- a/syscall/Kconfig +++ b/syscall/Kconfig @@ -29,17 +29,6 @@ menuconfig LIB_SYSCALL if LIB_SYSCALL -config SYS_RESERVED - int "Number of reserved system calls" - default 0 - ---help--- - Kernel system calls may share the same software trapping mechanism - as other functions used by architecture port. Those software traps - must be reserved for use exclusively by the architecture. These - value specifies the number of reserved software traps used by the - architecture; number of the kernel system calls will begin with this - number. - config SYS_NNEST int "Number of nested system calls" default 2