Module Name: src
Committed By: riastradh
Date: Wed Jul 24 04:04:30 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/include/linux [riastradh-drm2]: delay.h
Log Message:
Use mdelay for msleep of less than one tick.
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 \
src/sys/external/bsd/drm2/include/linux/delay.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/delay.h
diff -u src/sys/external/bsd/drm2/include/linux/delay.h:1.1.2.5 src/sys/external/bsd/drm2/include/linux/delay.h:1.1.2.6
--- src/sys/external/bsd/drm2/include/linux/delay.h:1.1.2.5 Wed Jul 24 03:44:54 2013
+++ src/sys/external/bsd/drm2/include/linux/delay.h Wed Jul 24 04:04:30 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: delay.h,v 1.1.2.5 2013/07/24 03:44:54 riastradh Exp $ */
+/* $NetBSD: delay.h,v 1.1.2.6 2013/07/24 04:04:30 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -47,12 +47,6 @@ udelay(unsigned int usec)
}
static inline void
-msleep(unsigned int msec)
-{
- (void)kpause("lnxmslep", false, mstohz(msec), NULL);
-}
-
-static inline void
mdelay(unsigned int msec)
{
@@ -63,4 +57,13 @@ mdelay(unsigned int msec)
udelay(1000);
}
+static inline void
+msleep(unsigned int msec)
+{
+ if ((hz < 1000) && (msec < (1000/hz)))
+ mdelay(msec);
+ else
+ (void)kpause("lnxmslep", false, mstohz(msec), NULL);
+}
+
#endif /* _LINUX_DELAY_H_ */