<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/modules/linuxkpi, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>linuxkpi: Add eventfd_*()</title>
<updated>2026-01-25T16:04:44+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2025-05-26T18:12:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a200c8e51cdb4586ad2eb20d2b45ba367f00beaf'/>
<id>a200c8e51cdb4586ad2eb20d2b45ba367f00beaf</id>
<content type='text'>
Add &lt;linux/eventfd.h&gt; and expose the `eventfd_*()` API. This is used by
DRM drivers for some time, but the code was commented out so far.

Note that Linux uses `struct eventfd_ctx`, but FreeBSD defines `struct
eventfd`. We define `eventfd_ctx` as a synonym to `eventfd`.

Reviewed by:	christos, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50853
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add &lt;linux/eventfd.h&gt; and expose the `eventfd_*()` API. This is used by
DRM drivers for some time, but the code was commented out so far.

Note that Linux uses `struct eventfd_ctx`, but FreeBSD defines `struct
eventfd`. We define `eventfd_ctx` as a synonym to `eventfd`.

Reviewed by:	christos, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50853
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Implement &lt;linux/seq_buf.h&gt;</title>
<updated>2026-01-24T19:16:14+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2025-08-11T17:51:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=710167623d82664ab4276776aed502ab6f91d8ff'/>
<id>710167623d82664ab4276776aed502ab6f91d8ff</id>
<content type='text'>
It is a wrapper above a `char *` to track the overall available space in
the buffer as well as the used space. This wrapper does not manage
memory allocation.

The DRM generic code started to use this in Linux 6.10.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54488
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is a wrapper above a `char *` to track the overall available space in
the buffer as well as the used space. This wrapper does not manage
memory allocation.

The DRM generic code started to use this in Linux 6.10.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54488
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Add &lt;linux/siphash.h&gt;</title>
<updated>2026-01-05T19:32:50+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2025-09-07T13:43:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d448578b445da95806ef9af996a0db9754daadeb'/>
<id>d448578b445da95806ef9af996a0db9754daadeb</id>
<content type='text'>
The file is copied as is from Linux 6.10 as it dual-licensend under the
GPLv2 and BSD 3-clause.

The amdgpu DRM driver started to use it in Linux 6.10.

Reviewed by:	bz, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54501
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The file is copied as is from Linux 6.10 as it dual-licensend under the
GPLv2 and BSD 3-clause.

The amdgpu DRM driver started to use it in Linux 6.10.

Reviewed by:	bz, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54501
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Add `folio` and `folio_batch` APIs</title>
<updated>2025-05-12T17:08:03+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2025-04-13T11:23:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e3b16f53a6455903a7e814045584fe203d4fff64'/>
<id>e3b16f53a6455903a7e814045584fe203d4fff64</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: Move `struct kobject` code to `linux_kobject.c`</title>
<updated>2023-12-13T18:18:46+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2023-12-08T17:58:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=80446fc7b5e5d22e2bac28bc0474dbe2fec83e43'/>
<id>80446fc7b5e5d22e2bac28bc0474dbe2fec83e43</id>
<content type='text'>
[Why]
`linux_compat.c` is already too long. I will need to add `struct kset`
in a follow-up commit, so let's move the existing `struct kobject` code
to its own file.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D43019
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Why]
`linux_compat.c` is already too long. I will need to add `struct kset`
in a follow-up commit, so let's move the existing `struct kobject` code
to its own file.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D43019
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:54:58+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=031beb4e239bfce798af17f5fe8dba8bcaf13d99'/>
<id>031beb4e239bfce798af17f5fe8dba8bcaf13d99</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>LinuxKPI: define LINUXKPI_INCLUDES for module builds as well</title>
<updated>2022-09-26T19:34:01+00:00</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2022-09-23T21:18:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=514fb3872166a361faa81d89909f65913e90b1b2'/>
<id>514fb3872166a361faa81d89909f65913e90b1b2</id>
<content type='text'>
While for in-kernel we already have LINUXKPI_INCLUDES in kern.pre.mk
for kmod builds we've not had a common define to use leading to various
spellings of include paths.

In order for the include list to be expanded more easily in the future,
e.g., adding the "dummy" includes (for all) and to harmonize code,
duplicate LINUXKPI_INCLUDES to kmod.mk and use it for all module Makefiles.

MFC after:	1 week
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D36683
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While for in-kernel we already have LINUXKPI_INCLUDES in kern.pre.mk
for kmod builds we've not had a common define to use leading to various
spellings of include paths.

In order for the include list to be expanded more easily in the future,
e.g., adding the "dummy" includes (for all) and to harmonize code,
duplicate LINUXKPI_INCLUDES to kmod.mk and use it for all module Makefiles.

MFC after:	1 week
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D36683
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: drm-kmod debugfs support</title>
<updated>2022-09-20T17:41:10+00:00</updated>
<author>
<name>Jake Freeland</name>
<email>jfree@FreeBSD.org</email>
</author>
<published>2022-09-20T17:41:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f697b9432d9c7aa4c5ab5f5445ef5dc1bd40ce00'/>
<id>f697b9432d9c7aa4c5ab5f5445ef5dc1bd40ce00</id>
<content type='text'>
This diff extends LinuxKPI to support simple attribute files in debugfs.
These simple attributes are an essential component for compiling drm-kmod
with CONFIG_DEBUG_FS enabled.
This will allow for easier graphics driver debugging using
Intel's igt-gpu-tools.

Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D35883
Sponsored by:	Google, Inc. (GSoC 2022)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This diff extends LinuxKPI to support simple attribute files in debugfs.
These simple attributes are an essential component for compiling drm-kmod
with CONFIG_DEBUG_FS enabled.
This will allow for easier graphics driver debugging using
Intel's igt-gpu-tools.

Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D35883
Sponsored by:	Google, Inc. (GSoC 2022)
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: on i386 only use first_msi_irq if apic is in kernel config</title>
<updated>2022-09-01T12:08:15+00:00</updated>
<author>
<name>Tijl Coosemans</name>
<email>tijl@FreeBSD.org</email>
</author>
<published>2021-05-01T16:01:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fdc1894795efb5c9d97044a724c01d149c569440'/>
<id>fdc1894795efb5c9d97044a724c01d149c569440</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: fix module build outside of kernel build environment</title>
<updated>2022-03-10T21:31:23+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2022-03-10T21:31:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f5a2e7b0e8483bf51519046fd149a6a31acef6b1'/>
<id>f5a2e7b0e8483bf51519046fd149a6a31acef6b1</id>
<content type='text'>
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	3 days
</pre>
</div>
</content>
</entry>
</feed>
