Page MenuHomeFreeBSD

linuxkpi: Add more `struct folio`-related functions
Needs RevisionPublic

Authored by dumbbell on Thu, Apr 16, 8:58 PM.
Tags
None
Referenced Files
F153497844: D56438.diff
Tue, Apr 21, 11:41 AM
Unknown Object (File)
Mon, Apr 20, 7:40 PM
Unknown Object (File)
Mon, Apr 20, 3:10 AM
Unknown Object (File)
Sun, Apr 19, 8:26 AM
Unknown Object (File)
Sat, Apr 18, 9:46 AM
Unknown Object (File)
Sat, Apr 18, 6:14 AM
Unknown Object (File)
Sat, Apr 18, 6:12 AM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
Summary

The i915 DRM driver started to replace the use of struct page by struct folio in its GEM shmem code in Linux 6.12. linuxkpi were missing a few more functions: kmap_local_folio(), memcpy_to_folio() and offset_in_folio(). They are equivalent of their struct page counterparts.

One difference is that kmap_local_folio() takes an offset argument and the returned address takes this offset into account.

This is part of the update of DRM drivers to Linux 6.12.

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bz requested changes to this revision.Mon, Apr 20, 9:51 PM
bz added a subscriber: bz.

I wonder when it'll bite us that we implement folio using page and not page using folio...

sys/compat/linuxkpi/common/include/linux/highmem.h
106
110

I'd also remove the empty line.

This revision now requires changes to proceed.Mon, Apr 20, 9:51 PM