| #
b5f7a0b0
|
| 17-Aug-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Replicate Linux #includes between headers
The DRM drivers (and probably other parts of the Linux kernel) had a significant cleanup w.r.t. which source file includes what in Linux 6.10. Non
linuxkpi: Replicate Linux #includes between headers
The DRM drivers (and probably other parts of the Linux kernel) had a significant cleanup w.r.t. which source file includes what in Linux 6.10. Nonetheless, the DRM drivers still depend on implicit namespace pollution because some source files do not include all the headers they should.
This cleanup broke the build with FreeBSD because we do not replicate the same `#include` directives everywhere.
This commit adds the same `#include` directives in several headers in order to get the same namespace pollution.
This fixes the build of the DRM drivers from Linux 6.10. An example is `drm_dp_tunnel.c` which needed `str_yes_no()` defined by <linux/string_helpers.h> (technically <linux/string_choices.h> in Linux). It gets it through:
<linux/i2c.h> -> <linux/regulator/consumer.h> -> <linux/suspend.h> -> <linux/swap.h> -> <linux/memcontrol.h> -> <linux/cgroup.h> -> <linux/seq_file.h> -> <linux/string_helpers.h>
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54496
show more ...
|
| #
ef9ffb85
|
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
513c7a6e
|
| 11-Feb-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: make fget_unlocked take a thread argument
Just like other fget routines. This enables embedding fd table pointer in struct thread, avoiding taking a trip through proc.
|
| #
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
|
| #
bc02c18c
|
| 07-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357408 through r357661.
|
| #
52604ed7
|
| 03-Feb-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: remove the seq argument from fget_unlocked
It is almost always NULL.
|
| #
b5f7a0b0
|
| 17-Aug-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Replicate Linux #includes between headers
The DRM drivers (and probably other parts of the Linux kernel) had a significant cleanup w.r.t. which source file includes what in Linux 6.10. Non
linuxkpi: Replicate Linux #includes between headers
The DRM drivers (and probably other parts of the Linux kernel) had a significant cleanup w.r.t. which source file includes what in Linux 6.10. Nonetheless, the DRM drivers still depend on implicit namespace pollution because some source files do not include all the headers they should.
This cleanup broke the build with FreeBSD because we do not replicate the same `#include` directives everywhere.
This commit adds the same `#include` directives in several headers in order to get the same namespace pollution.
This fixes the build of the DRM drivers from Linux 6.10. An example is `drm_dp_tunnel.c` which needed `str_yes_no()` defined by <linux/string_helpers.h> (technically <linux/string_choices.h> in Linux). It gets it through:
<linux/i2c.h> -> <linux/regulator/consumer.h> -> <linux/suspend.h> -> <linux/swap.h> -> <linux/memcontrol.h> -> <linux/cgroup.h> -> <linux/seq_file.h> -> <linux/string_helpers.h>
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54496
show more ...
|
| #
ef9ffb85
|
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
513c7a6e
|
| 11-Feb-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: make fget_unlocked take a thread argument
Just like other fget routines. This enables embedding fd table pointer in struct thread, avoiding taking a trip through proc.
|
| #
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
|
| #
bc02c18c
|
| 07-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357408 through r357661.
|
| #
52604ed7
|
| 03-Feb-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: remove the seq argument from fget_unlocked
It is almost always NULL.
|
| #
cbd92ce6
|
| 09-May-2018 |
Matt Macy <mmacy@FreeBSD.org> |
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized c
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized cap_rights_t. A 3.6% speedup in fstat was measured with this change.
Reported by: mjg Reviewed by: oshogbo Approved by: sbruno MFC after: 1 month
show more ...
|
| #
5b1cfc99
|
| 09-Sep-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Add more sanity checks to linux_fget() in the LinuxKPI. This prevents returning pointers to file descriptors which were not created by the LinuxKPI.
MFC after: 1 week Sponsored by: Mellanox Techno
Add more sanity checks to linux_fget() in the LinuxKPI. This prevents returning pointers to file descriptors which were not created by the LinuxKPI.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
| #
a6b28ee0
|
| 01-Jun-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Add generic kqueue() and kevent() support to the LinuxKPI character devices. The implementation allows read and write filters to be created and piggybacks on the poll() file operation to determine wh
Add generic kqueue() and kevent() support to the LinuxKPI character devices. The implementation allows read and write filters to be created and piggybacks on the poll() file operation to determine when a filter should trigger. The piggyback mechanism is simply to check for the EWOULDBLOCK or EAGAIN return code from read(), write() or ioctl() system calls and then update the kqueue() polling state bits. The implementation is similar to the one found in the cuse(3) module. Refer to sys/fs/cuse/*.[ch] for more details.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
| #
f5a9867b
|
| 31-May-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Fixes for refcounting "struct linux_file" in the LinuxKPI.
- Allow "struct linux_file" to be refcounted when its "_file" member is NULL by using its "f_count" field. The reference counts are tra
Fixes for refcounting "struct linux_file" in the LinuxKPI.
- Allow "struct linux_file" to be refcounted when its "_file" member is NULL by using its "f_count" field. The reference counts are transferred to the file structure when the file descriptor is installed.
- Add missing vdrop() calls for error cases during open().
- Set the "_file" member of "struct linux_file" during open. This allows use of refcounting through get_file() and fput() with LinuxKPI character devices.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
| #
1e3db1de
|
| 21-Feb-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Make the LinuxKPI task struct persistent accross system calls.
A set of helper functions have been added to manage the life of the LinuxKPI task struct. When an external system call or task is invok
Make the LinuxKPI task struct persistent accross system calls.
A set of helper functions have been added to manage the life of the LinuxKPI task struct. When an external system call or task is invoked, a check is made to create the task struct by demand. A thread destructor callback is registered to free the task struct when a thread exits to avoid memory leaks.
This change lays the ground for emulating the Linux kernel more closely which is a dependency by the code using the LinuxKPI APIs.
Add new dedicated td_lkpi_task field has been added to struct thread instead of abusing td_retval[1].
Fix some header file inclusions to make LINT kernel build properly after this change.
Bump the __FreeBSD_version to force a rebuild of all kernel modules.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
| #
b6480353
|
| 31-Dec-2015 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Handle when filedescriptors are closed before initialized. An early fdclose() call can cause fget_unlocked() to fail.
Found by: mjg @ MFC after: 1 week Reviewed by: Mark Block <markb@mellanox.com> S
Handle when filedescriptors are closed before initialized. An early fdclose() call can cause fget_unlocked() to fail.
Found by: mjg @ MFC after: 1 week Reviewed by: Mark Block <markb@mellanox.com> Sponsored by: Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D4351
show more ...
|
| #
52ba0576
|
| 30-Nov-2015 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Add more functions and types to the LinuxKPI.
MFC after: 1 week 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 ...
|
| #
382d6beb
|
| 20-Oct-2015 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Move location of RCS keyword according to style.
Suggested by: jhb @ Sponsored by: Mellanox Technologies
|
| #
77320fe8
|
| 20-Oct-2015 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Add missing FreeBSD RCS keyword and SVN properties.
Sponsored by: Mellanox Technologies
|
| #
9ef8328d
|
| 16-Jun-2015 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: make rights a mandatory argument to fget_unlocked
|