Date: Wed, 28 Jul 2021 13:37:59 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: cc2723370b48 - main - LinuxKPI: add fsleep() Message-ID: <202107281337.16SDbx8x040553@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cc2723370b482b923b2adeac3ad359d485f0bd82 commit cc2723370b482b923b2adeac3ad359d485f0bd82 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2021-07-27 15:22:02 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2021-07-28 13:35:34 +0000 LinuxKPI: add fsleep() Add fsleep() function now required by rtw88. This seems to be making a decision depending on time to sleep on how to sleep. Given our compat framework already is lenient on how long to sleep, this is a cut down version. MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D31322 --- sys/compat/linuxkpi/common/include/linux/delay.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/delay.h b/sys/compat/linuxkpi/common/include/linux/delay.h index 1ed9dffed359..c13a1797adf9 100644 --- a/sys/compat/linuxkpi/common/include/linux/delay.h +++ b/sys/compat/linuxkpi/common/include/linux/delay.h @@ -76,4 +76,14 @@ usleep_range(unsigned long min, unsigned long max) extern unsigned int linux_msleep_interruptible(unsigned int ms); +static inline void +fsleep(unsigned long us) +{ + + if (us < 10) + udelay(us); + else + usleep_range(us, us); +} + #endif /* _LINUX_DELAY_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107281337.16SDbx8x040553>