1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Marvell RVU Admin Function Devlink
4 * Copyright (C) 2020 Marvell.
11 #define RVU_REPORTERS(_name) \
12 static const struct devlink_health_reporter_ops rvu_ ## _name ## _reporter_ops = { \
14 .recover = rvu_ ## _name ## _recover, \
15 .dump = rvu_ ## _name ## _dump, \
18 enum npa_af_rvu_health {
25 struct rvu_npa_event_ctx {
32 struct rvu_npa_health_reporters {
33 struct rvu_npa_event_ctx *npa_event_ctx;
34 struct devlink_health_reporter *rvu_hw_npa_intr_reporter;
35 struct work_struct intr_work;
36 struct devlink_health_reporter *rvu_hw_npa_gen_reporter;
37 struct work_struct gen_work;
38 struct devlink_health_reporter *rvu_hw_npa_err_reporter;
39 struct work_struct err_work;
40 struct devlink_health_reporter *rvu_hw_npa_ras_reporter;
41 struct work_struct ras_work;
44 enum nix_af_rvu_health {
51 struct rvu_nix_event_ctx {
58 struct rvu_nix_health_reporters {
59 struct rvu_nix_event_ctx *nix_event_ctx;
60 struct devlink_health_reporter *rvu_hw_nix_intr_reporter;
61 struct work_struct intr_work;
62 struct devlink_health_reporter *rvu_hw_nix_gen_reporter;
63 struct work_struct gen_work;
64 struct devlink_health_reporter *rvu_hw_nix_err_reporter;
65 struct work_struct err_work;
66 struct devlink_health_reporter *rvu_hw_nix_ras_reporter;
67 struct work_struct ras_work;
73 struct workqueue_struct *devlink_wq;
74 struct rvu_npa_health_reporters *rvu_npa_health_reporter;
75 struct rvu_nix_health_reporters *rvu_nix_health_reporter;
79 int rvu_register_dl(struct rvu *rvu);
80 void rvu_unregister_dl(struct rvu *rvu);
82 #endif /* RVU_DEVLINK_H */