From: Nawal Kishor <nkishor@marvell.com>
To: <dev@dpdk.org>, Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
"Kiran Kumar K" <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>,
Harman Kalra <hkalra@marvell.com>,
"Ashwin Sekhar T K" <asekhar@marvell.com>
Cc: <jerinj@marvell.com>, Nawal Kishor <nkishor@marvell.com>
Subject: [PATCH v3] common/cnxk: fix aura offset
Date: Mon, 24 Mar 2025 12:05:25 +0530 [thread overview]
Message-ID: <20250324063525.2650349-1-nkishor@marvell.com> (raw)
In-Reply-To: <20250304052217.796506-1-nkishor@marvell.com>
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: 620fc02bf7eb ("common/cnxk: accommodate change in aura field width")
Signed-off-by: Nawal Kishor <nkishor@marvell.com>
---
Changes in v3: Fixed checkpatch warnings.
drivers/common/cnxk/roc_npa_irq.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/common/cnxk/roc_npa_irq.c b/drivers/common/cnxk/roc_npa_irq.c
index 0a19319ebf..3142a40c8c 100644
--- a/drivers/common/cnxk/roc_npa_irq.c
+++ b/drivers/common/cnxk/roc_npa_irq.c
@@ -104,14 +104,15 @@ static inline uint8_t
npa_q_irq_get_and_clear(struct npa_lf *lf, uint32_t q, uint32_t off,
uint64_t mask)
{
- uint64_t reg, wdata;
+ uint64_t reg, wdata, shift;
uint8_t qint;
- wdata = (uint64_t)q << 44;
+ shift = roc_model_is_cn20k() ? 47 : 44;
+ wdata = (uint64_t)q << shift;
reg = roc_atomic64_add_nosync(wdata, (int64_t *)(lf->base + off));
if (reg & BIT_ULL(42) /* OP_ERR */) {
- plt_err("Failed execute irq get off=0x%x", off);
+ plt_err("Failed execute irq get off=0x%x reg=0x%" PRIu64, off, reg);
return 0;
}
--
2.34.1
next prev parent reply other threads:[~2025-03-24 6:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 5:22 [PATCH] " Nawal Kishor
2025-03-11 13:08 ` Jerin Jacob
2025-03-24 6:09 ` Nawal Kishor
2025-03-24 6:35 ` Nawal Kishor [this message]
2025-03-27 6:57 ` [PATCH v3] " Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250324063525.2650349-1-nkishor@marvell.com \
--to=nkishor@marvell.com \
--cc=asekhar@marvell.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).