dma/idxd: mark portal pointer as volatile
Subsystems (2)
PATCH 1/1 dma/idxd: mark portal pointer as volatile
In reply to a message not in the archiveThe 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")
Signed-off-by Bruce Richardson <[email protected]>
--- drivers/dma/idxd/idxd_bus.c | 2 +- drivers/dma/idxd/idxd_internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/dma/idxd/idxd_bus.c +1 -1
@@ -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 ; }
drivers/dma/idxd/idxd_internal.h +1 -1
@@ -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 */
Signature · 1 line
2.51.0
Thomas Monjalon
Applied26/01/2026 11:13, Bruce Richardson:
Quoted 9 lines
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")Signed-off-by Bruce Richardson <[email protected]>
Applied, thanks.