Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.7 39 lines 953 B view raw
1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright © 2019 Intel Corporation 4 */ 5 6#ifndef DEBUGFS_GT_H 7#define DEBUGFS_GT_H 8 9#include <linux/file.h> 10 11struct intel_gt; 12 13#define DEFINE_GT_DEBUGFS_ATTRIBUTE(__name) \ 14 static int __name ## _open(struct inode *inode, struct file *file) \ 15{ \ 16 return single_open(file, __name ## _show, inode->i_private); \ 17} \ 18static const struct file_operations __name ## _fops = { \ 19 .owner = THIS_MODULE, \ 20 .open = __name ## _open, \ 21 .read = seq_read, \ 22 .llseek = seq_lseek, \ 23 .release = single_release, \ 24} 25 26void debugfs_gt_register(struct intel_gt *gt); 27 28struct debugfs_gt_file { 29 const char *name; 30 const struct file_operations *fops; 31 bool (*eval)(const struct intel_gt *gt); 32}; 33 34void debugfs_gt_register_files(struct intel_gt *gt, 35 struct dentry *root, 36 const struct debugfs_gt_file *files, 37 unsigned long count); 38 39#endif /* DEBUGFS_GT_H */