From b6bc460b2c1387a0e7ac83b5cbab355a48799581 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 14 Mar 2022 21:28:17 +0800 Subject: [PATCH] arch: Make the comment and definition of CONFIG_SYS_RESERVED correctly Signed-off-by: Xiang Xiao --- arch/arm/include/syscall.h | 2 +- arch/ceva/include/syscall.h | 2 +- arch/mips/include/syscall.h | 6 ++++-- arch/misoc/include/syscall.h | 4 +++- arch/risc-v/include/syscall.h | 2 +- arch/sparc/include/syscall.h | 4 +++- arch/xtensa/include/syscall.h | 14 ++------------ 7 files changed, 15 insertions(+), 19 deletions(-) diff --git a/arch/arm/include/syscall.h b/arch/arm/include/syscall.h index 9bcd1d0469..b998da7e04 100644 --- a/arch/arm/include/syscall.h +++ b/arch/arm/include/syscall.h @@ -52,7 +52,7 @@ /* This logic uses three system calls {0,1,2} for context switching and one * for the syscall return. * So a minimum of four syscall values must be reserved. - * If CONFIG_BUILD_PROTECTED is defined, then four more syscall values must + * If CONFIG_BUILD_FLAT isn't defined, then four more syscall values must * be reserved. */ diff --git a/arch/ceva/include/syscall.h b/arch/ceva/include/syscall.h index 3276d0049e..7fc3c672b2 100644 --- a/arch/ceva/include/syscall.h +++ b/arch/ceva/include/syscall.h @@ -44,7 +44,7 @@ /* This logic uses three system calls {0,1,2} for context switching and one * for the syscall return. * So a minimum of four syscall values must be reserved. - * If CONFIG_BUILD_PROTECTED is defined, then four more syscall values + * If CONFIG_BUILD_FLAT isn't defined, then four more syscall values * must be reserved. */ diff --git a/arch/mips/include/syscall.h b/arch/mips/include/syscall.h index aa890698d0..18039c7693 100644 --- a/arch/mips/include/syscall.h +++ b/arch/mips/include/syscall.h @@ -49,8 +49,10 @@ * must, therefore, be reserved (0 is not used). */ -#ifdef CONFIG_BUILD_KERNEL +#ifndef CONFIG_BUILD_FLAT # define CONFIG_SYS_RESERVED 4 +#else +# define CONFIG_SYS_RESERVED 3 #endif /* sys_call macros **********************************************************/ @@ -112,7 +114,7 @@ /* System call SYS_ argument and six additional parameters. */ -#define sys_call5(nbr,parm1,parm2,parm3,parm4,parm5,parm6) __extension__({ \ +#define sys_call6(nbr,parm1,parm2,parm3,parm4,parm5,parm6) __extension__({ \ uintptr_t __result; \ __asm__ __volatile__ (\ "\tmove $4, %0\n" \ diff --git a/arch/misoc/include/syscall.h b/arch/misoc/include/syscall.h index d9dc583c04..8125775643 100644 --- a/arch/misoc/include/syscall.h +++ b/arch/misoc/include/syscall.h @@ -49,8 +49,10 @@ * must, therefore, be reserved (0 is not used). */ -#ifdef CONFIG_BUILD_KERNEL +#ifndef CONFIG_BUILD_FLAT # define CONFIG_SYS_RESERVED 4 +#else +# define CONFIG_SYS_RESERVED 3 #endif /* sys_call macros **********************************************************/ diff --git a/arch/risc-v/include/syscall.h b/arch/risc-v/include/syscall.h index 00ab6ead31..00c9d79b61 100644 --- a/arch/risc-v/include/syscall.h +++ b/arch/risc-v/include/syscall.h @@ -45,7 +45,7 @@ /* This logic uses three system calls {0,1,2} for context switching and one * for the syscall return. So a minimum of four syscall values must be - * reserved. If CONFIG_BUILD_PROTECTED is defined, then four more syscall + * reserved. If CONFIG_BUILD_FLAT isn't defined, then four more syscall * values must be reserved. */ diff --git a/arch/sparc/include/syscall.h b/arch/sparc/include/syscall.h index d867b20ae0..ade5ce1eb8 100644 --- a/arch/sparc/include/syscall.h +++ b/arch/sparc/include/syscall.h @@ -49,8 +49,10 @@ * therefore, be reserved (0 is not used). */ -#ifdef CONFIG_BUILD_KERNEL +#ifndef CONFIG_BUILD_FLAT # define CONFIG_SYS_RESERVED 4 +#else +# define CONFIG_SYS_RESERVED 3 #endif /* sys_call macros **********************************************************/ diff --git a/arch/xtensa/include/syscall.h b/arch/xtensa/include/syscall.h index 1fdf664314..e2a328504d 100644 --- a/arch/xtensa/include/syscall.h +++ b/arch/xtensa/include/syscall.h @@ -45,23 +45,13 @@ #define SYS_syscall 0x00 -/* The SYS_signal_handler_return is executed here... its value is not always - * available in this context and so is assumed to be 7. - */ - -#ifndef SYS_signal_handler_return -# define SYS_signal_handler_return (7) -#elif SYS_signal_handler_return != 7 -# error "SYS_signal_handler_return was assumed to be 7" -#endif - /* This logic uses three system calls {0,1,2} for context switching and one * for the syscall return. So a minimum of four syscall values must be - * reserved. If CONFIG_BUILD_PROTECTED is defined, then four more syscall + * reserved. If CONFIG_BUILD_FLAT isn't defined, then four more syscall * values must be reserved. */ -#ifdef CONFIG_BUILD_PROTECTED +#ifndef CONFIG_BUILD_FLAT # define CONFIG_SYS_RESERVED 8 #else # define CONFIG_SYS_RESERVED 4