Page MenuHomeFreeBSD

linuxkpi: Add mmap_lock.h
ClosedPublic

Authored by manu on Feb 16 2022, 10:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 14, 5:08 AM
Unknown Object (File)
Fri, Dec 27, 9:52 AM
Unknown Object (File)
Mon, Dec 16, 11:54 AM
Unknown Object (File)
Dec 4 2024, 4:10 PM
Unknown Object (File)
Nov 30 2024, 5:28 PM
Unknown Object (File)
Nov 30 2024, 5:07 PM
Unknown Object (File)
Nov 29 2024, 12:48 AM
Unknown Object (File)
Nov 22 2024, 11:12 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.