Page MenuHomeFreeBSD

D22972.diff
No OneTemporary

D22972.diff

Index: head/sys/amd64/linux/linux_dummy.c
===================================================================
--- head/sys/amd64/linux/linux_dummy.c
+++ head/sys/amd64/linux/linux_dummy.c
@@ -102,8 +102,6 @@
DUMMY(vmsplice);
/* Linux 2.6.18: */
DUMMY(move_pages);
-/* Linux 2.6.19: */
-DUMMY(getcpu);
/* Linux 2.6.22: */
DUMMY(signalfd);
/* Linux 2.6.27: */
Index: head/sys/amd64/linux32/linux32_dummy.c
===================================================================
--- head/sys/amd64/linux32/linux32_dummy.c
+++ head/sys/amd64/linux32/linux32_dummy.c
@@ -108,8 +108,6 @@
DUMMY(vmsplice);
/* Linux 2.6.18: */
DUMMY(move_pages);
-/* Linux 2.6.19: */
-DUMMY(getcpu);
/* Linux 2.6.22: */
DUMMY(signalfd);
/* Linux 2.6.27: */
Index: head/sys/arm64/linux/linux_dummy.c
===================================================================
--- head/sys/arm64/linux/linux_dummy.c
+++ head/sys/arm64/linux/linux_dummy.c
@@ -104,8 +104,6 @@
DUMMY(vmsplice);
/* Linux 2.6.18: */
DUMMY(move_pages);
-/* Linux 2.6.19: */
-DUMMY(getcpu);
/* Linux 2.6.27: */
DUMMY(signalfd4);
DUMMY(inotify_init1);
Index: head/sys/compat/linux/linux_misc.c
===================================================================
--- head/sys/compat/linux/linux_misc.c
+++ head/sys/compat/linux/linux_misc.c
@@ -2353,3 +2353,19 @@
td->td_retval[0] = dst - args->buf;
return (error);
}
+
+int
+linux_getcpu(struct thread *td, struct linux_getcpu_args *args)
+{
+ int cpu, error, node;
+
+ cpu = td->td_oncpu; /* Make sure it doesn't change during copyout(9) */
+ error = 0;
+ node = 0; /* XXX: Fake NUMA node 0 for now */
+
+ if (args->cpu != NULL)
+ error = copyout(&cpu, args->cpu, sizeof(l_int));
+ if (args->node != NULL)
+ error = copyout(&node, args->node, sizeof(l_int));
+ return (error);
+}
Index: head/sys/i386/linux/linux_dummy.c
===================================================================
--- head/sys/i386/linux/linux_dummy.c
+++ head/sys/i386/linux/linux_dummy.c
@@ -104,8 +104,6 @@
DUMMY(vmsplice);
/* Linux 2.6.18: */
DUMMY(move_pages);
-/* Linux 2.6.19: */
-DUMMY(getcpu);
/* Linux 2.6.22: */
DUMMY(signalfd);
/* Linux 2.6.27: */

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 1:17 AM (21 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16069986
Default Alt Text
D22972.diff (2 KB)

Event Timeline