Page MenuHomeFreeBSD

LinuxKPI: add fsleep()
ClosedPublic

Authored by bz on Jul 27 2021, 3:26 PM.

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 40714
Build 37603: arc lint + arc unit

Event Timeline

bz requested review of this revision.Jul 27 2021, 3:26 PM
sys/compat/linuxkpi/common/include/linux/delay.h
82

IMO the scaling by hz deserves a comment

hselasky added inline comments.
sys/compat/linuxkpi/common/include/linux/delay.h
83

Do you have to use DELAY() ? Else use pause_sbt!

bz marked 2 inline comments as done.Jul 27 2021, 6:26 PM
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/delay.h
82

will do if it'll survive the update triggered by @hselasky (see below).

83

I think the idea is to have a busy loop if the timeouts are small enough; now you asking make me notice that the code from this file had changed under my branch. I'll update and make this more fine grained after all.

bz marked 2 inline comments as done.

Change the logic using the previously missed updated implementations
in this file. Still keep it cut down (just the other way round).
This automatically addresses the comment from @hselasky and @emaste.

This revision is now accepted and ready to land.Jul 28 2021, 1:12 PM
This revision was automatically updated to reflect the committed changes.