svn commit: r364686 - stable/12/sys/compat/linux

Edward Tomasz Napierala trasz at FreeBSD.org
Mon Aug 24 14:13:21 UTC 2020


Author: trasz
Date: Mon Aug 24 14:13:20 2020
New Revision: 364686
URL: https://svnweb.freebsd.org/changeset/base/364686

Log:
  MFC r356727:
  
  Make linux getcpu(2) report the domain.
  
  Submitted by:	markj
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/12/sys/compat/linux/linux_misc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/12/sys/compat/linux/linux_misc.c	Mon Aug 24 14:05:45 2020	(r364685)
+++ stable/12/sys/compat/linux/linux_misc.c	Mon Aug 24 14:13:20 2020	(r364686)
@@ -2829,7 +2829,7 @@ linux_getcpu(struct thread *td, struct linux_getcpu_ar
 
 	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));


More information about the svn-src-stable-12 mailing list