Skip to content

Commit 92385a0

Browse files
committed
Merge tag 'dma-mapping-6.18-2025-11-12' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux
Pull dma-mapping fixes from Marek Szyprowski: - two minor fixes for DMA API infrastructure: restoring proper structure padding used in benchmark tests (Qinxin Xia) and global DMA_BIT_MASK macro rework to make it a bit more clang friendly (James Clark) * tag 'dma-mapping-6.18-2025-11-12' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux: dma-mapping: Allow use of DMA_BIT_MASK(64) in global scope dma-mapping: benchmark: Restore padding to ensure uABI remained consistent
2 parents e927c52 + a50f745 commit 92385a0

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

include/linux/dma-mapping.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
*/
9191
#define DMA_MAPPING_ERROR (~(dma_addr_t)0)
9292

93-
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
93+
#define DMA_BIT_MASK(n) GENMASK_ULL(n - 1, 0)
9494

9595
struct dma_iova_state {
9696
dma_addr_t addr;

include/linux/map_benchmark.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ struct map_benchmark {
2727
__u32 dma_dir; /* DMA data direction */
2828
__u32 dma_trans_ns; /* time for DMA transmission in ns */
2929
__u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */
30+
__u8 expansion[76]; /* For future use */
3031
};
3132
#endif /* _KERNEL_DMA_BENCHMARK_H */

0 commit comments

Comments
 (0)