Page MenuHomeFreeBSD

LinuxKPI: pci: implement pcim_iomap()
ClosedPublic

Authored by bz on Aug 21 2025, 8:58 AM.
Tags
None
Referenced Files
F132395276: D52067.id160721.diff
Thu, Oct 16, 1:33 PM
Unknown Object (File)
Mon, Oct 13, 1:55 AM
Unknown Object (File)
Sun, Oct 12, 9:37 AM
Unknown Object (File)
Sun, Oct 12, 9:37 AM
Unknown Object (File)
Sun, Oct 12, 9:37 AM
Unknown Object (File)
Sun, Oct 12, 9:37 AM
Unknown Object (File)
Sat, Oct 11, 10:44 PM
Unknown Object (File)
Fri, Oct 3, 2:57 PM

Details

Summary

Like pci_iomap() add the devres version pcim_iomap() using the former
to get the resource.

Add a helper function to validate that the bar is within a valid range
and sprinkle that check also to other related functions.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Aug 21 2025, 8:58 AM
dumbbell added inline comments.
sys/compat/linuxkpi/common/src/linux_pci.c
873–874

Perhaps we could put the setting of both tables in a static function to not duplicate code? The same logic is already present in linuxkpi_pcim_iomap_regions(). What do you think?

Factor out setting table into its own function.

bz marked an inline comment as done.Sep 3 2025, 10:32 PM
This revision is now accepted and ready to land.Sep 4 2025, 4:13 PM
sys/compat/linuxkpi/common/src/linux_pci.c
148

static

This revision was automatically updated to reflect the committed changes.