mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
The cache parameter of getcpu() is useless nowadays for various reasons. * It is never passed by userspace for either the vDSO or syscalls. * It is never used by the kernel. * It could not be made to work on the current vDSO architecture. * The structure definition is not part of the UAPI headers. * vdso_getcpu() is superseded by restartable sequences in any case. Remove the struct and its header. As a side-effect this gets rid of an unwanted inclusion of the linux/ header namespace from vDSO code. [ tglx: Adapt to s390 upstream changes */ Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390 Link: https://patch.msgid.link/20251230-getcpu_cache-v3-1-fb9c5f880ebe@linutronix.de
21 lines
426 B
C
21 lines
426 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* Copyright IBM Corp. 2020 */
|
|
|
|
#include <linux/compiler.h>
|
|
#include <asm/timex.h>
|
|
#include "vdso.h"
|
|
|
|
int __s390_vdso_getcpu(unsigned *cpu, unsigned *node, void *unused)
|
|
{
|
|
union tod_clock clk;
|
|
|
|
/* CPU number is stored in the programmable field of the TOD clock */
|
|
store_tod_clock_ext(&clk);
|
|
if (cpu)
|
|
*cpu = clk.pf;
|
|
/* NUMA node is always zero */
|
|
if (node)
|
|
*node = 0;
|
|
return 0;
|
|
}
|