Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_PAGE_REPORTING_H
0003 #define _LINUX_PAGE_REPORTING_H
0004 
0005 #include <linux/mmzone.h>
0006 #include <linux/scatterlist.h>
0007 
0008 /* This value should always be a power of 2, see page_reporting_cycle() */
0009 #define PAGE_REPORTING_CAPACITY     32
0010 
0011 struct page_reporting_dev_info {
0012     /* function that alters pages to make them "reported" */
0013     int (*report)(struct page_reporting_dev_info *prdev,
0014               struct scatterlist *sg, unsigned int nents);
0015 
0016     /* work struct for processing reports */
0017     struct delayed_work work;
0018 
0019     /* Current state of page reporting */
0020     atomic_t state;
0021 
0022     /* Minimal order of page reporting */
0023     unsigned int order;
0024 };
0025 
0026 /* Tear-down and bring-up for page reporting devices */
0027 void page_reporting_unregister(struct page_reporting_dev_info *prdev);
0028 int page_reporting_register(struct page_reporting_dev_info *prdev);
0029 #endif /*_LINUX_PAGE_REPORTING_H */