Skip to content

Commit 7c4a4d0

Browse files
aeglvinodkoul
authored andcommitted
dmaengine: idxd: Merge definition of dsa_batch_desc into dsa_hw_desc
We don't need a special structure just for batch descriptors. The layout matches the general form for other descriptors. Merge the desc_list_addr field into the union of other aliases for the the third quadword in the structure. Create a union to alias "xfer_size" with "desc_count". Signed-off-by: Tony Luck <[email protected]> Acked-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/158387868208.35922.5895104426944263789.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <[email protected]>
1 parent 26cf132 commit 7c4a4d0

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

include/uapi/linux/idxd.h

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,6 @@ enum dsa_completion_status {
8383
#define DSA_COMP_STATUS_MASK 0x7f
8484
#define DSA_COMP_STATUS_WRITE 0x80
8585

86-
struct dsa_batch_desc {
87-
uint32_t pasid:20;
88-
uint32_t rsvd:11;
89-
uint32_t priv:1;
90-
uint32_t flags:24;
91-
uint32_t opcode:8;
92-
uint64_t completion_addr;
93-
uint64_t desc_list_addr;
94-
uint64_t rsvd1;
95-
uint32_t desc_count;
96-
uint16_t interrupt_handle;
97-
uint16_t rsvd2;
98-
uint8_t rsvd3[24];
99-
} __attribute__((packed));
100-
10186
struct dsa_hw_desc {
10287
uint32_t pasid:20;
10388
uint32_t rsvd:11;
@@ -109,14 +94,18 @@ struct dsa_hw_desc {
10994
uint64_t src_addr;
11095
uint64_t rdback_addr;
11196
uint64_t pattern;
97+
uint64_t desc_list_addr;
11298
};
11399
union {
114100
uint64_t dst_addr;
115101
uint64_t rdback_addr2;
116102
uint64_t src2_addr;
117103
uint64_t comp_pattern;
118104
};
119-
uint32_t xfer_size;
105+
union {
106+
uint32_t xfer_size;
107+
uint32_t desc_count;
108+
};
120109
uint16_t int_handle;
121110
uint16_t rsvd1;
122111
union {

0 commit comments

Comments
 (0)