Page MenuHomeFreeBSD

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

Authored by dumbbell on Sun, Mar 8, 1:25 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Sat, Mar 21, 4:40 AM
Unknown Object (File)
Fri, Mar 20, 1:02 AM
Unknown Object (File)
Thu, Mar 19, 10:35 PM
Unknown Object (File)
Tue, Mar 17, 5:41 AM
Unknown Object (File)
Tue, Mar 17, 5:41 AM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
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

Lint
Lint Skipped
Unit
Tests Skipped

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