Skip to content

Commit

Permalink
common/cnxk: fix mbox struct attributes
Browse files Browse the repository at this point in the history
[ upstream commit c9dca1c5e352008bda8d0edeab8fbcf328437282 ]

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: 503b82d ("common/cnxk: add mbox request and response definitions")
Fixes: ddf955d ("common/cnxk: support CPT second pass")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
  • Loading branch information
nithind1988 authored and bluca committed Mar 13, 2024
1 parent df9a4e9 commit 430b276
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/common/cnxk/roc_mbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -855,12 +855,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;
};
};

Expand Down Expand Up @@ -1096,11 +1096,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;
Expand Down

0 comments on commit 430b276

Please sign in to comment.