aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include
Commit message (Collapse)AuthorAgeFilesLines
...
* LinuxKPI: 802.11: improve reg_query_regdb_wmm()Bjoern A. Zeeb2025-08-241-5/+4
| | | | | | | | | | | Adjust the IMPROVE macro to also take a format string and use that in reg_query_regdb_wmm() instead of TODO() to avoid spamming the console with something that needs larger reworks. Return -ENODATA instead of -ENXIO as that seems a better fit though the only consumer uses it without checking the return value these days. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: assign values to WLAN_HT_CAP_SM_PS_*Bjoern A. Zeeb2025-08-241-3/+3
| | | | | | | No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: add dummy IEEE80211_EML_CAP_EMLSR_*_DELAY_256USBjoern A. Zeeb2025-08-211-0/+2
| | | | | | | | A wifi driver update needs these to compile. Just add them. We'll given them porper values when we'll do a full pass needing them. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: add wiphy_locked_debugfs_read()Bjoern A. Zeeb2025-08-211-0/+13
| | | | | | | | | A wifi driver update required wiphy_locked_debugfs_read(). Add a skeleton implementation just reminding us of the TODO() for now. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: ieee80211_probereq_get() takes const argumentsBjoern A. Zeeb2025-08-211-3/+3
| | | | | | | | | With a wireless driver updates we are passed const arguments for addr and ssid. Adjust the local implementation to take the const in order to avoid compiler warnings (at no extra harm). Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: define the full set of IEEE80211_VHT_MAX_AMPDU_*Bjoern A. Zeeb2025-08-211-1/+14
| | | | | | | | Define all of IEEE80211_VHT_MAX_AMPDU_* and add a reference to the standard section. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: add bitfield.h to ieee80211.hBjoern A. Zeeb2025-08-211-0/+1
| | | | | | | | Add the include to make some driver code compile without having to add FreeBSD-specific includes to drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* linuxkpi: Use `__builtin_popcountg()` instead of `bitcount*()`Jean-Sébastien Pédron2025-08-091-4/+4
| | | | | | | | | | | | The DRM drivers generic code started to use `HWEIGHT64()` in the definition of an array field in a structure. Therefore, the array size needs to be known at compile time. This was not the case with the `HWEIGHT*()` macros based on `bitcount*()`. The use of `__builtin_popcountg()` solves that problem. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50995
* linuxkpi: Include <linux/spinlock.h> from <linux/refcount.h>Jean-Sébastien Pédron2025-08-091-0/+1
| | | | | | | | | | | | | | The <linux/refcount.h> header uses the `spinlock_t` type and some consumers in the DRM drivers don't include <linux/spinlock.h> directly or indirectly. This led to compilation errors because the type was undefined. On Linux, <linux/refcount.h> includes <linux/spinlock_type.h> as a comparision. Reviewed by: emaste, manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50994
* linuxkpi: Add the `topology_*()` functionsJean-Sébastien Pédron2025-08-093-0/+90
| | | | | | | | | | | ... from <asm/topology.h>. The amdgpu DRM driver started to use `topology_num_cores_per_package()` in Linux 6.9. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50993
* linuxkpi: Define `DEFINE_SHOW_STORE_ATTRIBUTE()`Jean-Sébastien Pédron2025-08-091-0/+15
| | | | | | | | | | | It is the same as `DEFINE_SHOW_ATTRIBUTE()` with a `write` function added. The i915 DRM driver started to use it in Linux 6.9. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50992
* linuxkpi: Declare several log message prefixesJean-Sébastien Pédron2025-08-091-0/+6
| | | | | | | | The amdgpu DRM driver started to use `HW_ERR` in Linux 6.9. Reviewed by: emaste, manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50990
* linuxkpi: Add `name` field to `struct resource`Jean-Sébastien Pédron2025-08-091-0/+1
| | | | | | | | | The i915 DRM driver started to display this field in log messages in Linux 6.9. Reviewed by: emaste, manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50989
* linuxkpi: Add `ida_alloc_range()`Jean-Sébastien Pédron2025-08-091-0/+7
| | | | | | | | The amdgpu DRM driver from Linux 6.9 started to use this function. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50988
* linuxkpi: Add `sysfs_add_file_to_group()` and `sysfs_remove_file_from_group()`Jean-Sébastien Pédron2025-08-091-0/+57
| | | | | | | | | | 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
* acpi_powerres: D3cold supportAymeric Wibo2025-08-081-5/+5
| | | | | | | | | | | | | | | | | | | | | Cherry-pick commit 0b76c0a from ACPICA (actypes: Distinguish between D3hot/cold, and default `ACPI_STATE_D3` to D3cold). The same distinction is made between `PCI_POWERSTATE_D3_HOT` and `PCI_POWERSTATE_D3_COLD`, as they're defined by ACPI (and are asserted to be the same). D3cold is essentially the same as D3hot except the power resources are turned off. Add support for D3cold to `acpi_pwr_switch_consumer`. `acpi_d_state_to_str` replaces the `printf("D%d", d_state)` pattern, allowing for "D3hot" and "D3cold" strings to be printed instead of just "D3". Reviewed by: markj, ziaee, mckusick (mentor) Approved by: markj, mckusick (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48384
* linuxkpi: Call `lkpi_fpu_safe_exec()` in the implementation of kvmalloc()Jean-Sébastien Pédron2025-08-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | `kvmalloc()` was a simple wrapper around the FreeBSD native `malloc()`. Unlike the more involved implementation of `kmalloc()`, it didn't end and being the FPU context around the actual call to `malloc()`. This caused the following panic in the amdgup DRM driver: panic: malloc: called with spinlock or critical section held ... triggered by the call: struct dc_3dlut *lut = kvzalloc(sizeof(*lut), GFP_KERNEL); (for the record, GFP_KERNEL is defined as M_WAITOK) Replicating the same behaviour as `kmalloc()`, in other words, ending the FPU context before the call to the underlying `malloc()`, and beginning it again afterwards solves the problem. Reviewed by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51557
* LinuxKPI: pci: use unsigned int for vendor/device argumentsBjoern A. Zeeb2025-07-311-2/+2
| | | | | | | | | | | | | Linux drivers may pass a typed PCI_ANY_ID (-1U) in which then leads to a warning that the value gets truncated. Switch argument types to unsigned int (or uint32_t as we use in struct pci_device_id) to avoid the problem. Sponsored by: The FreeBSD Foundation Discussed in: D50008 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51652
* LinuxKPI: pci: fix argument type to linuxkpi_pci_iomap[_range]Bjoern A. Zeeb2025-07-311-4/+4
| | | | | | | | | | | | | The last argument (maxlen) to linuxkpi_pci_iomap_range and linuxkpi_pci_iomap is an unsigned long not an int. LinuxKPI is not using that argument in the end but fix it where needed. While here adjust the name to 'maxlen' and remove the "mmio_" to bar and off. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51651
* LinuxKPI: pci: harmonize #definesBjoern A. Zeeb2025-07-311-20/+28
| | | | | | | | | | | | | | In some blocks of #defines spacing, trailing \ and indentation of a second line differed. Some of them are currently fine on a single line but future additions may not fit in that scheme. Harmonize them into a #define X\t\t\t...\\n<4 spaces>Y scheme. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51650
* LinuxKPI: acpi: fix guid_t argument typeBjoern A. Zeeb2025-07-311-2/+2
| | | | | | | | | | | | | | | acpi_check_dsm() and acpi_evaluate_dsm_typed() take a guid_t argument and not a char *. For in-tree Linux based drivers this leads to a compile error due to a warning. Fix the function argument type and cast internally. While this made the long statements in the wrapper functions for *_dsm_* even less readable split them up using a local variable. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51649
* LinuxKPI: Have kvzalloc() rely on kvmalloc(), not kmalloc()Olivier Certner2025-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | Since commit 19df0c5abcb9d4e9 ("LinuxKPI: make __kmalloc() play by the rules"), kmalloc() systematically allocates contiguous physical memory, as it should. However, kvzalloc() was left defined in terms of kmalloc(), which makes it allocate contiguous physical memory too. This is a too stringent restriction, as kvzalloc() is supposed to be a simple page-zeroing wrapper around kvmalloc(). According to Linux's documentation ("memory-allocation.rst"), kvmalloc() first tries to allocate contiguous memory, falling back to non-contiguous one if that fails. Thus, callers are already supposed to deal with the possibility of non-contiguous memory being returned. Reviewed by: bz Fixes: 19df0c5abcb9 ("LinuxKPI: make __kmalloc() play by the rules") MFC after: 10 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51247
* LinuxKPI: acpi: add acpi_evaluate_dsm()Bjoern A. Zeeb2025-07-041-0/+6
| | | | | | | | | | Add a acpi_evaluate_dsm() wrapper around the native implementation as needd by wireless drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50864
* LinuxKPI: acpi: provide union [linuxkpi]_acpi_(object|buffer)Bjoern A. Zeeb2025-07-041-5/+71
| | | | | | | | | | | | | | | | | | | | | | | | Provide union acpi_(object|buffer) as linuxkpi_ versions and in Linux native lower case spelling so that driver code compiles unmodified. Use the linuxkpi_ prefix to avoid name clashes with the native ACPI implementation which uses CamelCase. Use the linuxkpi_ names internally and redefine the linuxkpi_ unions to their native names so they are avail as expected in drivers. As a transition to not break drm-kmod which has in-place (no #ifdef) changes from Linux spelling ot FreeBSD spelling, introduce LINUXKPI_WANT_LINUX_ACPI so we have the Linux spelling as an opt-in. That way the transition can happen gracefully and once "top-of-trees" are all sorted we can remove the #ifdefs here again. Bump __FreeBSD_version to be able to detect this change. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: wulf (previous version), dumbbell Differential Revision: https://reviews.freebsd.org/D50863
* LinuxKPI: device.h add (*shutdown)Bjoern A. Zeeb2025-07-041-0/+2
| | | | | | | | | | | | | | There are too many ways to call (*shutdown)() and others in Linux it seems; rather than using the one from dev_pm_ops or directly on the bus system device, some wireless drivers are setting it on struct device_driver so add it. Bump __FreeBSD_version as this changes the size of various other structs which have struct device_driver embedded. Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50679
* LinuxKPI: MODULE_DEVICE_TABLE() factor out the bus specific MODULE_PNP_INFO()Bjoern A. Zeeb2025-07-041-2/+5
| | | | | | | | | | | | | | | | | In order to be able to use MODULE_DEVICE_TABLE() with multiple bus attachments, factor out the bus-specfic MODULE_PNP_INFO() and place it next to the structure defining the table. As it turns out bnxt(4) has been using the MODULE_DEVICE_TABLE() with PCI attachments for the "auxillary" bus so far. That makes little sense. Define the MODULE_PNP_INFO() to nothing for that. We may consider pulling these LinucKPI bits in semi-native drivers into LinuxKPI one day as that route is not really sustainabke. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: imp, dumbbell Differential Revision: https://reviews.freebsd.org/D51049
* LinuxKPI: MODULE_DEVICE_TABLE() remove hard coded pciBjoern A. Zeeb2025-07-041-1/+1
| | | | | | | | | | | | | While we currently only use MODULE_DEVICE_TABLE() for pci (or so I thought [*]), this may soon change. Remove a hard coded "pci" for the bus and use the bus name passed in as _bus. [*] see follow-up change Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: imp, dumbbell Differential Revision: https://reviews.freebsd.org/D51048
* linuxkpi: Remove incorrect + 1 from HWEIGHT* macrosEd Maste2025-06-241-4/+4
| | | | | | | Fixes: 4cc8a9da491d ("LinuxKPI: add HWEIGHT32()") Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51010
* linuxkpi: Add `pm_runtime_get_if_active()` variant from Linux 6.9Jean-Sébastien Pédron2025-06-231-0/+5
| | | | | | | | | | | | With Linux 6.9, `pm_runtime_get_if_active()` lost its second `bool` argument. This change is put behind a check of `LINUXKPI_VERSION` to keep compatibility. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50991
* linuxkpi: Define `div64_ul()` as a synonym to `div64_u64()`Jean-Sébastien Pédron2025-06-231-0/+2
| | | | | | Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50986
* vm: retire vm_page_lock()Alan Cox2025-06-112-4/+2
| | | | | | | | | | | vm_page_lock() and its underlying array of locks, pa_lock[], have been replaced throughout the virtual memory system by either atomics or busy-style, per-page synchronization. The Linux KPI support contained the only remaining use cases. Eliminate or update them as appropriate to each case. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D50767
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-114-4/+4
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* net80211: LinuxKPI: migrate HE defines to net80211, put correct valuesBjoern A. Zeeb2025-06-092-174/+2
| | | | | | | | | | | | | | | | | Migrate most LinuxKPI 802.11 definitions for HE IEs to net80211. During that process also properly define them as most of them only had dummy values. Some of the definitions are sparse; that is, only the bits used by drivers so far were listed and annotated with the standards section. There seems to be little point to mangle the names and have two copies of all these bit field definitions. We can add "_S" (shift/mask) variants to those we need in net80211 (if we do). Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50677
* net80211: LinuxKPI: migrate HE IE structs from LinuxKPI to net80211Bjoern A. Zeeb2025-06-092-28/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Take the HE IE structures as they are used by drivers and put them into net80211 rather than LinuxKPI. There is little need to re-invent the wheel on those. They settled for long enough. Do not export them by default to user space as some also overlap with wpa and we still do not have a clear distinction for what is available only in kernel and what to user space. In our case ifconfig(8) is a consumer of these structs which it can setting WANT_NET80211 like we have done for some VHT bits before. Add struct net80211_he_cap which holds the IE fields but also a bool and is meant to be put into ic/vap/ni. The bool will give us the same naming for all layers rather than having individual flags in each part which was highly confusing. In theory this struct should be in ieee80211_var.h but that would pull things apart. Extend struct ieee80211_mu_edca_param_set by a union as it will help ifconfig(8) parsing the bk/be/vi/vo parts. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50676
* LinuxKPI: 802.11: update HE structuresBjoern A. Zeeb2025-06-031-11/+17
| | | | | | | | Update strutures needed for 11ax (HE) to be correct. Add references to the standard. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: add ieee80211_purge_tx_queue()Bjoern A. Zeeb2025-06-031-1/+8
| | | | | | | Add ieee80211_purge_tx_queue() dummy function needed by rtw88 SDIO. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: skbuff: add dummy skb_copy_header()Bjoern A. Zeeb2025-06-031-0/+7
| | | | | | | | There's one case which needs skb_copy_header(); add a dummy function for now until we get to the code which uses it to test an implementation. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: use macros for lockingBjoern A. Zeeb2025-06-031-13/+4
| | | | | | | | | Rather than using inline functions use macros so we know where we are taking the lock in the code rather than only recording the inline function location. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: netdev features style, annotate, and add %b decoding maskBjoern A. Zeeb2025-06-031-10/+14
| | | | | | | | | | | | | | | | Start to sort through the netdevice features to match them with FreeBSD. Annotate them a bit more verbose though the names are pretty telling already. While here adjust style(9) as well. Lastly add the bit definitions for use with printf(9) %b as names read easier than bitmasks. We will use that in LinuxKPI 802.11. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: skbuff: make csum_unfold return __wsumBjoern A. Zeeb2025-06-031-1/+1
| | | | | | | | | Given the internal field now stores a __wsum csum (after we added the type) also make sure csum_unfold() returns a __wsum. Sponsored by: The FreeBSD Foundation MFC after: 3 days Fixes: 59481c7db234
* LinuxKPI: Implement dma_map_resource/dma_unmap_resource functionsBjoern A. Zeeb2025-06-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | dma_map_resource() and dma_unmap_resource() functions are used to map and unmap of memory-mapped IO resources so they can be accessed by the device. Required by drm-kmod v5.5 to be built. While for drm-kmod 6.6-lts only amdgpu uses these in one place and the code apparently has not been exercised a lot it has been around like this for years. With changing the underlying implementations bring it into the tree; should we find errors with it they can also be fixed here. Bump __FreeBSD version to be able to detect this change. Obtained from: D30933 (by wulf) Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D49625
* LinuxKPI: add missing bus_dmamap_sync() calls or exclude themBjoern A. Zeeb2025-06-031-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename linux_dma_unmap() to lkpi_dma_unmap(), and linux_dma_map_phys() to lkpi_dma_map_phys() so that we get the full set of function arguments (direction and attributes were missing). Leave the old functions as wrappers as they are called from drm-kmod linuxkpi/bsd still, and leaving them also allows us to MFC this change. Add missing bus_dmamap_sync() calls. Rather than inlining them in each inline function push them down to the actual implementation. From there do not inline them either but call the appropriate function dealing with the sync so that we do not have the same code splattered in many places. Adhere to the DMA_ATTR_SKIP_CPU_SYNC attribute and skip synching when requested. A previous, less complete version of this change already allowed me to load firmware on arm64 for iwlwifi (again). There are four more places which are not currently done as the functions which came with an OFED sync a long time ago seem to be unused these days. Leaving a pr_debug("TODO") call there. Also dma_[un]map_resource() when brought in from drm-kmod/linuxkpi/bsd (D30933) should be adjusted to pass the full arguments as the amdgpu callers are requesting to skip synching. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45294
* LinuxKPI: add struct_group_tagged()Bjoern A. Zeeb2025-05-281-5/+21
| | | | | | | | | | | Restructure struct_group() into a wrapper around __struct_group(). Various callers have arguments annotated as /* no foo */ so try to add all we can find. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50157
* LinuxKPI: 802.11: mark struct ieee80211_ht_cap __packedBjoern A. Zeeb2025-05-261-2/+2
| | | | | | | | | | | | | | In lkpi_sta_sync_ht_from_ni() we are casting the information element (IE) data to this struct as net80211 does not save the mcs/rx_mask. Not marking the structs packed results in the mcs information not being copied correctly and rx_nss calculations possibly being off. Even worse, at a later stage iwlwifi mvm/rs.c would extract the mcs values from the same field to pass to the firmware which will than crash in an assert as we would want to do HT with an empty MCS set. Sponsored by: The FreeBSD Foundation MFC after: sunrise Discovered: while testing other features on arm64.
* linuxkpi: Add `folio` and `folio_batch` APIsJean-Sébastien Pédron2025-05-129-2/+183
| | | | | | | | | | | | | | They are used by the i915 DRM driver in Linux 6.6 (although this change was only backported with Linux 6.7 DRM drivers). `struct folio` simply wraps `struct page` for now. `struct folio_batch` is the same as `struct pagevec` but it works with `struct folio` instead of `struct page` directly. Reviewed by: bz, kib, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48743
* linuxkpi: Make "free page" code paths closer to LinuxJean-Sébastien Pédron2025-05-121-1/+2
| | | | | | | | | | | | | | | There is basically one code path to free pages on Linux. In particular, `free_pages()` is used for other pages than those returned by `alloc_pages()`. Also on Linux, `release_pages()` takes either `struct page` or `struct folio`. `struct folio` support will be added in a followup commit. Regardless, because pages come from several sources, `linux_free_pages()` need to accept managed and unmanaged pages. Reviewed by: bz, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49813
* linuxkpi: Constify `struct page` arg to `linux_page_address()`Jean-Sébastien Pédron2025-05-121-1/+1
| | | | | | Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49812
* linuxkpi: Move `put_page()` closer to `get_page()`Jean-Sébastien Pédron2025-05-121-6/+6
| | | | | | | | | This is to prepare a future change to the implementation and make it easier to review. Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49811
* linuxkpi: Move `release_pages()` to linux_page.cJean-Sébastien Pédron2025-05-122-9/+3
| | | | | | | | | We want to avoid putting code managing memory in inline functions in the future. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49810
* linuxkpi: Add `woken_wake_function()` and `wait_woken()`Jean-Sébastien Pédron2025-05-121-3/+11
| | | | | | | | | | | They are used by the i915 DRM driver starting with Linux 6.7. `(struct wait_queue)->flags` is no longer always zero. I wonder if some code relied on this... Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48755