From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: scott.k.mitch1@gmail.com,
Bruce Richardson <bruce.richardson@intel.com>,
stable@dpdk.org, Kevin Laatz <kevin.laatz@intel.com>,
Conor Walsh <conor.walsh@intel.com>
Subject: [PATCH] dma/idxd: mark portal pointer as volatile
Date: Mon, 26 Jan 2026 10:13:56 +0000 [thread overview]
Message-ID: <20260126101357.2770431-1-bruce.richardson@intel.com> (raw)
In-Reply-To: <bug-1871-3@http.bugs.dpdk.org>
The portal pointer for writing descriptors to the idxd device should be
volatile for consistency with how it is used. Only time we need to cast
away the volatility is when unmapping it.
Bugzilla ID: 1871
Fixes: e888bb1278c6 ("dma/idxd: add bus device probing")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/dma/idxd/idxd_bus.c | 2 +-
drivers/dma/idxd/idxd_internal.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 5ae42151e6..9a8213bbbe 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -93,7 +93,7 @@ static int
idxd_dev_close(struct rte_dma_dev *dev)
{
struct idxd_dmadev *idxd = dev->data->dev_private;
- munmap(idxd->portal, 0x1000);
+ munmap(RTE_CAST_PTR(void *, idxd->portal), 0x1000);
return 0;
}
diff --git a/drivers/dma/idxd/idxd_internal.h b/drivers/dma/idxd/idxd_internal.h
index b80a113455..d409213148 100644
--- a/drivers/dma/idxd/idxd_internal.h
+++ b/drivers/dma/idxd/idxd_internal.h
@@ -56,7 +56,7 @@ struct idxd_dmadev {
unsigned short batch_start; /* start+size == write pointer for hdls/desc */
unsigned short batch_size;
- void *portal; /* address to write the batch descriptor */
+ volatile void *portal; /* address to write the batch descriptor */
struct idxd_completion *batch_comp_ring;
unsigned short *batch_idx_ring; /* store where each batch ends */
--
2.51.0
next parent reply other threads:[~2026-01-26 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-1871-3@http.bugs.dpdk.org>
2026-01-26 10:13 ` Bruce Richardson [this message]
2026-02-16 17:28 ` [PATCH] dma/idxd: mark portal pointer as volatile Thomas Monjalon
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=20260126101357.2770431-1-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=conor.walsh@intel.com \
--cc=dev@dpdk.org \
--cc=kevin.laatz@intel.com \
--cc=scott.k.mitch1@gmail.com \
--cc=stable@dpdk.org \
/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