<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/compat/linuxkpi, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-05-19T13:47:35Z</updated>
<entry>
<title>linuxkpi: fix 32-bit arm build</title>
<updated>2026-05-19T13:47:35Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2026-05-19T13:35:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8dad29555a5807bf21941807752e1589e20312de'/>
<id>urn:sha1:8dad29555a5807bf21941807752e1589e20312de</id>
<content type='text'>
The new KPI is only used in &lt;asm/set_memory.h&gt;, but it's provided in
linux_page.c.  The latter only includes the former indirectly by way of
&lt;linux/io.h&gt;, and that's only conditionally included outside of 32-bit
ARM there.

All of our archs have the necessary pmap_page_set_memattr(), so just
move the declaration into &lt;linux/page.h&gt; instead of trying to reason
about the usability of &lt;asm/set_memory.h&gt; directly in linux_page.c.

Reported by:	jenkins (via ivy)
</content>
</entry>
<entry>
<title>linuxkpi: work with numpages &gt; 1 in the set_pages_*() KPIs</title>
<updated>2026-05-19T03:22:21Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2026-05-19T03:22:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=67f7f2781daa9bd398b424ffe2bd0be67f37f03d'/>
<id>urn:sha1:67f7f2781daa9bd398b424ffe2bd0be67f37f03d</id>
<content type='text'>
These calls are used for buddy pages at least in drm's ttm_pool, which
leads to a panic when we invoke lowmem handlers and drm tries to shrink
the pool.

Cope with numpages &gt; 1 by traversing the contiguous pages and executing
the adjustment there, as well, as suggested by markj@.  Previous
versions have tried to use the corresponding `set_memory_*()` functions,
but it is believed that not updating `md.pat_mode` breaks subsequent
userspace mappings in ways that may result in things like screen tearing
or other artifacts when running i915kms.

This stabilized my amdgpu laptop running two VMs, chromium and a
concurrent buildworld.

Reviewed by:	bz, markj
Differential Revision:	https://reviews.freebsd.org/D57004
</content>
</entry>
<entry>
<title>sys: Use is_pci_device instead of direct comparisons to devclasses</title>
<updated>2026-05-18T18:52:23Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-05-18T18:52:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6dc813301a173e2e1993c3064df162e6218c1231'/>
<id>urn:sha1:6dc813301a173e2e1993c3064df162e6218c1231</id>
<content type='text'>
Reviewed by:	bz
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D56997
</content>
</entry>
<entry>
<title>LinuxKPI: Check the devclass of the parent device in dev_is_pci</title>
<updated>2026-05-18T18:44:00Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-05-18T18:44:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6a043d0814a29e756f5d26e7b59a360e1d6dfa45'/>
<id>urn:sha1:6a043d0814a29e756f5d26e7b59a360e1d6dfa45</id>
<content type='text'>
Reviewed by:	bz
Fixes:		c41d83548b6c ("LinuxKPI: pci.h add more defines and functions")
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D57066
</content>
</entry>
<entry>
<title>linux/io: handle memtype_wc mapping for !DMAP range</title>
<updated>2026-05-14T14:25:09Z</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2026-05-14T14:20:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=988c03980452a56fb0fbb15e18b0a644602d0ab3'/>
<id>urn:sha1:988c03980452a56fb0fbb15e18b0a644602d0ab3</id>
<content type='text'>
The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.

When INVARIANTS is enabled, this results in the following:

  panic: physical address 0x880000000 not covered by the DMAP

Add a guard against triggering the KASSERT in PHYS_TO_DMAP().

This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.

Tested by:	kevans
Reviewed by:	kib, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D56971
</content>
</entry>
<entry>
<title>power: Rename sleep types</title>
<updated>2026-05-11T17:11:39Z</updated>
<author>
<name>Aymeric Wibo</name>
<email>obiwac@FreeBSD.org</email>
</author>
<published>2026-05-11T17:11:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95b4436e989df29f6368f13832cb13d7cbc52eac'/>
<id>urn:sha1:95b4436e989df29f6368f13832cb13d7cbc52eac</id>
<content type='text'>
Make sleep type names clearer and more consistent, and allow space for
something like "os_hibernate" once that gets added to FreeBSD.

Reviewed by:	jaeyoon, olce, markj
Approved by:	jaeyoon, olce, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D56920
</content>
</entry>
<entry>
<title>sys/cdefs.h: Introduce __maybe_unused attribute</title>
<updated>2026-05-06T19:51:46Z</updated>
<author>
<name>Hans Rosenfeld</name>
<email>rosenfeld@grumpf.hope-2000.org</email>
</author>
<published>2026-04-16T18:22:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=84a95741805d84f0074a34d61b93ccf86f422cf3'/>
<id>urn:sha1:84a95741805d84f0074a34d61b93ccf86f422cf3</id>
<content type='text'>
The __maybe_unused attribute should be used for variables which may or
may not be used, such as when their only use is in an assertion. This
attribute is functionally identical to __unused, suppressing compiler
warnings for particular variable if it remains unused.

Reviewed by:	Minsoo Choo &lt;minsoo@minsoo.io&gt;, imp
Differential Revision:	https://reviews.freebsd.org/D56517
</content>
</entry>
<entry>
<title>linuxkpi: Implement `module_*()` APIs as static functions</title>
<updated>2026-05-04T19:13:43Z</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-05-04T07:45:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=658bb99db9c7872f92ccb86ed2674c72636436d2'/>
<id>urn:sha1:658bb99db9c7872f92ccb86ed2674c72636436d2</id>
<content type='text'>
This fixes an "unused variable" warning when building DRM drivers.

Reviewed by:	emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56780
</content>
</entry>
<entry>
<title>sx: Add `sx_has_waiters()` macro</title>
<updated>2026-04-30T11:40:05Z</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-12T17:20:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eebb643bb3799ae90dd248f0b5047ec481b26f68'/>
<id>urn:sha1:eebb643bb3799ae90dd248f0b5047ec481b26f68</id>
<content type='text'>
This macro will return non-zero if there are threads waiting for this
lock; otherwise, it will return zero.

The function assumes (but does not assert) that the caller already holds
the lock and that it is interested in other threads waiting for it to
release the lock.

The motivation to add this is the implementation of
`rwsem_is_contended()` in linuxkpi.

This Linux function indicates the same thing to the caller: if other
threads are waiting for this semaphore.

The amdgpu DRM driver started to use `rwsem_is_contended()` in Linux
6.12.

Reviewed by:	bz, olce
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56443
</content>
</entry>
<entry>
<title>linuxkpi: Define `VFM_*()` macros in &lt;asm/cpu_device_id.h&gt;</title>
<updated>2026-04-30T11:40:01Z</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2026-04-22T16:23:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=65dc0e9071a5ea206d6fbf070c974ebcfdea3680'/>
<id>urn:sha1:65dc0e9071a5ea206d6fbf070c974ebcfdea3680</id>
<content type='text'>
They use another set of constants and macros in &lt;asm/intel-family.h&gt;.

All these macros are defined regardless of the architecture, even though
they are specific to x86. Perhaps we should restrict them using #ifdefs.

The amdgpu DRM driver started to used `VFM_MODEL()` and the
`INTEL_*LAKE*` constants in Linux 6.12.x.

Reviewed by:	bz, olce
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56585
</content>
</entry>
</feed>
