History log of /freebsd/sys/compat/linuxkpi/common/include/linux/mm.h (Results 1 – 25 of 59)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e3b16f53 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `folio` and `folio_batch` APIs

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 `st

linuxkpi: Add `folio` and `folio_batch` APIs

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

show more ...


# c8089810 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Make "free page" code paths closer to Linux

There is basically one code path to free pages on Linux. In particular,
`free_pages()` is used for other pages than those returned by
`alloc_pag

linuxkpi: Make "free page" code paths closer to Linux

There is basically one code path to free pages on Linux. In particular,
`free_pages()` is used for other pages than those returned by
`alloc_pages()`.

Also on Linux, `release_pages()` takes either `struct page` or `struct
folio`. `struct folio` support will be added in a followup commit.
Regardless, because pages come from several sources,
`linux_free_pages()` need to accept managed and unmanaged pages.

Reviewed by: bz, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49813

show more ...


# 5a263e84 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Constify `struct page` arg to `linux_page_address()`

Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49812


# fe5ce9eb 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Move `put_page()` closer to `get_page()`

This is to prepare a future change to the implementation and make it
easier to review.

Reviewed by: emaste, markj
Sponsored by: The FreeBSD Founda

linuxkpi: Move `put_page()` closer to `get_page()`

This is to prepare a future change to the implementation and make it
easier to review.

Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49811

show more ...


# e51729f6 13-Apr-2025 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Move `release_pages()` to linux_page.c

We want to avoid putting code managing memory in inline functions in the
future.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differentia

linuxkpi: Move `release_pages()` to linux_page.c

We want to avoid putting code managing memory in inline functions in the
future.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49810

show more ...


Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0
# d42136e3 21-Jul-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Remove vmas argument from get_user_pages on KBI layer

To chase Linux kernel 6.5

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu
Differential Revision: https://reviews.freebsd

LinuxKPI: Remove vmas argument from get_user_pages on KBI layer

To chase Linux kernel 6.5

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D45850

show more ...


# e1b0f431 26-Jun-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Remove vmas argument from get_user_pages on KPI layer

To chase Linux kernel 6.5

Sponsored by: Serenity CyberSecurity, LLC
MFC after: 1 week
Reviewed by: manu, emaste
Differential Revision

LinuxKPI: Remove vmas argument from get_user_pages on KPI layer

To chase Linux kernel 6.5

Sponsored by: Serenity CyberSecurity, LLC
MFC after: 1 week
Reviewed by: manu, emaste
Differential Revision: https://reviews.freebsd.org/D45614

show more ...


# d21316ff 26-Jun-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add header polution to compile linux/numa.h

Sponsored by: Serenity CyberSecurity, LLC
MFC after: 1 week
Reviewed by: manu, bz, emaste
Differential Revision: https://reviews.freebsd.org/D45

LinuxKPI: Add header polution to compile linux/numa.h

Sponsored by: Serenity CyberSecurity, LLC
MFC after: 1 week
Reviewed by: manu, bz, emaste
Differential Revision: https://reviews.freebsd.org/D45612

show more ...


# cb8bfc4d 06-Jun-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h

To match Linux. Some future changes may depend on proper location.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week

LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h

To match Linux. Some future changes may depend on proper location.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D45448

show more ...


Revision tags: release/14.1.0
# 56041ee8 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add want_init_on_free to linux/mm.h

want_init_on_free returns if heap memory zeroing on free is enabled.
FreeBSD does not zeroes heap memory on free().

Sponsored by: Serenity Cyber Securi

LinuxKPI: Add want_init_on_free to linux/mm.h

want_init_on_free returns if heap memory zeroing on free is enabled.
FreeBSD does not zeroes heap memory on free().

Sponsored by: Serenity Cyber Security
Reviewed by: emaste
MFC after: 1 week

show more ...


# 06902a44 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add vm_flags_(clear|set) functions

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: emaste
MFC after: 1 week


# 38c276a4 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add VM_ACCESS_FLAGS define to linux/mm.h

VM_ACCESS_FLAGS is a basic access permission flags.

Sponsored by: Serenity CyberSecurity, LLC
Reviewed by: emaste
MFC after: 1 week


# 3208d4ad 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Import vanilla linux/overflow.h

It is dual-licensed (GPLv2 & MIT) and self-contained header file.
No need to reimplement it.

Sponsored by: Serenity CyberSecurity, LLC
Reviewed by: emaste

