mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 06:55:13 +08:00
7e300dabb7
Based on 1 normalized pattern(s): subject to the gnu public license v 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 9 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528171440.130801526@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 lines
496 B
C
23 lines
496 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright 2006 Andi Kleen, SUSE Labs.
|
|
*
|
|
* Fast user context implementation of getcpu()
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/getcpu.h>
|
|
#include <linux/time.h>
|
|
#include <asm/vgtod.h>
|
|
|
|
notrace long
|
|
__vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
|
|
{
|
|
vdso_read_cpunode(cpu, node);
|
|
|
|
return 0;
|
|
}
|
|
|
|
long getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
|
|
__attribute__((weak, alias("__vdso_getcpu")));
|