From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7F7C5A0032; Fri, 1 Oct 2021 22:20:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D49F5411F0; Fri, 1 Oct 2021 22:20:37 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id E6DD7411E0 for ; Fri, 1 Oct 2021 22:20:35 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1919ha19021583; Fri, 1 Oct 2021 13:20:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=JS00CT6bxM6y8hzerEA0AHmw0XhYJDnl/xaCug4HbsQ=; b=bYidWuwfBRCVYKfpb723ihr8klWD3f1JVNP4pY8ad7MSNOQuSw7aPSPdWkAhfiACR5Ko eI7SXp/XgxMoA8gM4hV3rBENZCkpW0X9T92EIby6UhjkcPRhE6M6K4+xtJ4saQBUv/3O Ziv8hy3gIlQhcE23Zw/0VxIsIwa8bU0rMFvav20QE3D+T7jw6T2qpX9UeVJ0mWtOD3zz +ETTeO28D6ReGfHzEOk7bSeCHt6wIJSIVQN9ykefA6AhF7bWk9fyrwEV1Oqvfbt52KGV +uNRqFwDAWOgdHGMTij8TIHwEGmDWqjAqVnFvjGi8vM3H3PPWaVlNEfDomqDEGMnzzlb RA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3bdrxmk7qu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 01 Oct 2021 13:20:33 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 1 Oct 2021 13:20:31 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 1 Oct 2021 13:20:31 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 173503F7061; Fri, 1 Oct 2021 13:20:28 -0700 (PDT) From: Tomasz Duszynski To: CC: , Jakub Palider , "Nithin Dabilpuram" , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Ray Kinsella , Tomasz Duszynski Date: Fri, 1 Oct 2021 22:19:41 +0200 Message-ID: <20211001201941.2068819-3-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211001201941.2068819-1-tduszynski@marvell.com> References: <20211001201941.2068819-1-tduszynski@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: E57zuGqHcPGSvd4_oWXQG9vJwsk8EFn0 X-Proofpoint-ORIG-GUID: E57zuGqHcPGSvd4_oWXQG9vJwsk8EFn0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-01_05,2021-10-01_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH 2/2] raw/cnxk_bphy: use roc calls for max irq X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jakub Palider Maximum interrupt number function used direct access to structure field while ROC helper exists and serves the same purpose. Signed-off-by: Jakub Palider Reviewed-by: Jerin Jacob Kollanukkaran --- 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