LinuxKPI: Import vanilla linux/overflow.h

It is dual-licensed (GPLv2 & MIT) and self-contained header file.
No need to reimplement it.

Sponsored by: Serenity CyberSecurity, LLC
Reviewed by: emaste
MFC after: 1 week

show more ...


Revision tags: release/13.3.0, release/14.0.0
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 9e9c682f 31-Jul-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: reduce usage of struct vm_page and vm_page_t

We currently define (Linux) page to (FreeBSD) vm_page.
Cleanup some of the direct struct vm_page and vm_page_t declarations
and usages in the L

LinuxKPI: reduce usage of struct vm_page and vm_page_t

We currently define (Linux) page to (FreeBSD) vm_page.
Cleanup some of the direct struct vm_page and vm_page_t declarations
and usages in the Linux KPI and make them 'struct page' or
'struct page *' to prepare for more upcoming work.

This should be a NOP.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D41255

show more ...


Revision tags: release/13.2.0
# 53da54b9 08-Feb-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Define `totalram_pages()`

It returns `physmem`.

`__FreeBSD_version` is bumped to 1400080. We need that to remove a copy
of this function in the i915 DRM driver, maintained outside of base

linuxkpi: Define `totalram_pages()`

It returns `physmem`.

`__FreeBSD_version` is bumped to 1400080. We need that to remove a copy
of this function in the i915 DRM driver, maintained outside of base.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38531

show more ...


# 70b97048 28-Jan-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: mm.h: implement virt_to_head_page()

Implement virt_to_head_page().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd

LinuxKPI: mm.h: implement virt_to_head_page()

Implement virt_to_head_page().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38240

show more ...


# 19be627c 19-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Define `might_alloc()`

... as a no-op.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38146


# e400b695 02-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `freeram` and `freehigh` to `struct sysinfo`

The struct layout is modified with this commit because new fields are
added in the middle, keeping original Linux order.

Reviewed by: manu

linuxkpi: Add `freeram` and `freehigh` to `struct sysinfo`

The struct layout is modified with this commit because new fields are
added in the middle, keeping original Linux order.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D37932

show more ...


# 3d751b7a 10-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `pin_user_pages*()` functions

They were defined in the i915 DRM driver. I move the code in linuxkpi so
it can benefit other drivers.

Reviewed by: manu
Approved by: manu
Differential R

linuxkpi: Add `pin_user_pages*()` functions

They were defined in the i915 DRM driver. I move the code in linuxkpi so
it can benefit other drivers.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38078

show more ...


# 47877d61 20-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Define `is_cow_mapping(flags)` as false

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38158


# b99bc862 14-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `io_mapping_map_user()` and `remap_pfn_range()`

The code comes from the i915 DRM driver.

In Linux commits b739f125e4ebd73d10ed30a856574e13649119ed and
b12d691ea5e01db42ccf3b4207e57cb3

linuxkpi: Add `io_mapping_map_user()` and `remap_pfn_range()`

The code comes from the i915 DRM driver.

In Linux commits b739f125e4ebd73d10ed30a856574e13649119ed and
b12d691ea5e01db42ccf3b4207e57cb3ce7cfe91 (Linux 5.13), the i915 DRM
driver dropped specific implementations to use Linux generic functions.
Therefore I moved the FreeBSD code from that i915 driver to linuxkpi.

However, these commits were later reverted (also in Linux 5.13) so the
i915 driver doesn't use these functions. But perhaps it will help in the
future.

To sum up, the code comes from the i915 DRM driver but it doesn't use it
(i.e. it continues to use its internal implementation).

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38088

show more ...


Revision tags: release/12.4.0
# c72dd0aa 11-Nov-2022 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Introduce `vma_set_file()`

This code was moved from the i915 driver in Linux 5.11.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D36957


# 415ca4d2 11-Nov-2022 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Include <linux/shinker.h> in <linux/mm.h>

This is done like this in Linux.

Reviewed by: emaste manu
Approved by: emaste manu
Differential Revision: https://reviews.freebsd.org/D36956


# d1c3cfd7 02-Aug-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add trylock_page and unlock_page

Simple wrapper around vm_page_trylock and vm_page_unlock.

Reviewed by: hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: htt

linuxkpi: Add trylock_page and unlock_page

Simple wrapper around vm_page_trylock and vm_page_unlock.

Reviewed by: hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36019

show more ...


123