mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
dma-mapping fixes for Linux 6.12
- handle chained SGLs in the new tracing code (Christoph Hellwig) -----BEGIN PGP SIGNATURE----- iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmb47voLHGhjaEBsc3Qu ZGUACgkQD55TZVIEUYMqAw//TCBIiBNBwjWipVBXmvizu0MaB+PU8ZOjXZoeEdlN WeGSPvuW2lWJxjBblPcFA3MFO9pztO9E94dayu5/jV5QP4G+EzyCJDoZOQu8iHYX YzaIgkt0W+vKEFmvAqfrHuPHHO0mZ00qaBmj/r+cayWqBBvWPLbj7kU7+sFVG4it lP2QGGYGV6Ryvkwcft+Got4oIKmyuTsS4i4Cq17WNuhAxDMZftnVPIuUJ9Q00xza zDSwKgAOoPqaf3r026MqahpEECAQP0S7uqH10I+MJe7AbREbO7GSHcx4YWDhmyLd KFJ+Wv67H8voCsvdH76zANVLE6S5YMyAwMAJSRQxuVSjqrIM0vyyQ4jeRZCHibva NvYnv/xRRF+BKyNthNAz1m69K3y8UV5gvP/otezHInGd5/b527UoLXdFl+wQvdJm aJwCYSFgQbAsoAh4kWCUmYXGwc1h6aQQ3pcHD118yf9Glzjl4vwHOyF12GigfCdQ cbNo+ceacO3rg/H85zMl8OCMtnPwAlNAU+16MY0JwefKKs6rmRyQeTreQKjjdhTm /0FVKq1PXJeOdMBqSnrN/tJBIEJxtQlUqE7mx7B2OnczvNpaO4THGlo181nnzPPd HTb9fXzBJeSSbDGWF8W6MZIleDj+s4V5Z6Qqi0cW9F7Yn4dCw9ghBBkDZtcm+hkb +q0= =zjTS -----END PGP SIGNATURE----- Merge tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: - handle chained SGLs in the new tracing code (Christoph Hellwig) * tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: fix DMA API tracing for chained scatterlists
This commit is contained in:
commit
b81b78dacc
@ -176,9 +176,9 @@ TRACE_EVENT(dma_free,
|
||||
);
|
||||
|
||||
TRACE_EVENT(dma_map_sg,
|
||||
TP_PROTO(struct device *dev, struct scatterlist *sg, int nents,
|
||||
TP_PROTO(struct device *dev, struct scatterlist *sgl, int nents,
|
||||
int ents, enum dma_data_direction dir, unsigned long attrs),
|
||||
TP_ARGS(dev, sg, nents, ents, dir, attrs),
|
||||
TP_ARGS(dev, sgl, nents, ents, dir, attrs),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(dev))
|
||||
@ -190,17 +190,17 @@ TRACE_EVENT(dma_map_sg,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
struct scatterlist *sg;
|
||||
int i;
|
||||
|
||||
__assign_str(device);
|
||||
for (i = 0; i < nents; i++)
|
||||
((u64 *)__get_dynamic_array(phys_addrs))[i] =
|
||||
sg_phys(sg + i);
|
||||
for (i = 0; i < ents; i++) {
|
||||
for_each_sg(sgl, sg, nents, i)
|
||||
((u64 *)__get_dynamic_array(phys_addrs))[i] = sg_phys(sg);
|
||||
for_each_sg(sgl, sg, ents, i) {
|
||||
((u64 *)__get_dynamic_array(dma_addrs))[i] =
|
||||
sg_dma_address(sg + i);
|
||||
sg_dma_address(sg);
|
||||
((unsigned int *)__get_dynamic_array(lengths))[i] =
|
||||
sg_dma_len(sg + i);
|
||||
sg_dma_len(sg);
|
||||
}
|
||||
__entry->dir = dir;
|
||||
__entry->attrs = attrs;
|
||||
@ -222,9 +222,9 @@ TRACE_EVENT(dma_map_sg,
|
||||
);
|
||||
|
||||
TRACE_EVENT(dma_unmap_sg,
|
||||
TP_PROTO(struct device *dev, struct scatterlist *sg, int nents,
|
||||
TP_PROTO(struct device *dev, struct scatterlist *sgl, int nents,
|
||||
enum dma_data_direction dir, unsigned long attrs),
|
||||
TP_ARGS(dev, sg, nents, dir, attrs),
|
||||
TP_ARGS(dev, sgl, nents, dir, attrs),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(dev))
|
||||
@ -234,12 +234,12 @@ TRACE_EVENT(dma_unmap_sg,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
struct scatterlist *sg;
|
||||
int i;
|
||||
|
||||
__assign_str(device);
|
||||
for (i = 0; i < nents; i++)
|
||||
((u64 *)__get_dynamic_array(addrs))[i] =
|
||||
sg_phys(sg + i);
|
||||
for_each_sg(sgl, sg, nents, i)
|
||||
((u64 *)__get_dynamic_array(addrs))[i] = sg_phys(sg);
|
||||
__entry->dir = dir;
|
||||
__entry->attrs = attrs;
|
||||
),
|
||||
@ -290,9 +290,9 @@ DEFINE_EVENT(dma_sync_single, dma_sync_single_for_device,
|
||||
TP_ARGS(dev, dma_addr, size, dir));
|
||||
|
||||
DECLARE_EVENT_CLASS(dma_sync_sg,
|
||||
TP_PROTO(struct device *dev, struct scatterlist *sg, int nents,
|
||||
TP_PROTO(struct device *dev, struct scatterlist *sgl, int nents,
|
||||
enum dma_data_direction dir),
|
||||
TP_ARGS(dev, sg, nents, dir),
|
||||
TP_ARGS(dev, sgl, nents, dir),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(dev))
|
||||
@ -302,14 +302,15 @@ DECLARE_EVENT_CLASS(dma_sync_sg,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
struct scatterlist *sg;
|
||||
int i;
|
||||
|
||||
__assign_str(device);
|
||||
for (i = 0; i < nents; i++) {
|
||||
for_each_sg(sgl, sg, nents, i) {
|
||||
((u64 *)__get_dynamic_array(dma_addrs))[i] =
|
||||
sg_dma_address(sg + i);
|
||||
sg_dma_address(sg);
|
||||
((unsigned int *)__get_dynamic_array(lengths))[i] =
|
||||
sg_dma_len(sg + i);
|
||||
sg_dma_len(sg);
|
||||
}
|
||||
__entry->dir = dir;
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user