| #
7e5d7b0e
|
| 18-Jun-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `sysfs_add_file_to_group()` and `sysfs_remove_file_from_group()`
They are used by the amdgpu DRM driver for quite some time, but new code using them added to Linux 6.9 made me discover
linuxkpi: Add `sysfs_add_file_to_group()` and `sysfs_remove_file_from_group()`
They are used by the amdgpu DRM driver for quite some time, but new code using them added to Linux 6.9 made me discover that these functions were missing and existing code was commentted out.
Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50987
show more ...
|
| #
f94d7319
|
| 24-Apr-2025 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: sysfs: implement sysfs_match_string()
Use a macro to automatically gather the length of the array while we can.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste
LinuxKPI: sysfs: implement sysfs_match_string()
Use a macro to automatically gather the length of the array while we can.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D50007
show more ...
|
| #
968650db
|
| 25-Feb-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `BIN_ATTR*()` macros
They are helpers to declare static `struct bin_attribute`.
The amdgpu DRM driver started to use them for some time but the code was commented out (and this is sti
linuxkpi: Add `BIN_ATTR*()` macros
They are helpers to declare static `struct bin_attribute`.
The amdgpu DRM driver started to use them for some time but the code was commented out (and this is still the case as of this commit). In Linux 6.8, it declared a new BIN_ATTR. This new code is not commented out.
While here, change the first argument of the `read` and `write` callbacks to be a `struct linux_file *` instead of a `struct file *`. This ensures the right structure is being referenced at compile time.
Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49378
show more ...
|
| #
ca4ce6a5
|
| 08-Feb-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `sysfs_create_bin_file()` and `sysfs_remove_bin_file()`
They are used by the i915 DRM driver for quite some time, but that code was commented out. It was moved around in Linux 6.8, so
linuxkpi: Add `sysfs_create_bin_file()` and `sysfs_remove_bin_file()`
They are used by the i915 DRM driver for quite some time, but that code was commented out. It was moved around in Linux 6.8, so instead of figuring out what should be commented out now, let's add an implementation of these functions.
Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49068
show more ...
|
| #
4e7aa03b
|
| 08-Apr-2024 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Stub sysfs_remove_link in linux/sysfs.h
sysfs_create_link is stubbed already. Stub sysfs_remove_link too to be feature-complete.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: em
LinuxKPI: Stub sysfs_remove_link in linux/sysfs.h
sysfs_create_link is stubbed already. Stub sysfs_remove_link too to be feature-complete.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week
show more ...
|
| #
d752a5e8
|
| 08-Dec-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Fix `__ATTR_RO()` in <linux/sysfs.h>
[Why] The passed structure may not have a `.store` field. This is the case in the amdgpu DRM driver starting with Linux 5.18.
Reviewed by: manu Approv
linuxkpi: Fix `__ATTR_RO()` in <linux/sysfs.h>
[Why] The passed structure may not have a `.store` field. This is the case in the amdgpu DRM driver starting with Linux 5.18.
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43023
show more ...
|
| #
509707e8
|
| 08-Dec-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `sysfs_create_link()` in <linux/sysfs.h>
[Why] The amdgpu DRM driver started to use it in Linux 5.18.
[How] The function is a no-op as I'm not sure how to implement this with sysctls
linuxkpi: Add `sysfs_create_link()` in <linux/sysfs.h>
[Why] The amdgpu DRM driver started to use it in Linux 5.18.
[How] The function is a no-op as I'm not sure how to implement this with sysctls yet.
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43022
show more ...
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
e64afbc2
|
| 20-Jan-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `sysfs_emit_at()` in <linux/sysfs.h>
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38159
|
| #
4fee6659
|
| 11-Jan-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `sysfs_emit()`
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38086
|
| #
dd6bb9ab
|
| 28-Sep-2022 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
LinuxKPI: Use SYSCTL_FOREACH()
Differential Revision: https://reviews.freebsd.org/D36748 MFC after: 1 week Sponsored by: NVIDIA Networking
|
| #
d3f96f66
|
| 07-Sep-2022 |
Alan Somers <asomers@FreeBSD.org> |
Fix O(n^2) behavior in sysctl
Sysctl OIDs were internally stored in linked lists, triggering O(n^2) behavior when userland iterates over many of them. The slowdown is noticeable for MIBs that have
Fix O(n^2) behavior in sysctl
Sysctl OIDs were internally stored in linked lists, triggering O(n^2) behavior when userland iterates over many of them. The slowdown is noticeable for MIBs that have > 100 children (for example, vm.uma). But it's unignorable for kstat.zfs when a pool has > 1000 datasets.
Convert the linked lists into RB trees. This produces a ~25x speedup for listing kstat.zfs with 4100 datasets, and no measurable penalty for small dataset counts.
Bump __FreeBSD_version for the KPI change.
Sponsored by: Axcient Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D36500
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
|
| #
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 ...
|
| #
1a180032
|
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
compat: clean up empty lines in .c and .h files
|
| #
76354fa4
|
| 04-Nov-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Enable device class group attributes in the LinuxKPI.
Bump the __FreeBSD_version to force recompilation of external kernel modules due to structure change.
Differential Revision: https://reviews.fr
Enable device class group attributes in the LinuxKPI.
Bump the __FreeBSD_version to force recompilation of external kernel modules due to structure change.
Differential Revision: https://reviews.freebsd.org/D21564 Submitted by: Greg V <greg@unrelenting.technology> MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
| #
f993ed2f
|
| 09-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351732 through r352104.
|
| #
f6668e9f
|
| 06-Sep-2019 |
Johannes Lundberg <johalun@FreeBSD.org> |
LinuxKPI: Improve sysfs support.
- Add functions for creating and merging sysfs groups. - Add sysfs_streq function to compare strings ignoring newline from the sysctl userland call. - Add a call t
LinuxKPI: Improve sysfs support.
- Add functions for creating and merging sysfs groups. - Add sysfs_streq function to compare strings ignoring newline from the sysctl userland call. - Add a call to sysfs_create_groups in device_add. - Remove duplicate header include. - Bump __FreeBSD_version.
Reviewed by: hselasky Approved by: imp (mentor), hselasky MFC after: 4 days Differential Revision: D21542
show more ...
|
| #
c5c3ba6b
|
| 03-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351317 through r351731.
|
| #
458ba18d
|
| 02-Sep-2019 |
Johannes Lundberg <johalun@FreeBSD.org> |
LinuxKPI: Add sysfs create/remove functions that handles multiple files in one call.
Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week Differential Revision: D21475
|
| #
2aaf9152
|
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
| #
0ac26c0e
|
| 13-Mar-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Honor SYSCTL function return values when creating sysfs nodes in the LinuxKPI. Return proper error code upon failure.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsor
Honor SYSCTL function return values when creating sysfs nodes in the LinuxKPI. Return proper error code upon failure.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies
show more ...
|
| #
7e5d7b0e
|
| 18-Jun-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `sysfs_add_file_to_group()` and `sysfs_remove_file_from_group()`
They are used by the amdgpu DRM driver for quite some time, but new code using them added to Linux 6.9 made me discover
linuxkpi: Add `sysfs_add_file_to_group()` and `sysfs_remove_file_from_group()`
They are used by the amdgpu DRM driver for quite some time, but new code using them added to Linux 6.9 made me discover that these functions were missing and existing code was commentted out.
Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50987
show more ...
|
| #
f94d7319
|
| 24-Apr-2025 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: sysfs: implement sysfs_match_string()
Use a macro to automatically gather the length of the array while we can.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste
LinuxKPI: sysfs: implement sysfs_match_string()
Use a macro to automatically gather the length of the array while we can.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D50007
show more ...
|
| #
968650db
|
| 25-Feb-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `BIN_ATTR*()` macros
They are helpers to declare static `struct bin_attribute`.
The amdgpu DRM driver started to use them for some time but the code was commented out (and this is sti
linuxkpi: Add `BIN_ATTR*()` macros
They are helpers to declare static `struct bin_attribute`.
The amdgpu DRM driver started to use them for some time but the code was commented out (and this is still the case as of this commit). In Linux 6.8, it declared a new BIN_ATTR. This new code is not commented out.
While here, change the first argument of the `read` and `write` callbacks to be a `struct linux_file *` instead of a `struct file *`. This ensures the right structure is being referenced at compile time.
Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49378
show more ...
|