* linuxkpi: Add `__GFP_NOMEMALLOC` kmalloc flag.
* linuxkpi: Update `struct irq_work`.
The previous `llnode` field is moved inside another field `node`.
This `node` field is a `struct __call_single_node` in Linux. Here, we simply add an anonymous struct with the `llnode` field inside. That field's new name is `llist` now.
* linuxkpi: Include <linux/shinker.h> in <linux/mm.h>.
This is done like this in Linux.
* linuxkpi: Introduce `vma_set_file()`.
This code was moved from the i915 driver in Linux 5.11.
* linuxkpi: Introduce module_param() of type `hexint`.
In Linux, this affects how the value is formatted. In FreeBSD, this remains an unsigned integer.
* linuxkpi: Add `krealloc_array()`.
In FreeBSD, this is a wrapper on top of `realloc()`.
* linuxkpi: Add <acpi/actbl.h>.
It simply includes the same header in FreeBSD (which is located elsewhere).
* linuxkpi: Add <linux/page-flags.h>.
It just provides a `PageHighMem()` macro stub.
* linuxkpi: Add <linux/mmzone.h>.
It provides the `MAX_ORDER` constant.
* linuxkpi: Add <linux/dma-buf-map.h>.
I took the implementation from OpenBSD, commit d55ef580b1748517027c3eabdb715316ca5b1442.
The only difference is the addition of `dma_buf_map_is_equal()`.
* linuxkpi: Define `typeof_member()` in <linux/kernel.h>.
* linuxkpi: Add `seqcount_mutex_t` support in <linux/seqlock.h>.
To achieve that, the header uses the C11 type generic selection keyboard `_Generic()` because the macros are supposed to work with `seqcount_t` and `seqcount_mutex_t`.
* linuxkpi: Add `cmpxchg64()` in <asm/atomic.h>.
I defined it as an alias to `cmpxchg()`, not sure it is correct...
* linuxkpi: Add `list_for_each_entry_from_rcu()` in <linux/rculist.h>.
* linuxkpi: Add `dev_warn_once()` in <linux/device.h>.
* linuxkpi: Define `boot_cpu_data.x86_max_cores`.
* linuxkpi: Add <linux/mman.h> which includes <linux/smp.h>.
This is used by `i915_gem.c` in the i915 DRM driver to get access to `wbinvd_on_all_cpus()`.
I still have some questions:
# `struct irq_work` was changed in an incompatible way. I'm thinking of adding a `#define` beside the new structure so that drivers can check it to determine how to use it, and thus have a single code base working with multiple versions of FreeBSD. What do you think?
# I'm not sure about making `cmpxchg64()` an alias of `cmpxchg()`. It will probably break on 32bit archs.
**Test Plan:**
There are some instructions on the GitHub pull request submitting the DRM driver update:
https://github.com/freebsd/drm-kmod/pull/163#issuecomment-1157699164
**Reviewers:**
@manu