alpha: replace NR_SYSCALLS by NR_syscalls
authorYang Yang <yang.yang29@zte.com.cn>
Tue, 29 Mar 2022 02:57:38 +0000 (02:57 +0000)
committerMatt Turner <mattst88@gmail.com>
Tue, 14 Feb 2023 17:37:17 +0000 (12:37 -0500)
Reference to other arch likes x86_64 or arm64 to do this replacement.
To solve compile error when using NR_syscalls in kernel[1].

[1] https://lore.kernel.org/all/202203270449.WBYQF9X3-lkp@intel.com/

Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
Signed-off-by: Matt Turner <mattst88@gmail.com>
arch/alpha/include/asm/unistd.h
arch/alpha/kernel/entry.S
kernel/trace/trace.h

index 986f5da9b7d8b4a6c568e28914bedad459203d17..caabd92ea7093f70af2c427eef1d9ef1bd912742 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <uapi/asm/unistd.h>
 
-#define NR_SYSCALLS    __NR_syscalls
+#define NR_syscalls    __NR_syscalls
 
 #define __ARCH_WANT_NEW_STAT
 #define __ARCH_WANT_OLD_READDIR
index a6207c47f08940d740ed1171f24959e8351867da..cc84337afaecb5e141100620859522a4c6fd56fe 100644 (file)
@@ -454,7 +454,7 @@ entSys:
        SAVE_ALL
        lda     $8, 0x3fff
        bic     $sp, $8, $8
-       lda     $4, NR_SYSCALLS($31)
+       lda     $4, NR_syscalls($31)
        stq     $16, SP_OFF+24($sp)
        lda     $5, sys_call_table
        lda     $27, sys_ni_syscall
@@ -583,7 +583,7 @@ strace:
        ldq     $21, 88($sp)
 
        /* get the system call pointer.. */
-       lda     $1, NR_SYSCALLS($31)
+       lda     $1, NR_syscalls($31)
        lda     $2, sys_call_table
        lda     $27, sys_ni_syscall
        cmpult  $0, $1, $1
index 085a31b978a56e8812c25e667936b3d65d0c5a66..96fa087af41b4660882c766b8aef2a553ef46f41 100644 (file)
@@ -25,7 +25,7 @@
 #include "pid_list.h"
 
 #ifdef CONFIG_FTRACE_SYSCALLS
-#include <asm/unistd.h>                /* For NR_SYSCALLS           */
+#include <asm/unistd.h>                /* For NR_syscalls           */
 #include <asm/syscall.h>       /* some archs define it here */
 #endif