Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30 lines
895 B
C
30 lines
895 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_PAGE_REPORTING_H
|
|
#define _LINUX_PAGE_REPORTING_H
|
|
|
|
#include <linux/mmzone.h>
|
|
#include <linux/scatterlist.h>
|
|
|
|
/* This value should always be a power of 2, see page_reporting_cycle() */
|
|
#define PAGE_REPORTING_CAPACITY 32
|
|
|
|
struct page_reporting_dev_info {
|
|
/* function that alters pages to make them "reported" */
|
|
int (*report)(struct page_reporting_dev_info *prdev,
|
|
struct scatterlist *sg, unsigned int nents);
|
|
|
|
/* work struct for processing reports */
|
|
struct delayed_work work;
|
|
|
|
/* Current state of page reporting */
|
|
atomic_t state;
|
|
|
|
/* Minimal order of page reporting */
|
|
unsigned int order;
|
|
};
|
|
|
|
/* Tear-down and bring-up for page reporting devices */
|
|
void page_reporting_unregister(struct page_reporting_dev_info *prdev);
|
|
int page_reporting_register(struct page_reporting_dev_info *prdev);
|
|
#endif /*_LINUX_PAGE_REPORTING_H */
|