Skip to content

Commit 10e93e1

Browse files
committed
Merge tag 'dma-mapping-6.12-2024-10-20' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fix from Christoph Hellwig: "Just another small tracing fix from Sean" * tag 'dma-mapping-6.12-2024-10-20' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: fix tracing dma_alloc/free with vmalloc'd memory
2 parents 715ca9d + 78b2770 commit 10e93e1

File tree

1 file changed

+8
-8
lines changed
  • include/trace/events

1 file changed

+8
-8
lines changed

include/trace/events/dma.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ TRACE_EVENT(dma_alloc,
121121

122122
TP_STRUCT__entry(
123123
__string(device, dev_name(dev))
124-
__field(u64, phys_addr)
124+
__field(void *, virt_addr)
125125
__field(u64, dma_addr)
126126
__field(size_t, size)
127127
__field(gfp_t, flags)
@@ -130,18 +130,18 @@ TRACE_EVENT(dma_alloc,
130130

131131
TP_fast_assign(
132132
__assign_str(device);
133-
__entry->phys_addr = virt_to_phys(virt_addr);
133+
__entry->virt_addr = virt_addr;
134134
__entry->dma_addr = dma_addr;
135135
__entry->size = size;
136136
__entry->flags = flags;
137137
__entry->attrs = attrs;
138138
),
139139

140-
TP_printk("%s dma_addr=%llx size=%zu phys_addr=%llx flags=%s attrs=%s",
140+
TP_printk("%s dma_addr=%llx size=%zu virt_addr=%p flags=%s attrs=%s",
141141
__get_str(device),
142142
__entry->dma_addr,
143143
__entry->size,
144-
__entry->phys_addr,
144+
__entry->virt_addr,
145145
show_gfp_flags(__entry->flags),
146146
decode_dma_attrs(__entry->attrs))
147147
);
@@ -153,25 +153,25 @@ TRACE_EVENT(dma_free,
153153

154154
TP_STRUCT__entry(
155155
__string(device, dev_name(dev))
156-
__field(u64, phys_addr)
156+
__field(void *, virt_addr)
157157
__field(u64, dma_addr)
158158
__field(size_t, size)
159159
__field(unsigned long, attrs)
160160
),
161161

162162
TP_fast_assign(
163163
__assign_str(device);
164-
__entry->phys_addr = virt_to_phys(virt_addr);
164+
__entry->virt_addr = virt_addr;
165165
__entry->dma_addr = dma_addr;
166166
__entry->size = size;
167167
__entry->attrs = attrs;
168168
),
169169

170-
TP_printk("%s dma_addr=%llx size=%zu phys_addr=%llx attrs=%s",
170+
TP_printk("%s dma_addr=%llx size=%zu virt_addr=%p attrs=%s",
171171
__get_str(device),
172172
__entry->dma_addr,
173173
__entry->size,
174-
__entry->phys_addr,
174+
__entry->virt_addr,
175175
decode_dma_attrs(__entry->attrs))
176176
);
177177

0 commit comments

Comments
 (0)