Page MenuHomeFreeBSD

LinuxKPI: add read_poll_timeout()
ClosedPublic

Authored by bz on Jul 1 2021, 1:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 6 2024, 9:25 PM
Unknown Object (File)
Oct 4 2024, 5:23 AM
Unknown Object (File)
Oct 2 2024, 3:14 PM
Unknown Object (File)
Sep 28 2024, 8:57 AM
Unknown Object (File)
Sep 27 2024, 6:50 PM
Unknown Object (File)
Sep 27 2024, 4:25 PM
Unknown Object (File)
Sep 23 2024, 7:36 PM
Unknown Object (File)
Sep 5 2024, 7:43 AM

Details

Summary

Add a partial implementation of read_poll_timeout() which I did at
some point last year for rtw88.

MFC after: 10 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jul 1 2021, 1:31 PM
hselasky added inline comments.
sys/compat/linuxkpi/common/include/linux/iopoll.h
42

Should the code use a sleepable delay in case of non-atomic?

Ping. See my comment.

Sorry, if you need it urgently please feel free to improve/finish the code. I can test quickly if needed. Feel free to push to this review even.

Work on feedback from hselasky and try to finish the implementation
based on descriptions found. I probably should go back and see if the
reworked linux/delay.h functions are more suitable now?

Use usleep_range now so I don't have to deal with pause_sbt()
which probably also wanted the HARDCLOCK hint otherwise.

sys/compat/linuxkpi/common/include/linux/iopoll.h
42

_to -> (_to)

Missing parenthesis.

48

ditto: _us && _early_sleep need parenthesis.

69

ditto.

bz marked 4 inline comments as done.Jul 28 2021, 1:42 PM
hselasky added inline comments.
sys/compat/linuxkpi/common/include/linux/iopoll.h
67

Maybe name internal variables with "__" first?

This revision is now accepted and ready to land.Jul 28 2021, 2:26 PM

Prefix internal variables with __ even though it should not
make a difference given they are inside a block.

This revision now requires review to proceed.Jul 28 2021, 3:16 PM
This revision is now accepted and ready to land.Jul 28 2021, 3:35 PM
This revision was automatically updated to reflect the committed changes.