Page MenuHomeFreeBSD

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

Authored by dumbbell on Mar 8 2026, 1:25 PM.
Tags
None
Referenced Files
F161616352: D55737.id.diff
Sun, Jul 5, 8:21 AM
F161562550: D55737.diff
Sat, Jul 4, 9:43 PM
F161560540: D55737.id175005.diff
Sat, Jul 4, 9:15 PM
Unknown Object (File)
Sat, Jul 4, 7:16 AM
Unknown Object (File)
Sat, Jun 27, 12:13 AM
Unknown Object (File)
Fri, Jun 26, 11:41 PM
Unknown Object (File)
Fri, Jun 26, 12:21 AM
Unknown Object (File)
Mon, Jun 22, 3:36 AM
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.Mar 29 2026, 11:20 PM
This revision was automatically updated to reflect the committed changes.
dumbbell marked an inline comment as done.