common/cnxk: add missing reserved fields
authorAnoob Joseph <anoobj@marvell.com>
Fri, 17 Dec 2021 09:19:47 +0000 (14:49 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Fri, 21 Jan 2022 08:40:01 +0000 (09:40 +0100)
Added missing bitfields for ctx flush and add err
print for ctx flush failure.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
drivers/common/cnxk/hw/cpt.h
drivers/common/cnxk/roc_cpt.c

index 919f842..ccc7af4 100644 (file)
@@ -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;
 };
 
index 8f8e6d3..1bc7a29 100644 (file)
@@ -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;