|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0 |
|
| #
83412843 |
| 29-Sep-2024 |
Bjoern A. Zeeb <[email protected]> |
LinuxKPI: update rcu_dereference_*() and lockdep_is_held()
Update rcu_dereference_{check,protected}() to call the check and log once if it fails and if the RCU debug sysctl is turned on. Also add pr
LinuxKPI: update rcu_dereference_*() and lockdep_is_held()
Update rcu_dereference_{check,protected}() to call the check and log once if it fails and if the RCU debug sysctl is turned on. Also add proper checks for conditions passed in to these functions. For that implement linux_rcu_read_lock_held() (lots of help from wulf).
(While here also remove extraneous extern for function prototypes).
Update lockdep_is_held() to always be an inline function with argument annotation so that we do no longer have unused variables in callers which only call lockdep_is_held().
Sponsored by: The FreeBSD Foundation Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D46842
(cherry picked from commit 5c92f84bb607c692ce4fa762a7a3c4b86a2fa281)
show more ...
|
|
Revision tags: release/13.4.0 |
|
| #
b71e429d |
| 21-Jul-2024 |
Vladimir Kondratyev <[email protected]> |
LinuxKPI: Add devm_device_add_group to linux/device.h
devm_device_add_group creates a managed attribute group for a device.
Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by:
LinuxKPI: Add devm_device_add_group to linux/device.h
devm_device_add_group creates a managed attribute group for a device.
Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45845
(cherry picked from commit a1181662d3707d8165d7153a0aa5d76ea1ddc11a)
show more ...
|
|
Revision tags: release/14.1.0 |
|
| #
5ea65466 |
| 08-Apr-2024 |
Vladimir Kondratyev <[email protected]> |
LinuxKPI: Improve timer_shutdown_sync
timer_shutdown_sync not only shutdowns a timer but prevents it rearming.
Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week
(cher
LinuxKPI: Improve timer_shutdown_sync
timer_shutdown_sync not only shutdowns a timer but prevents it rearming.
Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week
(cherry picked from commit 61fb195e8dd08d4b006a176c09682f061424cb95)
show more ...
|
| #
31c476da |
| 06-Apr-2024 |
Bjoern A. Zeeb <[email protected]> |
LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup()
Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the str
LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup()
Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the struct is already given. Such is the case in iwlwifi d3.
Also add an initial implementation of device_can_wakeup(). Though this is likely all we need we have no way of setting the flag for it yet so leave a pr_debug() and a comment there as well. Until we want to support WoWLAN this is likely not needed for wireless. Doing it the proper way checking a bool in 'struct dev_pm_info' would change 'struct device' and with that 'struct pci_dev' and break the KBI. In favour of mergeability this version does not implement the full functionality yet.
Both help to make an updated iwlwifi d3 compile.
Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45358
(cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642)
show more ...
|
| #
183b64df |
| 15-May-2024 |
Emmanuel Vadot <[email protected]> |
linuxkpi: spinlock: Simplify code
Just use a typedef for spinlock_t, no need to create a useless structure.
Reviewed by: bz, emaste Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Re
linuxkpi: spinlock: Simplify code
Just use a typedef for spinlock_t, no need to create a useless structure.
Reviewed by: bz, emaste Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D45205
(cherry picked from commit ae38a1a1bfdf320089c254e4dbffdf4769d89110)
linuxkpi: Fix spin_lock_init
Some linux code re-init some spinlock so add MTX_NEW to mtx_init.
Reported by: David Wolfskill <[email protected]> Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code")
(cherry picked from commit cff79fd02636f34010d8b835cc9e55401fa76e74)
show more ...
|
|
Revision tags: release/13.3.0, release/14.0.0 |
|
| #
7730aec6 |
| 23-Oct-2023 |
Bjoern A. Zeeb <[email protected]> |
LinuxKPI: reduce impact of large MAXCPU
Start scaling arrays dynamically instead of using MAXCPU, resulting in extra allocations on startup but reducing the overall memory footprint. For the static
LinuxKPI: reduce impact of large MAXCPU
Start scaling arrays dynamically instead of using MAXCPU, resulting in extra allocations on startup but reducing the overall memory footprint. For the static single CPU mask we provide two versions to further save memory depending on a low or high CPU count system. The threshold to switch is currently at 128 CPUs on 64bit platforms. More detailed comments on the implementations can be found in the code.
If I am not wrong on a MAXCPU=65536 system the memory footprint should roughly go down from 512M to 1.5M for the static single CPU mask.
Submitted by: olce (most of this final version) Sponsored by: The FreeBSD Foundation PR: 274316 Differential Revision: https://reviews.freebsd.org/D42345
(cherry picked from commit 488e8a7faca51a71987fbf00cd36cfcd19269db7)
show more ...
|
| #
06e0d293 |
| 24-Dec-2023 |
Vladimir Kondratyev <[email protected]> |
LinuxKPI: Add x86_vendor field to struct cpuinfo_x86
and initialize it at linuxkpi module load.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu MFC after: 1 week Differential Revision:
LinuxKPI: Add x86_vendor field to struct cpuinfo_x86
and initialize it at linuxkpi module load.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42820
(cherry picked from commit b8c88a61750174f62db45784d6b4dc98de4073b1)
show more ...
|
| #
b62373d4 |
| 24-Dec-2023 |
Vladimir Kondratyev <[email protected]> |
LinuxKPI: Add xen/xen.h header
It contains proxy-implementation of xen_initial_domain() and xen_pv_domain() required by latest drm-kmod.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu
LinuxKPI: Add xen/xen.h header
It contains proxy-implementation of xen_initial_domain() and xen_pv_domain() required by latest drm-kmod.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42797
(cherry picked from commit c612e3c262db6c8256159c4ed39018788017c7e2)
show more ...
|
| #
3b97bdb4 |
| 08-Dec-2023 |
Jean-Sébastien Pédron <[email protected]> |
linuxkpi: Move `struct kobject` code to `linux_kobject.c`
[Why] `linux_compat.c` is already too long. I will need to add `struct kset` in a follow-up commit, so let's move the existing `struct kobje
linuxkpi: Move `struct kobject` code to `linux_kobject.c`
[Why] `linux_compat.c` is already too long. I will need to add `struct kset` in a follow-up commit, so let's move the existing `struct kobject` code to its own file.
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43019
(cherry picked from commit 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43)
show more ...
|
| #
81cee135 |
| 19-Jan-2024 |
Konstantin Belousov <[email protected]> |
kcmp(2): implement for linuxkpi cdevs
(cherry picked from commit 41fb6dc3d4df632ffacf91b5631a718442d129d5)
|
| #
685dc743 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
2e07e885 |
| 16-May-2023 |
Bjoern A. Zeeb <[email protected]> |
LinuxKPI: implement timer_{delete,shutdown}_sync()
Implement timer_{delete,shutdown}_sync(), which do not seem to require anything additional to the already existing del_timer_sync().
Sponsored by:
LinuxKPI: implement timer_{delete,shutdown}_sync()
Implement timer_{delete,shutdown}_sync(), which do not seem to require anything additional to the already existing del_timer_sync().
Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40124
show more ...
|
| #
ad513b4d |
| 23-May-2023 |
Bjoern A. Zeeb <[email protected]> |
LinuxKPI: add utsname for init_utsname() with release
A wireless dirver is requesting release from the result of init_utsname(). Populate the field on startup.
MFC after: 10 days Reviewed by: emas
LinuxKPI: add utsname for init_utsname() with release
A wireless dirver is requesting release from the result of init_utsname(). Populate the field on startup.
MFC after: 10 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40248
show more ...
|
|
Revision tags: release/13.2.0 |
|
| #
a27902c1 |
| 10-Feb-2023 |
Jean-Sébastien Pédron <[email protected]> |
linuxkpi: Define `cpu_data(cpu)`
`cpu_data(cpu)` evaluates to a `struct cpuinfo_x86` filled with attributes of the given CPU number. The CPU number is an index in the `__cpu_data[]` array with MAXCP
linuxkpi: Define `cpu_data(cpu)`
`cpu_data(cpu)` evaluates to a `struct cpuinfo_x86` filled with attributes of the given CPU number. The CPU number is an index in the `__cpu_data[]` array with MAXCPU entries. On FreeBSD, we simply initialize all of them like we do with `boot_cpu_data`.
While here, we add the `x86_model` field to the `struct cpuinfo_x86`. We use `CPUID_TO_MODEL()` to set it.
At the same time, we fix the value of `x86` which should have been set to the CPU family. It was using the same implementation as `CPUID_TO_MODEL()` before. It now uses `CPUID_TO_FAMILY()`.
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38542
show more ...
|
|
Revision tags: release/12.4.0 |
|
| #
58cf3a69 |
| 11-Nov-2022 |
Jean-Sébastien Pédron <[email protected]> |
linuxkpi: Define `boot_cpu_data.x86_max_cores`
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D36971
|
| #
c72dd0aa |
| 11-Nov-2022 |
Jean-Sébastien Pédron <[email protected]> |
linuxkpi: Introduce `vma_set_file()`
This code was moved from the i915 driver in Linux 5.11.
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D36957
|
| #
e2361e04 |
| 31-Oct-2022 |
Bjoern A. Zeeb <[email protected]> |
LinuxKPI: implement cpumask_of()
Add a static set of cpumasks for all (possible) cpus with only the one indexed cpu enabled in each set. This is needed for cpumask_of(_cpuid) which returns a cpumask
LinuxKPI: implement cpumask_of()
Add a static set of cpumasks for all (possible) cpus with only the one indexed cpu enabled in each set. This is needed for cpumask_of(_cpuid) which returns a cpumask (cpuset) with only cpu _cpuid enabled and is used by one wireless driver at least.
MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37223
show more ...
|
| #
af3c7888 |
| 30-Sep-2022 |
Ed Schouten <[email protected]> |
Alter the prototype of qsort_r(3) to match POSIX, which adopted the glibc-based interface.
Unfortunately, the glibc maintainers, despite knowing the existence of the FreeBSD qsort_r(3) interface in
Alter the prototype of qsort_r(3) to match POSIX, which adopted the glibc-based interface.
Unfortunately, the glibc maintainers, despite knowing the existence of the FreeBSD qsort_r(3) interface in 2004 and refused to add the same interface to glibc based on grounds of the lack of standardization and portability concerns, has decided it was a good idea to introduce their own qsort_r(3) interface in 2007 as a GNU extension with a slightly different and incompatible interface.
With the adoption of their interface as POSIX standard, let's switch to the same prototype, there is no need to remain incompatible.
C++ and C applications written for the historical FreeBSD interface get source level compatibility when building in C++ mode, or when building with a C compiler with C11 generics support, provided that the caller passes a fifth parameter of qsort_r() that exactly matches the historical FreeBSD comparator function pointer type and does not redefine the historical qsort_r(3) prototype in their source code.
Symbol versioning is used to keep old binaries working.
MFC: never Relnotes: yes Reviewed by: cem, imp, hps, pauamma Differential revision: https://reviews.freebsd.org/D17083
show more ...
|
| #
7ae99f80 |
| 22-Sep-2022 |
John Baldwin <[email protected]> |
pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t.
This matches the return type of pmap_mapdev/bios.
Reviewed by: kib, markj Sponsored by: DARPA Differential Revision: https://reviews.f
pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t.
This matches the return type of pmap_mapdev/bios.
Reviewed by: kib, markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D36548
show more ...
|
| #
b2c86006 |
| 09-Aug-2022 |
Emmanuel Vadot <[email protected]> |
linuxkpi: Add asm/processor.h
Also fill the boot_cpu_data struct as drm needs it.
Reviewed by: bz Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: http
linuxkpi: Add asm/processor.h
Also fill the boot_cpu_data struct as drm needs it.
Reviewed by: bz Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36107
show more ...
|
|
Revision tags: release/13.1.0 |
|
| #
132b00f9 |
| 05-Apr-2022 |
Warner Losh <[email protected]> |
linuxkpi: move io_mapping_create_wc to .c
Move io_mapping_create_wc to .c because it encodes the size of struct io_mapping so we move this from the client module to the linuxkpi module.
Sponsored b
linuxkpi: move io_mapping_create_wc to .c
Move io_mapping_create_wc to .c because it encodes the size of struct io_mapping so we move this from the client module to the linuxkpi module.
Sponsored by: Netflix Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D34776
show more ...
|
| #
aca0bcbc |
| 05-Apr-2022 |
Warner Losh <[email protected]> |
linuxkpi: Move cdev_alloc into .c file
Move cdev_alloc into linux_compat.c since it encodes the size of struct linux_cdev into the client modules otherwise.
Sponsored by: Netflix Reviewed by: hse
linuxkpi: Move cdev_alloc into .c file
Move cdev_alloc into linux_compat.c since it encodes the size of struct linux_cdev into the client modules otherwise.
Sponsored by: Netflix Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D34771
show more ...
|
| #
1341ac9f |
| 05-Apr-2022 |
Warner Losh <[email protected]> |
linuxkpi: Move class_create to .c file
class_create encodes the size of struct class into the generated code. Move from .h file to .c file to move this knowledge from the client modules that call th
linuxkpi: Move class_create to .c file
class_create encodes the size of struct class into the generated code. Move from .h file to .c file to move this knowledge from the client modules that call this into the linuxkpi module.
Sponsored by: Netflix Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D34769
show more ...
|
| #
702b6875 |
| 05-Apr-2022 |
Warner Losh <[email protected]> |
linuxkpi: Move device_create_groups_vargs to linux_compat.c
device_create_groups_vargs encodes the size of struct device. Move definition from .h to .c to move this size into the linuxkpi module rat
linuxkpi: Move device_create_groups_vargs to linux_compat.c
device_create_groups_vargs encodes the size of struct device. Move definition from .h to .c to move this size into the linuxkpi module rather than encoding it in all client driver modules.
Sponsored by: Netflix Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D34768
show more ...
|
| #
36929b55 |
| 05-Apr-2022 |
Warner Losh <[email protected]> |
linuxkpi: move kobject_create to .c file
kobject_create knows the size of struct kobject. Move it to linux_compat.c so this knowledge is confined to the loadable module and not the clients.
Sponsor
linuxkpi: move kobject_create to .c file
kobject_create knows the size of struct kobject. Move it to linux_compat.c so this knowledge is confined to the loadable module and not the clients.
Sponsored by: Netflix Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D34767
show more ...
|