Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2020 14:13:20 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364686 - stable/12/sys/compat/linux
Message-ID:  <202008241413.07OEDK8m092133@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008241413.07OEDK8m092133>