Page MenuHomeFreeBSD

linuxkpi: Add field `flags` to `struct resource`
ClosedPublic

Authored by dumbbell on Mar 8 2026, 1:25 PM.
Tags
None
Referenced Files
F152635731: D55737.id175005.diff
Thu, Apr 16, 4:20 AM
Unknown Object (File)
Mon, Apr 13, 8:35 PM
Unknown Object (File)
Sun, Apr 12, 9:28 AM
Unknown Object (File)
Sun, Apr 12, 2:45 AM
Unknown Object (File)
Wed, Apr 8, 2:58 AM
Unknown Object (File)
Sun, Apr 5, 1:16 PM
Unknown Object (File)
Sun, Mar 29, 11:54 PM
Unknown Object (File)
Tue, Mar 24, 3:13 PM
Subscribers

Details

Summary

This in the Linux version of struct resource, not the FreeBSD native structure.

The amdgpu DRM driver started to use it in Linux 6.11.

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

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

bz added inline comments.
sys/compat/linuxkpi/common/include/linux/ioport.h
44

What are the flags? Are they defined somewhere? Or are they internal to AMDGPU?

dumbbell added inline comments.
sys/compat/linuxkpi/common/include/linux/ioport.h
44

The flags the DRM driver uses are already defined in <linux/pci.h>.

#define	IORESOURCE_MEM	(1 << SYS_RES_MEMORY)
#define	IORESOURCE_IO	(1 << SYS_RES_IOPORT)
#define	IORESOURCE_IRQ	(1 << SYS_RES_IRQ)

They should be defined in <linux/ioport.h> too, but we can’t include this header in <linux/pci.h>.

This will need a __FreeBSD_version bump.

This revision is now accepted and ready to land.Sun, Mar 29, 11:20 PM
This revision was automatically updated to reflect the committed changes.
dumbbell marked an inline comment as done.