History log of /src/sys/compat/linuxkpi/common/include/linux/module.h (Results 1 – 25 of 33)
Revision Date Author Comments
# 1f4fbcf3 26-Jan-2026 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h

Move the MODULE_DEVICE_TABLE macro to module.h where it belongs
in preparation for different bus (e.g., USB, SDIO) support.
The various stru

LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h

Move the MODULE_DEVICE_TABLE macro to module.h where it belongs
in preparation for different bus (e.g., USB, SDIO) support.
The various struct <bus>_device_id, if not elsewhere, should be
defined in mod_devicetable.h.

This is the next step after 2f5666c1727c.

No functional changes.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D54900

show more ...


# 28a59100 06-Mar-2024 Austin Shafer <ashafer@badland.io>

linuxkpi: Provide a non-NULL value for THIS_MODULE

THIS_MODULE is used to differentiate modules on Linux. We currently
completely stub out any Linux struct module usage, but THIS_MODULE
is still use

linuxkpi: Provide a non-NULL value for THIS_MODULE

THIS_MODULE is used to differentiate modules on Linux. We currently
completely stub out any Linux struct module usage, but THIS_MODULE
is still used to populate the "owner" fields of various drivers.
Even though we don't actually dereference these "owner" fields they
are still used by drivers to check if devices/dmabufs/etc come
from different modules. For example, during DRM GEM import some
drivers check if the dmabuf's owner matches the dev's owner. If
they match because they are both NULL drivers may incorrectly think
two resources come from the same module.

This adds a general purpose __this_linker_file which will point to
the linker file of the module that uses it. We can then use that
pointer to have a valid value for THIS_MODULE.

Reviewed by: bz, jhb
Differential Revision: https://reviews.freebsd.org/D44306

show more ...


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# f6fb9b52 22-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add MODULE_IMPORT_NS()

Add dummy MODULE_IMPORT_NS() used by an updated iwlwifi.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https:/

LinuxKPI: add MODULE_IMPORT_NS()

Add dummy MODULE_IMPORT_NS() used by an updated iwlwifi.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34349

show more ...


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# df38ada2 17-Nov-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

modules: increase MAXMODNAME and provide backward compat

