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)
Feb 5 2024, 8:10 PM
Unknown Object (File)
Feb 4 2024, 12:20 AM
Unknown Object (File)
Jan 29 2024, 9:44 AM
Unknown Object (File)
Jan 29 2024, 9:44 AM
Unknown Object (File)
Jan 29 2024, 9:44 AM
Unknown Object (File)
Jan 29 2024, 9:44 AM
Unknown Object (File)
Dec 20 2023, 5:00 AM
Unknown Object (File)
Dec 19 2023, 3:36 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.