svn commit: r332079 - head/sys/compat/linuxkpi/common/include/asm

Mark Johnston markj at FreeBSD.org
Thu Apr 5 17:26:04 UTC 2018


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_ */


More information about the svn-src-all mailing list