* [PATCH] dma/idxd: mark portal pointer as volatile
[not found] <bug-1871-3@http.bugs.dpdk.org>
@ 2026-01-26 10:13 ` Bruce Richardson
2026-02-16 17:28 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2026-01-26 10:13 UTC (permalink / raw)
To: dev; +Cc: scott.k.mitch1, Bruce Richardson, stable, Kevin Laatz,
Conor Walsh
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dma/idxd: mark portal pointer as volatile
2026-01-26 10:13 ` [PATCH] dma/idxd: mark portal pointer as volatile Bruce Richardson
@ 2026-02-16 17:28 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2026-02-16 17:28 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, stable, scott.k.mitch1, Bruce Richardson, Kevin Laatz,
Conor Walsh
26/01/2026 11:13, Bruce Richardson:
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-16 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <bug-1871-3@http.bugs.dpdk.org>
2026-01-26 10:13 ` [PATCH] dma/idxd: mark portal pointer as volatile Bruce Richardson
2026-02-16 17:28 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox