Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_PAGE_REPORTING_H
3#define _LINUX_PAGE_REPORTING_H
4
5#include <linux/mmzone.h>
6#include <linux/scatterlist.h>
7
8/* This value should always be a power of 2, see page_reporting_cycle() */
9#define PAGE_REPORTING_CAPACITY 32
10#define PAGE_REPORTING_ORDER_UNSPECIFIED -1
11
12struct page_reporting_dev_info {
13 /* function that alters pages to make them "reported" */
14 int (*report)(struct page_reporting_dev_info *prdev,
15 struct scatterlist *sg, unsigned int nents);
16
17 /* work struct for processing reports */
18 struct delayed_work work;
19
20 /* Current state of page reporting */
21 atomic_t state;
22
23 /* Minimal order of page reporting */
24 unsigned int order;
25};
26
27/* Tear-down and bring-up for page reporting devices */
28void page_reporting_unregister(struct page_reporting_dev_info *prdev);
29int page_reporting_register(struct page_reporting_dev_info *prdev);
30#endif /*_LINUX_PAGE_REPORTING_H */