From patchwork Thu Feb 22 11:02:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 137024 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A503543B74; Thu, 22 Feb 2024 12:09:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55679410E6; Thu, 22 Feb 2024 12:08:58 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1D6CA40F1A; Thu, 22 Feb 2024 12:08:54 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41M9BLbT021847; Thu, 22 Feb 2024 03:08:54 -0800 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=eBsYlR1lj45YUiE0MftoKtG/rNJHc+axbLLzKFWHZkE=; b=Jh9 RUhmCKc7Tj3hBCb5DGX/zYs73Z6TWUGw6D0YhhaEyyPzGy152Mavju/o69tqI3jx 13nZHSIgfEwbMtv2k1FrW/2BCcPNXy/jnpiO9HD/7Di8Z4T4LQeVhAorRjO9GubW z6xtvmJNhQEGkRgdgwTi652j9qTIDn5OEnHK4uFvTfdcVVcGYcUpVjqI4XY3pnWj TQJDcLrpiqRGpOvVSyFdQwNKx/6jFkcgD4MgmbP/hlMrDyUpxMl6GZP/vS3qUGk8 CTvWjZgU7mnsYhUqmdm/G2daJujwMet0l68mFaFwzR4ygiEq1hDrYeBDRSaBIuf/ KYEuKAqO9L2Zg94EjUQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3we3dw8b08-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 03:08:54 -0800 (PST) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 22 Feb 2024 03:03:10 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Thu, 22 Feb 2024 03:03:09 -0800 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.48 via Frontend Transport; Thu, 22 Feb 2024 03:03:09 -0800 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id CCC823F71DE; Thu, 22 Feb 2024 03:03:07 -0800 (PST) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v4 12/14] common/cnxk: add IO attribute to mbox structs Date: Thu, 22 Feb 2024 16:32:30 +0530 Message-ID: <20240222110232.2342903-12-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240222110232.2342903-1-ndabilpuram@marvell.com> References: <20240208085956.1741174-1-ndabilpuram@marvell.com> <20240222110232.2342903-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: iX1ZTQKZhzN9TKSEwTML33cv69nQ5uh2 X-Proofpoint-ORIG-GUID: iX1ZTQKZhzN9TKSEwTML33cv69nQ5uh2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_09,2024-02-22_01,2023-05-22_02 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 IO attribute is needed to mbox structs to avoid unaligned or pair access causing by compiler optimization. Add them to structs where it is missing. Fixes: 503b82de2cbf ("common/cnxk: add mbox request and response definitions") Fixes: ddf955d3917e ("common/cnxk: support CPT second pass") Cc: stable@dpdk.org Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_mbox.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h index 4b4f48e372..d8a8494ac4 100644 --- a/drivers/common/cnxk/roc_mbox.h +++ b/drivers/common/cnxk/roc_mbox.h @@ -1427,12 +1427,12 @@ struct nix_cn10k_aq_enq_req { struct nix_cn10k_aq_enq_rsp { struct mbox_msghdr hdr; union { - struct nix_cn10k_rq_ctx_s rq; - struct nix_cn10k_sq_ctx_s sq; - struct nix_cq_ctx_s cq; - struct nix_rsse_s rss; - struct nix_rx_mce_s mce; - struct nix_band_prof_s prof; + __io struct nix_cn10k_rq_ctx_s rq; + __io struct nix_cn10k_sq_ctx_s sq; + __io struct nix_cq_ctx_s cq; + __io struct nix_rsse_s rss; + __io struct nix_rx_mce_s mce; + __io struct nix_band_prof_s prof; }; }; @@ -1668,11 +1668,11 @@ struct nix_rq_cpt_field_mask_cfg_req { #define RQ_CTX_MASK_MAX 6 union { uint64_t __io rq_ctx_word_set[RQ_CTX_MASK_MAX]; - struct nix_cn10k_rq_ctx_s rq_set; + __io struct nix_cn10k_rq_ctx_s rq_set; }; union { uint64_t __io rq_ctx_word_mask[RQ_CTX_MASK_MAX]; - struct nix_cn10k_rq_ctx_s rq_mask; + __io struct nix_cn10k_rq_ctx_s rq_mask; }; struct nix_lf_rx_ipec_cfg1_req { uint32_t __io spb_cpt_aura;