Page MenuHomeFreeBSD

LinuxKPI: pci: implement pcim_iomap()
ClosedPublic

Authored by bz on Thu, Aug 21, 8:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 12, 7:41 AM
Unknown Object (File)
Sat, Sep 6, 12:05 PM
Unknown Object (File)
Sat, Sep 6, 12:09 AM
Unknown Object (File)
Tue, Sep 2, 1:14 PM
Unknown Object (File)
Tue, Aug 26, 9:57 AM
Unknown Object (File)
Mon, Aug 25, 1:22 PM
Unknown Object (File)
Mon, Aug 25, 1:01 PM
Unknown Object (File)
Mon, Aug 25, 9:37 AM

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 Passed
Unit
No Test Coverage
Build Status
Buildable 66803
Build 63686: arc lint + arc unit

Event Timeline

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

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.Wed, Sep 3, 10:32 PM
This revision is now accepted and ready to land.Thu, Sep 4, 4:13 PM
sys/compat/linuxkpi/common/src/linux_pci.c
148

static

This revision was automatically updated to reflect the committed changes.