Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Mar 2018 19:26:41 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330353 - in head/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201803031926.w23JQfrG002847@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sat Mar  3 19:26:40 2018
New Revision: 330353
URL: https://svnweb.freebsd.org/changeset/base/330353

Log:
  Use mstosbt() instead of SBT_1MS in the LinuxKPI to get the last few bits
  of precision.
  
  MFC after:	1 week
  Suggested by:	ian@
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/delay.h
  head/sys/compat/linuxkpi/common/src/linux_schedule.c

Modified: head/sys/compat/linuxkpi/common/include/linux/delay.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/delay.h	Sat Mar  3 18:54:16 2018	(r330352)
+++ head/sys/compat/linuxkpi/common/include/linux/delay.h	Sat Mar  3 19:26:40 2018	(r330353)
@@ -41,7 +41,7 @@ linux_msleep(unsigned int ms)
 	/* guard against invalid values */
 	if (ms == 0)
 		ms = 1;
-	pause_sbt("lnxsleep", SBT_1MS * ms, 0, C_HARDCLOCK);
+	pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK);
 }
 
 #undef msleep

Modified: head/sys/compat/linuxkpi/common/src/linux_schedule.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_schedule.c	Sat Mar  3 18:54:16 2018	(r330352)
+++ head/sys/compat/linuxkpi/common/src/linux_schedule.c	Sat Mar  3 19:26:40 2018	(r330353)
@@ -83,7 +83,7 @@ linux_msleep_interruptible(unsigned int ms)
 	/* guard against invalid values */
 	if (ms == 0)
 		ms = 1;
-	ret = -pause_sbt("lnxsleep", SBT_1MS * ms, 0, C_HARDCLOCK | C_CATCH);
+	ret = -pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK | C_CATCH);
 
 	switch (ret) {
 	case -EWOULDBLOCK:



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