LinuxKPI: page pool updates and add to the build
Split implementation out from the header files.
This "page pool" is the very minimalistic version we need in order to
support packets on mt76.
We allocate the page pool in order to have the meta data available of
which we only make limited use.
This implementation does no pooling, it does no page fragments for now,
it always hands out a full page and frees it upon return.
It is written in a way that it can be in the tree before the 'struct page'
work it depends on has landed in order to reduce friction for people who
want to try mt7921 (or others later) upfront. We use the same #ifdef
as in the struct page work for that reason so one knob will turn everything
on or off.
Once the struct page work has landed and settled we can start filling this
with more complexity.
[8 lines not shown]
LinuxKPI: page.h: resort lines
Two of the "page macros" can be abstracted elsewhere in the upcoming
struct page work, so sort them away from the four which are here to
stay.
No functional change.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D58299
LinuxKPI: page.h: use atop() and ptoa() instead of PAGE_SHIFT
With upcoming changes to 'struct page' this will make the lines
easier to read by using the predefined macros from param.h.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: markj, kib
Differential Revision: https://reviews.freebsd.org/D58298
LinuxKPI: prefer struct page [*] over struct vm_page[_t]
LinuxKPI is based on Linux 'struct page' which is currently aliased
to struct vm_page. Upcoming changes may change that so start using
'struct page *' instead vm_page_t to make future changes transparent.
This is a continuation of 9e9c682ff3a1 and should be a NOP.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste (no objections)
Differential Revision: https://reviews.freebsd.org/D58297
LinuxKPI: move clear_page() within the linux/page.h file
clear_page() would normally live in asm/page.h but adding the file
and fixing the dependencies would be too much for a single line.
Move the function to the end of the file with a clear separator
and make it clear that it does not operate on a 'struct page'
but on a page address by changing the argument name and leaving
a comment.
The function is currently used by at least mthca(4) as the only
in-tree consumer, and drm-kmod ttm_pool.c.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D58296
LinuxKPI: pci: fix dma handle type in match function
dma_addr_t is a vm_paddr_t which is a uint of some width. Rather than
passing pointers of it around pass the value.
Comparing the addresses of different storage for the same dma handle
(the actual bug here) will not work when passed to the devres match
function.
Sponsored by: The FreeBSD Foundation
Fixes: 0a575891211ef ("implement dmam_free_coherent()")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D58285
mail/bogofilter*: fix unaligned access on some databases
This was found with the undefined behavior sanitizer,
and affects the generic code (independent of the concrete database
back-end in use) so we need to bump all PORTREVISIONS.
The bug was that internal code was casting a void * to a uint32_t *
without ensuring alignment of the source value.
Let's use memcpy to a statically-sized array and let the optimizer
handle it for us. Adds files/patch-src_datastore.c.
PR: 297024
MFH: 2026Q3
(cherry picked from commit edee11f3ade730ece6643703213c3823d67b8138)
mail/bogofilter*: fix unaligned access on some databases
This was found with the undefined behavior sanitizer,
and affects the generic code (independent of the concrete database
back-end in use) so we need to bump all PORTREVISIONS.
The bug was that internal code was casting a void * to a uint32_t *
without ensuring alignment of the source value.
Let's use memcpy to a statically-sized array and let the optimizer
handle it for us. Adds files/patch-src_datastore.c.
PR: 297024
MFH: 2026Q3
mail/bogofilter*: Prepare LMDB 1.0 transition
Here's what we do now:
- mail/bogofilter currently depends on lmdb0, a 0.9.X port, so
it continues to work as before
- add a new mail/bogofilter-lmdb1 port that depends on lmdb, the 1.0
version of the LMDB database.
- add the upstream patch for bogofilter 1.3.0.rc1 that I made and
that delphij@ prepared for integration into the ports tree - thanks!
Here's the plan for end of 2026:
- AT THE SAME TIME:
- upgrade mail/bogofilter to depend on LMDB 1.0
- portrm mail/bogofilter-lmdb1
- add a MOVED entry to redirect from bogofilter-lmdb1 to bogofilter.
While here, clean up and rearrange the Makefiles.
PR: 296519
[5 lines not shown]