18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright 2006 Andi Kleen, SUSE Labs. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Fast user context implementation of getcpu() 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <linux/kernel.h> 98c2ecf20Sopenharmony_ci#include <linux/getcpu.h> 108c2ecf20Sopenharmony_ci#include <linux/time.h> 118c2ecf20Sopenharmony_ci#include <asm/vgtod.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cinotrace long 148c2ecf20Sopenharmony_ci__vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) 158c2ecf20Sopenharmony_ci{ 168c2ecf20Sopenharmony_ci vdso_read_cpunode(cpu, node); 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci return 0; 198c2ecf20Sopenharmony_ci} 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cilong getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache) 228c2ecf20Sopenharmony_ci __attribute__((weak, alias("__vdso_getcpu"))); 23