Page MenuHomeFreeBSD

LinuxKPI: Create dma_unmap_page_attrs function, new drm-kmod patches use this function.
ClosedPublic

Authored by siri_racha.ca on Wed, Jun 3, 5:04 PM.
Referenced Files
Unknown Object (File)
Thu, Jun 11, 12:07 PM
Unknown Object (File)
Thu, Jun 11, 1:40 AM
Unknown Object (File)
Tue, Jun 9, 8:34 PM
Unknown Object (File)
Mon, Jun 8, 11:29 AM
Unknown Object (File)
Sun, Jun 7, 4:43 PM
Unknown Object (File)
Sat, Jun 6, 10:08 PM
Unknown Object (File)
Sat, Jun 6, 2:45 AM
Unknown Object (File)
Thu, Jun 4, 4:51 PM

Details

Summary

There is are functions dma_map_page_attrs, dma_map_page, and dma_unmap_page. However, there is no dma_unmap_page_attrs function. Some drivers from Linux make use of this function, so I patched it in.

This function started being used in this patch; https://racha.ca/patches/0710-drm-amdgpu-Fix-dummy_read_page-overlapping-mappings.patch

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Do you need it for any specific driver or is it just because?

I think the idea is to only implement what is really needed as everything we implement we need to maintain and it is very hard to figure out what is dead code.

In D57416#1315551, @bz wrote:

Do you need it for any specific driver or is it just because?

This is for drm-kmod, when I was bringing over some changes they switched to using dma_unmap_page_attrs in two functions, and although I could've changed the code within drm-kmod to use dma_map_page instead, I don't think that's a good long term choice as that'd result in a small divergence form the upstream.

Here is the patch in question; https://racha.ca/patches/0710-drm-amdgpu-Fix-dummy_read_page-overlapping-mappings.patch

I think the idea is to only implement what is really needed as everything we implement we need to maintain and it is very hard to figure out what is dead code.

I agree we shouldn't add in dead code which isn't used.

siri_racha.ca retitled this revision from LinuxKPI: Create dma_unmap_page_attrs function to LinuxKPI: Create dma_unmap_page_attrs function, new drm-kmod patches use this function. .Wed, Jun 3, 9:01 PM
siri_racha.ca edited the summary of this revision. (Show Details)
bz added a reviewer: linuxkpi.
This revision is now accepted and ready to land.Wed, Jun 3, 9:04 PM