DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tduszynski@marvell.com>
To: <dev@dpdk.org>
Cc: <jerinj@marvell.com>, Jakub Palider <jpalider@marvell.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>, Ray Kinsella <mdr@ashroe.eu>,
	Tomasz Duszynski <tduszynski@marvell.com>
Subject: [dpdk-dev] [PATCH 2/2] raw/cnxk_bphy: use roc calls for max irq
Date: Fri, 1 Oct 2021 22:19:41 +0200	[thread overview]
Message-ID: <20211001201941.2068819-3-tduszynski@marvell.com> (raw)
In-Reply-To: <20211001201941.2068819-1-tduszynski@marvell.com>

From: Jakub Palider <jpalider@marvell.com>

Maximum interrupt number function used direct access to
structure field while ROC helper exists and serves the
same purpose.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_bphy_irq.c    | 6 ++++++
 drivers/common/cnxk/roc_bphy_irq.h    | 1 +
 drivers/common/cnxk/version.map       | 1 +
 drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +-
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c
index 53eb89c2f1..f4e9b341af 100644
--- a/drivers/common/cnxk/roc_bphy_irq.c
+++ b/drivers/common/cnxk/roc_bphy_irq.c
@@ -318,6 +318,12 @@ roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip, int irq_num)
 	return irq_chip->avail_irq_bmask & BIT(irq_num);
 }
 
+uint64_t
+roc_bphy_intr_max_get(struct roc_bphy_irq_chip *irq_chip)
+{
+	return irq_chip->max_irq;
+}
+
 int
 roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num)
 {
diff --git a/drivers/common/cnxk/roc_bphy_irq.h b/drivers/common/cnxk/roc_bphy_irq.h
index 185b6354a5..93335e0d6d 100644
--- a/drivers/common/cnxk/roc_bphy_irq.h
+++ b/drivers/common/cnxk/roc_bphy_irq.h
@@ -36,6 +36,7 @@ __roc_api void roc_bphy_intr_handler(unsigned int irq_num);
 __roc_api bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip,
 				       int irq_num);
 __roc_api int roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num);
+__roc_api uint64_t roc_bphy_intr_max_get(struct roc_bphy_irq_chip *irq_chip);
 __roc_api int roc_bphy_intr_register(struct roc_bphy_irq_chip *irq_chip,
 				     struct roc_bphy_intr *intr);
 
diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map
index fff7902b25..ebc2ffeb85 100644
--- a/drivers/common/cnxk/version.map
+++ b/drivers/common/cnxk/version.map
@@ -42,6 +42,7 @@ INTERNAL {
 	roc_bphy_intr_fini;
 	roc_bphy_intr_handler;
 	roc_bphy_intr_init;
+	roc_bphy_intr_max_get;
 	roc_bphy_intr_register;
 	roc_bphy_npa_pf_func_get;
 	roc_bphy_sso_pf_func_get;
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c
index 1fb3bf786b..a328029aad 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c
@@ -32,7 +32,7 @@ cnxk_bphy_irq_max_get(uint16_t dev_id)
 	bphy_dev = cnxk_bphy_get_bphy_dev_by_dev_id(dev_id);
 	irq_chip = bphy_dev->irq_chip;
 
-	return irq_chip->max_irq;
+	return roc_bphy_intr_max_get(irq_chip);
 }
 
 int
-- 
2.25.1


  parent reply	other threads:[~2021-10-01 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 20:19 [dpdk-dev] [PATCH 0/2] raw/cnxk_bphy: sync with upstream Tomasz Duszynski
2021-10-01 20:19 ` [dpdk-dev] [PATCH 1/2] raw/cnxk_bphy: add wrappers for available message types Tomasz Duszynski
2021-10-01 20:19 ` Tomasz Duszynski [this message]
2021-10-07 11:06 ` [dpdk-dev] [PATCH 0/2] raw/cnxk_bphy: sync with upstream 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=20211001201941.2068819-3-tduszynski@marvell.com \
    --to=tduszynski@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jpalider@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=mdr@ashroe.eu \
    --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).