Date: Wed, 22 Apr 2026 21:08:36 +0000 From: Bjoern A. Zeeb <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org> Subject: git: cdb22409d509 - stable/15 - linuxkpi: Document why <linux/pci.h> can't include <linux/ioport.h> Message-ID: <69e938d4.25ef9.50aa939f@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cdb22409d509cb5f50edc6b8d2b2b8dd1fee1154 commit cdb22409d509cb5f50edc6b8d2b2b8dd1fee1154 Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> AuthorDate: 2026-03-08 09:45:48 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2026-04-22 20:57:02 +0000 linuxkpi: Document why <linux/pci.h> can't include <linux/ioport.h> Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55738 (cherry picked from commit 91e54839545f6cb91bb1a5f768ddd6c1e2420b48) --- sys/compat/linuxkpi/common/include/linux/pci.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index ccbd425de5da..ba68a9ee0dc3 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -60,6 +60,17 @@ #include <linux/pci_ids.h> #include <linux/pm.h> +/* + * <linux/ioport.h> should be included here, like Linux, but we can't have that + * because Linux `struct resource` definition would conflict with FreeBSD + * native definition. + * + * At least the amdgpu DRM driver (amdgpu_isp.c at the time of this writing) + * relies on this indirect include to get the definition of Linux `struct + * resource`. As a workaround, we include <linux/ioport.h> from + * <linux/mfd/core.h>. + */ + #include <linux/kernel.h> /* pr_debug */ struct pci_device_id {home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e938d4.25ef9.50aa939f>
