History log of /freebsd-current/sys/compat/linuxkpi/common/src/linux_devres.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# aaf6129c 16-Mar-2023 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add devm_add_action and devm_add_action_or_reset

Those adds a new devres and will exectute some function on release.

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


# fa765ca7 28-Jan-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: implement devres() framework parts and two examples

This code implements a version of the devres framework found
working for various iwlwifi use cases and also providing functions
for ttm_page_alloc_dma.c from DRM.

Part of the framework replicates the consumed KPI, while others
are internal helper functions.

In addition the simple devm_k*malloc() consumers were implemented
and kvasprintf() was enhanced to also work for the devm_kasprintf()
case.
Addmittingly lkpi_devm_kmalloc_release() could be avoided but for
the overall understanding of the code and possible memory tracing
it may still be helpful.

Further devsres consumer are implemented for iwlwifi but will follow
later as the main reason for this change is to sort out overlap with
DRM.

Sponsored-by: The FreeBSD Foundation
Obtained-from: bz_iwlwifi
MFC After: 3 days
Reviewed-by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D28189