1/* SPDX-License-Identifier: GPL-2.0 */
2#include <linux/mutex.h>
3
4struct rv_interface {
5 struct dentry *root_dir;
6 struct dentry *monitors_dir;
7};
8
9#include "../trace.h"
10#include <linux/tracefs.h>
11#include <linux/rv.h>
12
13#define RV_MODE_WRITE TRACE_MODE_WRITE
14#define RV_MODE_READ TRACE_MODE_READ
15
16#define rv_create_dir tracefs_create_dir
17#define rv_create_file tracefs_create_file
18#define rv_remove tracefs_remove
19
20DEFINE_FREE(rv_remove, struct dentry *, if (_T) rv_remove(_T));
21
22#define MAX_RV_MONITOR_NAME_SIZE 32
23#define MAX_RV_REACTOR_NAME_SIZE 32
24
25extern struct mutex rv_interface_lock;
26extern struct list_head rv_monitors_list;
27
28struct dentry *get_monitors_root(void);
29int rv_disable_monitor(struct rv_monitor *mon);
30int rv_enable_monitor(struct rv_monitor *mon);
31bool rv_is_container_monitor(struct rv_monitor *mon);
32bool rv_is_nested_monitor(struct rv_monitor *mon);
33
34#ifdef CONFIG_RV_REACTORS
35int reactor_populate_monitor(struct rv_monitor *mon, struct dentry *root);
36int init_rv_reactors(struct dentry *root_dir);
37#else
38static inline int reactor_populate_monitor(struct rv_monitor *mon, struct dentry *root)
39{
40 return 0;
41}
42
43static inline int init_rv_reactors(struct dentry *root_dir)
44{
45 return 0;
46}
47#endif
48

source code of linux/kernel/trace/rv/rv.h