Make linux getcpu(2) report the domain.

Submitted by:	markj
Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23144
This commit is contained in:
Edward Tomasz Napierala 2020-01-14 11:24:06 +00:00
parent 12d9c0dc55
commit 46209ceae5

View File

@ -2354,7 +2354,7 @@ linux_getcpu(struct thread *td, struct linux_getcpu_args *args)
cpu = td->td_oncpu; /* Make sure it doesn't change during copyout(9) */
error = 0;
node = 0; /* XXX: Fake NUMA node 0 for now */
node = cpuid_to_pcpu[cpu]->pc_domain;
if (args->cpu != NULL)
error = copyout(&cpu, args->cpu, sizeof(l_int));