#
cb8bfc4d |
| 06-Jun-2024 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h
To match Linux. Some future changes may depend on proper location.
Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week
LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h
To match Linux. Some future changes may depend on proper location.
Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D45448
show more ...
|
Revision tags: release/14.1.0 |
|
#
ecd1d1f1 |
| 27-May-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: remove extern from function declarations
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste (earlier version, found another two) Differential Revision: https://revi
LinuxKPI: remove extern from function declarations
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste (earlier version, found another two) Differential Revision: https://reviews.freebsd.org/D45386
show more ...
|
#
738c02ba |
| 02-Apr-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: add dev_alloc_pages()
Add dev_alloc_pages() though it seems a weird KPI, not passing a dev despite its name. Used by updated wireless driver.
Sponsored by: The FreeBSD Foundation MFC aft
LinuxKPI: add dev_alloc_pages()
Add dev_alloc_pages() though it seems a weird KPI, not passing a dev despite its name. Used by updated wireless driver.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44588
show more ...
|
Revision tags: release/13.3.0 |
|
#
8a8e86b8 |
| 07-Dec-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
Revert "linuxkpi: `GFP_KERNEL` equals `M_NOWAIT` now"
This change seems to break some drivers such as the mlx5*(4) drivers.
As kib@ says: > According to the 'official' Linux kernel documentation, t
Revert "linuxkpi: `GFP_KERNEL` equals `M_NOWAIT` now"
This change seems to break some drivers such as the mlx5*(4) drivers.
As kib@ says: > According to the 'official' Linux kernel documentation, the GFP_KERNEL > flag implies sleepable context.
It was introduced while working on the new vt(4)/DRM integration [1]. During this work, doing sleepable allocations broke vt(4) and the DRM drivers. However, I made further improvements and some locking-related fixed to the new integration without revisiting the need for it.
After more testing, the improvements to the integration mentionned above seems to make the change to `GFP_KERNEL` unneeded now. I can thus revert it to restore expectations of other drivers.
This reverts commit 14dcd40983748596d116d91acb934a8a95ac76bc.
[1] https://github.com/freebsd/drm-kmod/pull/243
Reviewed by: kib Approved by: kib Differential Revision: https://reviews.freebsd.org/D42962
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 ...
|
#
14dcd409 |
| 24-Nov-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: `GFP_KERNEL` equals `M_NOWAIT` now
... instead of `M_WAITOK`.
[Why] The reason is that in some places in the DRM drivers (in particular, the framebuffer management code), kmalloc() is cal
linuxkpi: `GFP_KERNEL` equals `M_NOWAIT` now
... instead of `M_WAITOK`.
[Why] The reason is that in some places in the DRM drivers (in particular, the framebuffer management code), kmalloc() is called from a non-sleepable context, such as after a call to mtx_lock(8) with an MTX_DEF mutex.
If `GFP_KERNEL` is defined as `M_WAITOK`, we hit an assertion from witness(4).
[How] The definition of `GFP_KERNEL` is changed to `M_NOWAIT`. This means that callers should verify the return value of kmalloc(). Fortunately, this is always the case in Linux.
Reviewed by: bz, emaste, manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D42054
show more ...
|
Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
9e9c682f |
| 31-Jul-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the L
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the Linux KPI and make them 'struct page' or 'struct page *' to prepare for more upcoming work.
This should be a NOP.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41255
show more ...
|
Revision tags: release/13.2.0 |
|
#
c0c1c599 |
| 30-Dec-2022 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Define `GFP_NOFS` in `linux/gfp.h`
Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37910
|
#
55038a63 |
| 03-Dec-2022 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: add simplified vesion of page_frag_cache
For the moment and the currently only consumer (mt76) add a simplified version of the page_frag_cache. We will only accept fragement sizes up to 1
LinuxKPI: add simplified vesion of page_frag_cache
For the moment and the currently only consumer (mt76) add a simplified version of the page_frag_cache. We will only accept fragement sizes up to 1 PAGE_SIZE (KASSERT) and we will always return a full page. Should we add more consumers or small (or large) objects would become a problem we can always add a more elaborate version.
Discussed with: markj Reviewed by: markj (,hselasky commented as well) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D37595
show more ...
|
Revision tags: release/12.4.0 |
|
#
bfe6bfd7 |
| 11-Nov-2022 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Add `__GFP_NOMEMALLOC` kmalloc flag
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D36954
|
Revision tags: release/13.1.0 |
|
#
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, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0 |
|
#
937a05ba |
| 04-Aug-2019 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Add necessary bits for Linux KPI to work correctly on powerpc
PowerPC, and possibly other architectures, use different address ranges for PCI space vs physical address space, which is only mapped at
Add necessary bits for Linux KPI to work correctly on powerpc
PowerPC, and possibly other architectures, use different address ranges for PCI space vs physical address space, which is only mapped at resource activation time, when the BAR gets written. The DRM kernel modules do not activate the rman resources, soas not to waste KVA, instead only mapping parts of the PCI memory at a time. This introduces a BUS_TRANSLATE_RESOURCE() method, implemented in the Open Firmware/FDT PCI driver, to perform this necessary translation without activating the resource.
In addition to system KPI changes, LinuxKPI is updated to handle a big-endian host, by adding proper endian swaps to the I/O functions.
Submitted by: mmacy Reported by: hselasky Differential Revision: https://reviews.freebsd.org/D21096
show more ...
|
#
a63915c2 |
| 28-Jul-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @r350386
Sponsored by: The FreeBSD Foundation
|
Revision tags: release/11.3.0 |
|
#
8996977a |
| 03-Jul-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Remove dead code added after r348743 in the LinuxKPI. The LINUXKPI_VERSION macro is not defined for any compiled LinuxKPI code which basically means __GFP_NOTWIRED is never checked when allocating pa
Remove dead code added after r348743 in the LinuxKPI. The LINUXKPI_VERSION macro is not defined for any compiled LinuxKPI code which basically means __GFP_NOTWIRED is never checked when allocating pages. This should work fine with the existing external DRM code as long as the page wiring and unwiring is balanced.
MFC after: 3 days Sponsored by: Mellanox Technologies
show more ...
|
#
e532a999 |
| 20-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349234
Sponsored by: The FreeBSD Foundation
|
#
1ef5e651 |
| 06-Jun-2019 |
Mark Johnston <markj@FreeBSD.org> |
Make the linuxkpi's alloc_pages() consistently return wired pages.
Previously it did this only on platforms without a direct map. This also more closely matches Linux's semantics.
Since some DRM v
Make the linuxkpi's alloc_pages() consistently return wired pages.
Previously it did this only on platforms without a direct map. This also more closely matches Linux's semantics.
Since some DRM v5.0 code assumes the old behaviour, use a LINUXKPI_VERSION guard to preserve that until the out-of-tree module is updated.
Reviewed by: hselasky, kib (earlier versions), johalun MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20502
show more ...
|
Revision tags: release/12.0.0 |
|
#
2a22df74 |
| 04-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339813 through r340125.
|
#
3d40cdf0 |
| 01-Nov-2018 |
Ben Widawsky <bwidawsk@FreeBSD.org> |
linuxkpi: Add GFP flags needed for ttm drivers
Submitted by: Johannes Lundberg <johalun0@gmail.com> Requested by: bwidawsk MFC after: 3 days Approved by: emaste (mentor)
|
Revision tags: release/11.2.0 |
|
#
f03ae7e8 |
| 01-Jun-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Add more GFP macro definitions in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks
|
#
7c860473 |
| 18-Feb-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Implement __GFP_BITS_SHIFT and __GFP_BITS_MASK macros in the LinuxKPI. Add compile time asserts to catch conflicts with native defines.
MFC after: 1 week Submitted by: Johannes Lundberg <johalun0@gm
Implement __GFP_BITS_SHIFT and __GFP_BITS_MASK macros in the LinuxKPI. Add compile time asserts to catch conflicts with native defines.
MFC after: 1 week Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
14c5024d |
| 08-Mar-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Cleanup the LinuxKPI slab implementation.
Put large functions into linux_slab.c instead of declaring them static inline.
Add support for more memory allocation wrappers like kmalloc_array() and __v
Cleanup the LinuxKPI slab implementation.
Put large functions into linux_slab.c instead of declaring them static inline.
Add support for more memory allocation wrappers like kmalloc_array() and __vmalloc().
Make sure either the M_WAITOK or the M_NOWAIT flag is set and mask away unused memory allocation flags before calling FreeBSD's malloc() routine.
Move kmalloc_node() definition to slab.h where it belongs.
Implement support for the SLAB_DESTROY_BY_RCU feature when creating a kmem_cache which basically means kmem_cache memory is freed using call_rcu().
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
#
6ae9acde |
| 23-Feb-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r313896 through r314128.
|
#
1cdefd08 |
| 22-Feb-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Optimise unmapped LinuxKPI page allocations.
When allocating unmapped pages, take advantage of the direct map on AMD64 to get the virtual address corresponding to a page. Else all pages allocated mu
Optimise unmapped LinuxKPI page allocations.
When allocating unmapped pages, take advantage of the direct map on AMD64 to get the virtual address corresponding to a page. Else all pages allocated must be mapped because sometimes the virtual address of a page is requested.
Move all page allocation and deallocation code into an own C-file.
Add support for GFP_DMA32, GFP_KERNEL, GFP_ATOMIC and __GFP_ZERO allocation flags.
Make a clear separation between mapped and unmapped allocations.
Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
#
a3906ca5 |
| 17-Feb-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r313644 through r313895.
|