Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2018 17:26:03 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r332079 - head/sys/compat/linuxkpi/common/include/asm
Message-ID:  <201804051726.w35HQ3d3034991@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Apr  5 17:26:03 2018
New Revision: 332079
URL: https://svnweb.freebsd.org/changeset/base/332079

Log:
  Fix the definitions of get_cpu() and put_cpu().
  
  They are supposed to disable preemption.
  
  Reported by:	rstone
  MFC after:	5 days

Modified:
  head/sys/compat/linuxkpi/common/include/asm/smp.h

Modified: head/sys/compat/linuxkpi/common/include/asm/smp.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/smp.h	Thu Apr  5 15:52:20 2018	(r332078)
+++ head/sys/compat/linuxkpi/common/include/asm/smp.h	Thu Apr  5 17:26:03 2018	(r332079)
@@ -38,11 +38,11 @@ int	linux_wbinvd_on_all_cpus(void);
 #endif
 
 #define	get_cpu() ({			\
-	sched_pin();			\
+	critical_enter();		\
 	PCPU_GET(cpuid);		\
 })
 
 #define	put_cpu()			\
-	sched_unpin()
+	critical_exit()
 
 #endif /* _ASM_SMP_H_ */



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