From 43ad112b936c5516e0a9b968930a6d3387e7d86b Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 13 Jun 2022 11:33:24 -0600 Subject: [PATCH] kboot: use SYS_kexec_load insteaed of __NR_kexec_load Make this regular with the rest of the system calls. Sponsored by: Netflix --- stand/kboot/arch/amd64/syscall_nr.h | 2 +- stand/kboot/arch/powerpc64/syscall_nr.h | 2 +- stand/kboot/host_syscalls.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stand/kboot/arch/amd64/syscall_nr.h b/stand/kboot/arch/amd64/syscall_nr.h index 412fed5001b9..9c4fb1024319 100644 --- a/stand/kboot/arch/amd64/syscall_nr.h +++ b/stand/kboot/arch/amd64/syscall_nr.h @@ -2,6 +2,7 @@ #define SYS_getdents 78 #define SYS_gettimeofday 96 #define SYS_lseek 8 +#define SYS_kexec_load 246 #define SYS_mmap 9 #define SYS_open 2 #define SYS_read 0 @@ -9,7 +10,6 @@ #define SYS_select 23 #define SYS_uname 63 #define SYS_write 1 -#define __NR_kexec_load 246 #define KEXEC_ARCH_X86_64 62 #define KEXEC_ARCH KEXEC_ARCH_X86_64 diff --git a/stand/kboot/arch/powerpc64/syscall_nr.h b/stand/kboot/arch/powerpc64/syscall_nr.h index 1b24ec6165f7..187c434a13d7 100644 --- a/stand/kboot/arch/powerpc64/syscall_nr.h +++ b/stand/kboot/arch/powerpc64/syscall_nr.h @@ -1,6 +1,7 @@ #define SYS_close 6 #define SYS_getdents 141 #define SYS_gettimeofday 78 +#define SYS_kexec_load 268 #define SYS_llseek 140 #define SYS_mmap 90 #define SYS_open 5 @@ -9,7 +10,6 @@ #define SYS_select 142 #define SYS_uname 120 #define SYS_write 4 -#define __NR_kexec_load 268 #define KEXEC_ARCH_PPC64 21 #define KEXEC_ARCH KEXEC_ARCH_PPC64 diff --git a/stand/kboot/host_syscalls.c b/stand/kboot/host_syscalls.c index 53be0c166374..fd14095d7d68 100644 --- a/stand/kboot/host_syscalls.c +++ b/stand/kboot/host_syscalls.c @@ -70,7 +70,7 @@ host_select(int nfds, long *readfds, long *writefds, long *exceptfds, int kexec_load(uint32_t start, int nsegs, uint32_t segs) { - return host_syscall(__NR_kexec_load, start, nsegs, segs, KEXEC_ARCH << 16); + return host_syscall(SYS_kexec_load, start, nsegs, segs, KEXEC_ARCH << 16); } int