Page MenuHomeFreeBSD

linuxkpi: Add mmap_lock.h
ClosedPublic

Authored by manu on Feb 16 2022, 10:29 AM.
Tags
None
Referenced Files
F81575783: D34297.diff
Thu, Apr 18, 8:51 AM
Unknown Object (File)
Tue, Apr 16, 5:58 AM
Unknown Object (File)
Feb 7 2024, 9:24 PM
Unknown Object (File)
Jan 15 2024, 5:02 AM
Unknown Object (File)
Dec 24 2023, 6:07 AM
Unknown Object (File)
Dec 20 2023, 6:50 AM
Unknown Object (File)
Dec 15 2023, 4:14 AM
Unknown Object (File)
Dec 12 2023, 7:06 AM
Subscribers

Details

Summary

This contain mmap_read_lock, mmap_read_unlock and mmap_write_lock_killable
which are abstraction around down_read, up_read and down_write_killable.
Note that in Linux 5.8 mmap_sem was renamed to mmap_lock.
We might want to do the same at some point but some drivers still uses
the old mmap locking API.

MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

manu requested review of this revision.Feb 16 2022, 10:29 AM
wulf added inline comments.
sys/compat/linuxkpi/common/include/linux/mm_types.h
48

Can anonymous union be used to handle both names?

sys/compat/linuxkpi/common/include/linux/mm_types.h
48

Probably yes but using the new API I think that you're not supposed to use or know the underlying name.

Otherwise looks okay to me.

sys/compat/linuxkpi/common/include/linux/mmap_lock.h
30

{{{
#include <linux/mm_types.h>
#include <linux/rwsem.h>
}}}

manu marked an inline comment as done.
This revision is now accepted and ready to land.Feb 16 2022, 1:45 PM
This revision was automatically updated to reflect the committed changes.