]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
um: vdso: Remove getcpu support on x86
authorTiwei Bie <tiwei.btw@antgroup.com>
Mon, 27 Oct 2025 00:18:13 +0000 (08:18 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 27 Oct 2025 15:41:53 +0000 (16:41 +0100)
We are going to support SMP on UML/x86, so we can't hard code
the CPU and NUMA node in __vdso_getcpu() anymore. Let's just
remove it and let applications fall back to the syscall.

Suggested-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20251027001815.1666872-7-tiwei.bie@linux.dev
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/x86/um/vdso/um_vdso.c
arch/x86/um/vdso/vdso.lds.S

index 02d41fdb5655b4f10150885bab72ccc89b1411f5..ca1468865b1400bcc8f14a0d7a90654a68a31aa8 100644 (file)
 
 #include <vdso/gettime.h>
 #include <linux/time.h>
-#include <linux/getcpu.h>
 #include <asm/unistd.h>
 
-/* workaround for -Wmissing-prototypes warnings */
-long __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused);
-
 int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 {
        long ret;
@@ -56,21 +52,3 @@ __kernel_old_time_t __vdso_time(__kernel_old_time_t *t)
        return secs;
 }
 __kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alias("__vdso_time")));
-
-long
-__vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused)
-{
-       /*
-        * UML does not support SMP, we can cheat here. :)
-        */
-
-       if (cpu)
-               *cpu = 0;
-       if (node)
-               *node = 0;
-
-       return 0;
-}
-
-long getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *tcache)
-       __attribute__((weak, alias("__vdso_getcpu")));
index 73c508587a984079ce25cbf697a65a3ae3f61e47..401600effc0a7d6c19e1470616c25cb53540cedd 100644 (file)
@@ -22,8 +22,6 @@ VERSION {
                __vdso_clock_gettime;
                gettimeofday;
                __vdso_gettimeofday;
-               getcpu;
-               __vdso_getcpu;
                time;
                __vdso_time;
        local: *;