arch: Remove SYS_RESERVED from Kconfg

let's arch define the correct value instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-02-25 15:40:21 +08:00 committed by archer
parent 087b9e5ff3
commit 44bd3212d4
46 changed files with 21 additions and 176 deletions

View file

@ -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 ****************************************************/

View file

@ -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 ********************************************************/

View file

@ -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 **********************************************************/

View file

@ -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. */

View file

@ -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 **********************************************************/

View file

@ -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 ******************************************************/

View file

@ -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 **********************************************************/

View file

@ -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. */

View file

@ -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. */

View file

@ -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 ******************************************************/

View file

@ -40,4 +40,3 @@ CONFIG_SCHED_WAITPID=y
CONFIG_START_DAY=8
CONFIG_START_MONTH=6
CONFIG_SYSTEM_NSH=y
CONFIG_SYS_RESERVED=8

View file

@ -40,4 +40,3 @@ CONFIG_SCHED_WAITPID=y
CONFIG_START_DAY=8
CONFIG_START_MONTH=6
CONFIG_SYSTEM_NSH=y
CONFIG_SYS_RESERVED=8

View file

@ -40,4 +40,3 @@ CONFIG_SCHED_WAITPID=y
CONFIG_START_DAY=8
CONFIG_START_MONTH=6
CONFIG_SYSTEM_NSH=y
CONFIG_SYS_RESERVED=8

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -32,20 +32,14 @@
# include <stdint.h>
#endif
#include <arch/syscall.h>
#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.

View file

@ -28,7 +28,6 @@
/* This is just a wrapper around sys/syscall.h and arch/syscall.h */
#include <sys/syscall.h>
#include <arch/syscall.h>
/****************************************************************************
* Pre-processor Definitions

View file

@ -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