<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/compat/linuxkpi/common/include/linux, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>linuxkpi: Pass a `const void *` to `krealloc()`</title>
<updated>2026-04-21T22:18:26+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-13T23:59:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bbd20c0795a7df35fc665165bf5f17d7f6533e54'/>
<id>bbd20c0795a7df35fc665165bf5f17d7f6533e54</id>
<content type='text'>
This matches the API on Linux.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56451
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This matches the API on Linux.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56451
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Add `fop_flags` to `struct file_operations`</title>
<updated>2026-04-21T22:18:26+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-13T23:12:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a5ae030d9f8f5557502c4e51d2a083a70c513379'/>
<id>a5ae030d9f8f5557502c4e51d2a083a70c513379</id>
<content type='text'>
... along with the `FOP_*` flag constants.

Note that this `fop_flags` field is not used on FreeBSD. It is added to
make the DRM drivers compile out of the box.

The DRM generic code and drivers started this in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56450
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... along with the `FOP_*` flag constants.

Note that this `fop_flags` field is not used on FreeBSD. It is added to
make the DRM drivers compile out of the box.

The DRM generic code and drivers started this in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56450
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Include &lt;linux/uuid.h&gt; from &lt;linux/mod_devicetable.h&gt;</title>
<updated>2026-04-21T22:18:26+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-13T22:38:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=18c71d97b227e0c6c1d11aa1fd168d19523a3b2e'/>
<id>18c71d97b227e0c6c1d11aa1fd168d19523a3b2e</id>
<content type='text'>
The DRM generic code started to deppend on this indirect include of
&lt;linux/uuid.h&gt; in Linux 6.12.

Reviewed by:	bz, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56449
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DRM generic code started to deppend on this indirect include of
&lt;linux/uuid.h&gt; in Linux 6.12.

Reviewed by:	bz, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56449
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Add several `guid_*()` functions</title>
<updated>2026-04-21T22:18:25+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-13T22:36:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cefd0ae770bfad534ec666099489a869387e8836'/>
<id>cefd0ae770bfad534ec666099489a869387e8836</id>
<content type='text'>
The DRM generic code and the amdgpu DRM driver started to use several of
these functions in Linux 6.12. Likewise for `UUID_SIZE`.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56448
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DRM generic code and the amdgpu DRM driver started to use several of
these functions in Linux 6.12. Likewise for `UUID_SIZE`.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56448
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Define `MINORBITS`</title>
<updated>2026-04-21T22:18:25+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-13T21:47:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ae1f6954e2c82ad7f1d8b80155a921b908d51756'/>
<id>ae1f6954e2c82ad7f1d8b80155a921b908d51756</id>
<content type='text'>
We can't really define a proper value for this constant because minor
and major are encoded in a complex way on FreeBSD which cannot be
represented with a simple shift.

The DRM generic code started to use it in Linux 6.12.

In this context, `MINORBITS` is used to define an upper limit passed to
`xa_alloc()`. Therefore it is not used to encode or decode minors. It is
used as an arbitrary value. Therefore, we define the constant to 20,
like on Linux.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56447
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can't really define a proper value for this constant because minor
and major are encoded in a complex way on FreeBSD which cannot be
represented with a simple shift.

The DRM generic code started to use it in Linux 6.12.

In this context, `MINORBITS` is used to define an upper limit passed to
`xa_alloc()`. Therefore it is not used to encode or decode minors. It is
used as an arbitrary value. Therefore, we define the constant to 20,
like on Linux.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56447
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Define `sort_r()`</title>
<updated>2026-04-21T22:18:25+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-11T12:42:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4dab15e96d40352e1a0b161a2a1cd763176108b6'/>
<id>4dab15e96d40352e1a0b161a2a1cd763176108b6</id>
<content type='text'>
Like Linux `sort()` and FreeBSD `qsort()`, `sort_r()` is a wrapper
around FreeBSD `qsort_r()`.

The i915 DRM driver started to use it in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56437
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like Linux `sort()` and FreeBSD `qsort()`, `sort_r()` is a wrapper
around FreeBSD `qsort_r()`.

The i915 DRM driver started to use it in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56437
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Define `__GFP_THISNODE`</title>
<updated>2026-04-21T22:18:24+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-11T10:23:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8f95998393f42f368fe22abd9a25c7fa4304e02a'/>
<id>8f95998393f42f368fe22abd9a25c7fa4304e02a</id>
<content type='text'>
It is used to force the NUMA node to allocate from. This flag is
unimplemented for now because we don't have an implementation of
`alloc_pages_node()` yet.

The DRM TTM code started to use this flag in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56436
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is used to force the NUMA node to allocate from. This flag is
unimplemented for now because we don't have an implementation of
`alloc_pages_node()` yet.

The DRM TTM code started to use this flag in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56436
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Define `dev_err_probe*()`</title>
<updated>2026-04-21T22:18:24+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-11T09:40:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2357de8ea14f9ee6193eb9e31a9c208e1541163a'/>
<id>2357de8ea14f9ee6193eb9e31a9c208e1541163a</id>
<content type='text'>
They differ from other `dev_*()` logging functions by returning the
passed error code. The error code is also used to determine if the
message should be logged in the first place and at which log level.

The DRM generic code started to use it in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56435
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They differ from other `dev_*()` logging functions by returning the
passed error code. The error code is also used to determine if the
message should be logged in the first place and at which log level.

The DRM generic code started to use it in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56435
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Define diagnostic macros like `might_resched()` or `cant_sleep()`</title>
<updated>2026-04-21T22:18:24+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-11T09:37:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ad528a6b174e7090cb06062867e9a146b017205d'/>
<id>ad528a6b174e7090cb06062867e9a146b017205d</id>
<content type='text'>
They are no-ops on FreeBSD.

While here, move the already defined `might_sleep*()` macros from
&lt;linux/wait.h&gt; to &lt;linux/kernel.h&gt; where they belong.

The DRM generic code started to use `might_fault()` in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56434
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They are no-ops on FreeBSD.

While here, move the already defined `might_sleep*()` macros from
&lt;linux/wait.h&gt; to &lt;linux/kernel.h&gt; where they belong.

The DRM generic code started to use `might_fault()` in Linux 6.12.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56434
</pre>
</div>
</content>
</entry>
<entry>
<title>LinuxKPI: 802.11: set IEEE80211_MIN_ACTION_SIZE according to struct</title>
<updated>2026-04-18T12:00:00+00:00</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2026-04-15T07:50:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f252ce00898d17f4892534934b8097cd7ccb9e26'/>
<id>f252ce00898d17f4892534934b8097cd7ccb9e26</id>
<content type='text'>
IEEE80211_MIN_ACTION_SIZE came up in the mt76 vendor subtree merge
as one of the non-mechanical changes which made me look.
Rather than (incorrectly) hand counting the offset from the beginning
of a frame, use the offset from the beginning of struct ieee80211_mgmt.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IEEE80211_MIN_ACTION_SIZE came up in the mt76 vendor subtree merge
as one of the non-mechanical changes which made me look.
Rather than (incorrectly) hand counting the offset from the beginning
of a frame, use the offset from the beginning of struct ieee80211_mgmt.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
</pre>
</div>
</content>
</entry>
</feed>