With various firmware files used by graphics and wireless drivers
we are exceeding the current 32 character module name (file path
in kldxref

modules: increase MAXMODNAME and provide backward compat

With various firmware files used by graphics and wireless drivers
we are exceeding the current 32 character module name (file path
in kldxref) length.
In order to overcome this issue bump it to the maximum path length
for the next version.
To be able to MFC provide backward compat support for another version
of the struct as the offsets for the second half change due to the
array size increase.

MAXMODNAME being defined to MAXPATHLEN needs param.h to be
included first. With only 7 modules (or LinuxKPI module.h) not
doing that adjust them rather than including param.h in module.h [1].

Reported by: Greg V (greg unrelenting.technology)
Sponsored by: The FreeBSD Foundation
Suggested by: imp [1]
MFC after: 10 days
Reviewed by: imp (and others to different level)
Differential Revision: https://reviews.freebsd.org/D32383

show more ...


# c5eec7b5 25-Oct-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: module.h add MODULE_SUPPORTED_DEVICE()

Add a dummy MODULE_SUPPORTED_DEVICE define as we do for other
MODULE_* macros. This is needed by a wireless driver.

MFC after: 3 days
Differential

LinuxKPI: module.h add MODULE_SUPPORTED_DEVICE()

Add a dummy MODULE_SUPPORTED_DEVICE define as we do for other
MODULE_* macros. This is needed by a wireless driver.

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D32641

show more ...


# 43b4c006 24-May-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: extract stringify() in their own header file

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the s

LinuxKPI: extract stringify() in their own header file

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the stringify macros are already used without linuxkpi.

I have adjusted the Copyright of the new file according to the commit
originaly adding the macros (99e690772adbcb78c9e8441bedcf1913d72ea72f).

Sposnored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30440

show more ...


# 28a59100 06-Mar-2024 Austin Shafer <ashafer@badland.io>

linuxkpi: Provide a non-NULL value for THIS_MODULE

THIS_MODULE is used to differentiate modules on Linux. We currently
completely stub out any Linux struct module usage, but THIS_MODULE
is still use

linuxkpi: Provide a non-NULL value for THIS_MODULE

THIS_MODULE is used to differentiate modules on Linux. We currently
completely stub out any Linux struct module usage, but THIS_MODULE
is still used to populate the "owner" fields of various drivers.
Even though we don't actually dereference these "owner" fields they
are still used by drivers to check if devices/dmabufs/etc come
from different modules. For example, during DRM GEM import some
drivers check if the dmabuf's owner matches the dev's owner. If
they match because they are both NULL drivers may incorrectly think
two resources come from the same module.

This adds a general purpose __this_linker_file which will point to
the linker file of the module that uses it. We can then use that
pointer to have a valid value for THIS_MODULE.

Reviewed by: bz, jhb
Differential Revision: https://reviews.freebsd.org/D44306

show more ...


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# f6fb9b52 22-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add MODULE_IMPORT_NS()

Add dummy MODULE_IMPORT_NS() used by an updated iwlwifi.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https:/

LinuxKPI: add MODULE_IMPORT_NS()

Add dummy MODULE_IMPORT_NS() used by an updated iwlwifi.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34349

show more ...


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# df38ada2 17-Nov-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

modules: increase MAXMODNAME and provide backward compat

With various firmware files used by graphics and wireless drivers
we are exceeding the current 32 character module name (file path
in kldxref

modules: increase MAXMODNAME and provide backward compat

With various firmware files used by graphics and wireless drivers
we are exceeding the current 32 character module name (file path
in kldxref) length.
In order to overcome this issue bump it to the maximum path length
for the next version.
To be able to MFC provide backward compat support for another version
of the struct as the offsets for the second half change due to the
array size increase.

MAXMODNAME being defined to MAXPATHLEN needs param.h to be
included first. With only 7 modules (or LinuxKPI module.h) not
doing that adjust them rather than including param.h in module.h [1].

Reported by: Greg V (greg unrelenting.technology)
Sponsored by: The FreeBSD Foundation
Suggested by: imp [1]
MFC after: 10 days
Reviewed by: imp (and others to different level)
Differential Revision: https://reviews.freebsd.org/D32383

show more ...


# c5eec7b5 25-Oct-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: module.h add MODULE_SUPPORTED_DEVICE()

Add a dummy MODULE_SUPPORTED_DEVICE define as we do for other
MODULE_* macros. This is needed by a wireless driver.

MFC after: 3 days
Differential

LinuxKPI: module.h add MODULE_SUPPORTED_DEVICE()

Add a dummy MODULE_SUPPORTED_DEVICE define as we do for other
MODULE_* macros. This is needed by a wireless driver.

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D32641

show more ...


# 43b4c006 24-May-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: extract stringify() in their own header file

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the s

LinuxKPI: extract stringify() in their own header file

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the stringify macros are already used without linuxkpi.

I have adjusted the Copyright of the new file according to the commit
originaly adding the macros (99e690772adbcb78c9e8441bedcf1913d72ea72f).

Sposnored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30440

show more ...


# a041e75a 07-Jun-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Move the EXPORT_SYMBOL_XXX() function macros into own header file.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight

Move the EXPORT_SYMBOL_XXX() function macros into own header file.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# 4b706099 30-Mar-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Optimise use of Giant in the LinuxKPI.

- Make sure Giant is locked when calling PCI device methods.
Newbus currently requires this.

- Avoid unlocking Giant right before aquiring the sleepqueue lock

Optimise use of Giant in the LinuxKPI.

- Make sure Giant is locked when calling PCI device methods.
Newbus currently requires this.

- Avoid unlocking Giant right before aquiring the sleepqueue lock.
This can save a task switch.

MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


# 8961c483 04-Mar-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement __MODULE_STRING() function macro in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks


# 7e1a02ba 22-Aug-2017 Mark Johnston <markj@FreeBSD.org>

Add some miscellaneous definitions to support the DRM drivers.

MFC after: 1 week


# 9b6197df 21-Jun-2017 Mark Johnston <markj@FreeBSD.org>

Include kmod.h from the LinuxKPI's module.h.

MFC after: 1 week


# cb564d24 30-May-2017 Mark Johnston <markj@FreeBSD.org>

Add some miscellaneous definitions to support DRM drivers.

Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10985


# 8e7baabc 03-Nov-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Make all the LinuxKPI include files compile standalone.

Sponsored by: Mellanox Technologies


# 8d59ecb2 29-Oct-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some M

Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some Makefiles to use new file locations.
- Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn
adds the LinuxKPI to all LINT builds.
- The LinuxKPI can be added to the kernel by setting the
COMPAT_LINUXKPI option. The OFED kernel option no longer builds the
LinuxKPI into the kernel. This was done to keep the build rules for
the LinuxKPI in sys/conf/files simple.
- Extend the LinuxKPI module to include support for USB by moving the
Linux USB compat from usb.ko to linuxkpi.ko.
- Bump the FreeBSD_version.
- A universe kernel build has been done.

Reviewed by: np @ (cxgb and cxgbe related changes only)
Sponsored by: Mellanox Technologies

show more ...


12