HomeFreeBSD

linuxkpi: Add `io_mapping_map_user()` and `remap_pfn_range()`

Description

linuxkpi: Add io_mapping_map_user() and remap_pfn_range()

The code comes from the i915 DRM driver.

In Linux commits b739f125e4ebd73d10ed30a856574e13649119ed and
b12d691ea5e01db42ccf3b4207e57cb3ce7cfe91 (Linux 5.13), the i915 DRM
driver dropped specific implementations to use Linux generic functions.
Therefore I moved the FreeBSD code from that i915 driver to linuxkpi.

However, these commits were later reverted (also in Linux 5.13) so the
i915 driver doesn't use these functions. But perhaps it will help in the
future.

To sum up, the code comes from the i915 DRM driver but it doesn't use it
(i.e. it continues to use its internal implementation).

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38088

(cherry picked from commit b99bc862324526b3ee6fad335618cbe85ad9e11e)

Details

Provenance
dumbbellAuthored on Jan 14 2023, 12:22 PM
Reviewer
manu
Differential Revision
D38088: linuxkpi: Add `io_mapping_map_user()` and `remap_pfn_range()`
Parents
rGa6575008038b: linuxkpi: Add `sysfs_emit()`
Branches
Unknown
Tags
Unknown