From ad5fdb2fc1750f428c7d1c1f344fb2e9c19684e8 Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Fri, 17 Dec 2021 14:49:47 +0530 Subject: [PATCH] common/cnxk: add missing reserved fields Added missing bitfields for ctx flush and add err print for ctx flush failure. Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- drivers/common/cnxk/hw/cpt.h | 2 ++ drivers/common/cnxk/roc_cpt.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/hw/cpt.h b/drivers/common/cnxk/hw/cpt.h index 919f8420f0..ccc7af4034 100644 --- a/drivers/common/cnxk/hw/cpt.h +++ b/drivers/common/cnxk/hw/cpt.h @@ -64,6 +64,7 @@ union cpt_lf_ctx_flush { struct { uint64_t cptr : 46; uint64_t inval : 1; + uint64_t reserved_47_63 : 17; } s; }; @@ -71,6 +72,7 @@ union cpt_lf_ctx_reload { uint64_t u; struct { uint64_t cptr : 46; + uint64_t reserved_46_63 : 18; } s; }; diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c index 8f8e6d3821..1bc7a29ef9 100644 --- a/drivers/common/cnxk/roc_cpt.c +++ b/drivers/common/cnxk/roc_cpt.c @@ -681,8 +681,10 @@ roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, void *cptr, bool inval) { union cpt_lf_ctx_flush reg; - if (lf == NULL) + if (lf == NULL) { + plt_err("Could not trigger CTX flush"); return -ENOTSUP; + } reg.u = 0; reg.s.inval = inval; -- 2.20.1