blob: 21ffb0adf559aa2fa1848e9f04dd8365ed52f37d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright(c) 2007-2025 Intel Corporation */
#include "adf_accel_devices.h"
#include "adf_cfg_dev_dbg.h"
#include "adf_cnvnr_freq_counters.h"
#include "adf_common_drv.h"
#include "adf_dbgfs.h"
#include "adf_fw_counters.h"
#include "adf_freebsd_pfvf_ctrs_dbg.h"
#include "adf_heartbeat_dbg.h"
#include "adf_ver_dbg.h"
/**
* adf_dbgfs_init() - add persistent debugfs entries
* @accel_dev: Pointer to acceleration device.
*
* This function creates debugfs entries that are persistent through a device
* state change (from up to down or vice versa).
*/
void
adf_dbgfs_init(struct adf_accel_dev *accel_dev)
{
adf_cfg_dev_dbg_add(accel_dev);
}
/**
* adf_dbgfs_exit() - remove persistent debugfs entries
* @accel_dev: Pointer to acceleration device.
*/
void
adf_dbgfs_exit(struct adf_accel_dev *accel_dev)
{
adf_cfg_dev_dbg_remove(accel_dev);
}
/**
* adf_dbgfs_add() - add non-persistent debugfs entries
* @accel_dev: Pointer to acceleration device.
*
* This function creates debugfs entries that are not persistent through
* a device state change (from up to down or vice versa).
*/
void
adf_dbgfs_add(struct adf_accel_dev *accel_dev)
{
if (!accel_dev->is_vf) {
adf_heartbeat_dbg_add(accel_dev);
adf_ver_dbg_add(accel_dev);
adf_fw_counters_add(accel_dev);
adf_cnvnr_freq_counters_add(accel_dev);
}
}
/**
* adf_dbgfs_rm() - remove non-persistent debugfs entries
* @accel_dev: Pointer to acceleration device.
*/
void
adf_dbgfs_rm(struct adf_accel_dev *accel_dev)
{
if (!accel_dev->is_vf) {
adf_cnvnr_freq_counters_remove(accel_dev);
adf_fw_counters_remove(accel_dev);
adf_ver_dbg_del(accel_dev);
adf_heartbeat_dbg_del(accel_dev);
}
}
|