#
256eb8d5 |
| 26-Jun-2024 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Remove linux/sched.h include from linux/kernel.h header
This include prevents usage of any kernel.h helpers in sched.h and all of dependencies. Linux does not have it too. Fix building of
LinuxKPI: Remove linux/sched.h include from linux/kernel.h header
This include prevents usage of any kernel.h helpers in sched.h and all of dependencies. Linux does not have it too. Fix building of kernel and drm-kmod after than.
Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45692
show more ...
|
Revision tags: release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
09b0401e |
| 06-Sep-2023 |
Austin Shafer <ashafer@badland.io> |
linuxkpi: fix iteration in __sg_alloc_table_from_pages
Commit 3f686532c9b4 tried to fix an issue with not properly starting at the first page in the sg list to prevent a panic. This worked but with
linuxkpi: fix iteration in __sg_alloc_table_from_pages
Commit 3f686532c9b4 tried to fix an issue with not properly starting at the first page in the sg list to prevent a panic. This worked but with the side effect of incrementing "s" during the final iteration causing it to be NULL since the list had ended. In cases non-DEBUG kernels this causes a panic with drm-5.15, since "s" is NULL when we later pass it to sg_mark_end(). This change decouples the iteration sg from the return value so that it is never incremented past the final page in the chain.
MFC after: 3 days Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41574
show more ...
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
d1ea0764 |
| 31-Jul-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: cleanup internal calls to VM_PAGE_TO_PHYS
Replace FreeBSD native VM_PAGE_TO_PHYS() calls with page_to_phys() allowing us to work on a struct page in the future using the one single public
LinuxKPI: cleanup internal calls to VM_PAGE_TO_PHYS
Replace FreeBSD native VM_PAGE_TO_PHYS() calls with page_to_phys() allowing us to work on a struct page in the future using the one single public Linux KPI interface to map to a native FreeBSD vm_page.
This should be a NOP.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41256
show more ...
|
#
3f686532 |
| 21-Apr-2023 |
Austin Shafer <ashafer@badland.io> |
linuxkpi: Fix __sg_alloc_table_from_pages loop
Commit 3e0856b63fe0e375a0951e05c2ef98bb2ebd9421 updated __sg_alloc_table_from_pages to use the same API as linux, but modified the loop condition when
linuxkpi: Fix __sg_alloc_table_from_pages loop
Commit 3e0856b63fe0e375a0951e05c2ef98bb2ebd9421 updated __sg_alloc_table_from_pages to use the same API as linux, but modified the loop condition when going over the pages in a sg list. Part of the change included moving the sg_next call out of the for loop and into the body, which causes an off by one error when traversing the list. Since sg_next is called before the loop body it will skip the first element and read one past the last element.
This caused panics when running PRIME with nvidia-drm as the off-by-one issue causes a NULL dereference.
Reviewed by: bz, hselasky Differential Revision: https://reviews.freebsd.org/D39628 Fixes: 3e0856b63fe0 ("linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux")
show more ...
|
Revision tags: release/13.2.0 |
|
#
f3490083 |
| 10-Feb-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `sg_alloc_table_from_pages_segment()`
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38541
|
#
3e0856b6 |
| 10-Jan-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux
It now returns a `struct scatterlist *` pointer instead of an error code only.
The implementation is incomplete because it
linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux
It now returns a `struct scatterlist *` pointer instead of an error code only.
The implementation is incomplete because it doesn't use the `prv` argument.
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38077
show more ...
|
Revision tags: release/12.4.0 |
|
#
4370e9f1 |
| 09-Aug-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: Add for_each_sgtable_{sg,page}
Needed by drm-kmod.
Reviewed by: bz Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.o
linuxkpi: Add for_each_sgtable_{sg,page}
Needed by drm-kmod.
Reviewed by: bz Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36098
show more ...
|
Revision tags: release/13.1.0 |
|
#
1aca8a6e |
| 29-Mar-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: Add for_each_sgtable_dma_sg and for_each_sgtable_dma_page
Variants of for_each_sg/for_each_sg_dma_page but they operate on sgtable structs. Needed by drm v5.10
MFC after: 1 week Sponsored
linuxkpi: Add for_each_sgtable_dma_sg and for_each_sgtable_dma_page
Variants of for_each_sg/for_each_sg_dma_page but they operate on sgtable structs. Needed by drm v5.10
MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG
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
|
Revision tags: release/12.3.0 |
|
#
2686b10d |
| 08-Oct-2021 |
Alex Richardson <arichardson@FreeBSD.org> |
linuxkpi: Add sg_init_one
Needed for the virtio-gpu driver.
Reviewed By: #linuxkpi, manu, bz, hselasky Differential Revision: https://reviews.freebsd.org/D32366
|
#
c072f6e8 |
| 29-Sep-2021 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Import linux_page.c and some dependent code from drm-kmod
No functional changes intended
Reviewed by: hselasky, manu, markj MFC after: 2 weeks Differential revision: https://reviews.freeb
LinuxKPI: Import linux_page.c and some dependent code from drm-kmod
No functional changes intended
Reviewed by: hselasky, manu, markj MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D32167
show more ...
|
#
edfcdffe |
| 07-Jun-2021 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: fix sg_pcopy_from_buffer()
In sg_pcopy_from_buffer() is an error in that skip can underflow and lead to bogus page arithmetics which may lead to memory corruption or more likely panics. O
LinuxKPI: fix sg_pcopy_from_buffer()
In sg_pcopy_from_buffer() is an error in that skip can underflow and lead to bogus page arithmetics which may lead to memory corruption or more likely panics. Once we found a s/g page to copy into there is nothing to skip anymore so simply set skip to 0.
Sponsored by: The FreeBSD Foundation MFC after: 5 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D30676
show more ...
|
Revision tags: release/13.0.0 |
|
#
4abbf816 |
| 28-Jan-2021 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: upstream a collection of drm-kmod conflicting changes
The upcoming in-kernel implementations for LinuxKPI based on work on iwlwifi (and other wireless drivers) conflicts in a few places wi
LinuxKPI: upstream a collection of drm-kmod conflicting changes
The upcoming in-kernel implementations for LinuxKPI based on work on iwlwifi (and other wireless drivers) conflicts in a few places with the drm-kmod graphics work outside the base system.
In order to transition smoothly extract the conflicting bits. This included "unaligned" accessor functions, sg_pcopy_from_buffer(), IS_*() macros (to be further restricted in the future), power management bits (possibly no longer conflicting with DRM), and other minor changes.
Obtained-from: bz_iwlwifi Sponsored-by: The FreeBSD Foundation MFC after: 3 days Reviewed by: kib, hselasky, manu, bdragon (looked at earlier versions) Differential Revision: https://reviews.freebsd.org/D26598
show more ...
|
#
a399cf13 |
| 07-Dec-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "
Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int".
MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
show more ...
|
Revision tags: release/12.2.0 |
|
#
1a180032 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
compat: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
5e6233cc |
| 04-May-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Optimise use of sg_page_count() in __sg_page_iter_next() in the LinuxKPI. No need to compute value twice.
No functional change intended.
MFC after: 1 week Sponsored by: Mellanox Technologies
|
#
fe4b041a |
| 04-May-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Implement more scatter and gather functions in the LinuxKPI.
Differential Revision: https://reviews.freebsd.org/D24611 Submitted by: ashafer_badland.io (Austin Shafer) MFC after: 1 week Sponsored by
Implement more scatter and gather functions in the LinuxKPI.
Differential Revision: https://reviews.freebsd.org/D24611 Submitted by: ashafer_badland.io (Austin Shafer) MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
442d12d8 |
| 04-May-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Fix regression issue after r346645 in the LinuxKPI.
The S/G list must be mapped AS-IS without any optimisations. This also implies that sg_dma_len() must be equal to sg->length. Many Linux drivers a
Fix regression issue after r346645 in the LinuxKPI.
The S/G list must be mapped AS-IS without any optimisations. This also implies that sg_dma_len() must be equal to sg->length. Many Linux drivers assume this and this fixes some DRM issues.
Put the BUS DMA map pointer into the scatter-gather list to allow multiple mappings on the same physical memory address.
The FreeBSD version has been bumped to force recompilation of external kernel modules.
Sponsored by: Mellanox Technologies
show more ...
|
#
f211d536 |
| 24-Apr-2019 |
Tycho Nightingale <tychon@FreeBSD.org> |
LinuxKPI should use bus_dma(9) to be compatible with an IOMMU
Reviewed by: hselasky, kib Tested by: greg@unrelenting.technology Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.f
LinuxKPI should use bus_dma(9) to be compatible with an IOMMU
Reviewed by: hselasky, kib Tested by: greg@unrelenting.technology Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19845
show more ...
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
#
998f22eb |
| 13-Mar-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Implement sg_virt() function in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies
|
#
56b16627 |
| 13-Mar-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Define SG_CHAIN and SG_END in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
57a865f8 |
| 01-Jun-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Implement the __sg_alloc_table_from_pages() function based on the existing sg_alloc_table_from_pages() function in the LinuxKPI.
This basically allow segments to have a limit, max_segment.
Submitte
Implement the __sg_alloc_table_from_pages() function based on the existing sg_alloc_table_from_pages() function in the LinuxKPI.
This basically allow segments to have a limit, max_segment.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks
show more ...
|