Skip to content

Commit a97ec4f

Browse files
Nawal KishorJerin Jacob
authored andcommitted
common/cnxk: fix aura offset
Aura field width has reduced from 20 bits in cn10k/cn9k to 17 bits in cn20k. Adjust the setting of aura offset in NPA_LF_POOL_OP_INT register accordingly based on the platform. Fixes: 620fc02 ("common/cnxk: accommodate change in aura field width") Cc: [email protected] Signed-off-by: Nawal Kishor <[email protected]>
1 parent 5b1a795 commit a97ec4f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/common/cnxk/roc_npa_irq.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,15 @@ static inline uint8_t
104104
npa_q_irq_get_and_clear(struct npa_lf *lf, uint32_t q, uint32_t off,
105105
uint64_t mask)
106106
{
107-
uint64_t reg, wdata;
107+
uint64_t reg, wdata, shift;
108108
uint8_t qint;
109109

110-
wdata = (uint64_t)q << 44;
110+
shift = roc_model_is_cn20k() ? 47 : 44;
111+
wdata = (uint64_t)q << shift;
111112
reg = roc_atomic64_add_nosync(wdata, (int64_t *)(lf->base + off));
112113

113114
if (reg & BIT_ULL(42) /* OP_ERR */) {
114-
plt_err("Failed execute irq get off=0x%x", off);
115+
plt_err("Failed execute irq get off=0x%x reg=0x%" PRIu64, off, reg);
115116
return 0;
116117
}
117118

0 commit comments

Comments
 (0)