Skip to content

Commit

Permalink
x86-64: Wire up getcpu syscall
Browse files Browse the repository at this point in the history
getcpu is available as a vdso entry and an emulated vsyscall.
Programs that for some reason don't want to use the vdso should
still be able to call getcpu without relying on the slow emulated
vsyscall.  It costs almost nothing to expose it as a real syscall.

We also need this for the following patch in vsyscall=native mode.

Signed-off-by: Andy Lutomirski <luto@mit.edu>
Link: http://lkml.kernel.org/r/6b19f55bdb06a0c32c2fa6dba9b6f222e1fde999.1312988155.git.luto@mit.edu
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
amluto authored and H. Peter Anvin committed Aug 11, 2011
1 parent f3fb5b7 commit fce8dc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/include/asm/unistd_64.h
Expand Up @@ -681,6 +681,8 @@ __SYSCALL(__NR_syncfs, sys_syncfs)
__SYSCALL(__NR_sendmmsg, sys_sendmmsg)
#define __NR_setns 308
__SYSCALL(__NR_setns, sys_setns)
#define __NR_getcpu 309
__SYSCALL(__NR_getcpu, sys_getcpu)

#ifndef __NO_STUBS
#define __ARCH_WANT_OLD_READDIR
Expand Down

0 comments on commit fce8dc0

Please sign in to comment.