Commit 26edd1d
committed
Merge: Backport register read/write tracing support
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2490
Bugzilla: https://bugzilla.redhat.com/2196244
Backport register read/write tracing support.
This allows debugging MMIO register accesses more conveniently.
https://lore.kernel.org/all/cover.1652891705.git.quic_saipraka@quicinc.com/
https://lore.kernel.org/all/20221017143450.9161-1-quic_saipraka@quicinc.com/
# How to test
- Apply this MR on top of main-automotive
- Apply https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2496 as well (kernel config)
- Build and flash the kernel on a Qdrive3
- Execute:
```
echo 1 > /sys/kernel/tracing/events/rwmmio/enable
cat /sys/kernel/tracing/trace
```
You should see a trace of register read/write events with a format similar to:
```
<idle>-0 [004] d...2.. 234.967386: rwmmio_post_read: clockevents_program_event+0xa8/0x120 -> arch_timer_set_next_event_virt_mem+0x150/0x2f4 width=32 val=0x1405fe20 addr=0xffff800008015008
<idle>-0 [004] d...2.. 234.967386: rwmmio_read: clockevents_program_event+0xa8/0x120 -> arch_timer_set_next_event_virt_mem+0x17c/0x2f4 width=32 addr=0xffff80000801500c
<idle>-0 [004] d...2.. 234.967386: rwmmio_post_read: clockevents_program_event+0xa8/0x120 -> arch_timer_set_next_event_virt_mem+0x1ac/0x2f4 width=32 val=0x1 addr=0xffff80000801500c
<idle>-0 [004] d...2.. 234.967386: rwmmio_write: clockevents_program_event+0xa8/0x120 -> arch_timer_set_next_event_virt_mem+0x1f4/0x2f4 width=64 val=0x11408e946 addr=0xffff800008015030
<idle>-0 [004] d...2.. 234.967387: rwmmio_post_write: clockevents_program_event+0xa8/0x120 -> arch_timer_set_next_event_virt_mem+0x228/0x2f4 width=64 val=0x11408e946 addr=0xffff800008015030
<idle>-0 [004] d...2.. 234.967387: rwmmio_write: clockevents_program_event+0xa8/0x120 -> arch_timer_set_next_event_virt_mem+0x258/0x2f4 width=32 val=0x1 addr=0xffff80000801503c
<idle>-0 [004] d...2.. 234.967387: rwmmio_post_write: clockevents_program_event+0xa8/0x120 -> arch_timer_set_next_event_virt_mem+0x294/0x2f4 width=32 val=0x1 addr=0xffff80000801503c
<idle>-0 [004] d...3.. 234.967389: rwmmio_read: gic_set_affinity+0x88/0x250 -> gic_peek_irq+0x80/0x140 width=32 addr=0xffff800008040104
<idle>-0 [004] d...3.. 234.967390: rwmmio_post_read: gic_set_affinity+0x88/0x250 -> gic_peek_irq+0xac/0x140 width=32 val=0x61 addr=0xffff800008040104
```
Signed-off-by: Adrien Thierry <athierry@redhat.com>
Approved-by: Michel Dänzer <mdaenzer@redhat.com>
Approved-by: Eric Chanudet <echanude@redhat.com>
Signed-off-by: Jan Stancek <jstancek@redhat.com>File tree
19 files changed
+299
-67
lines changed- arch
- arm64
- include/asm
- drivers
- gpu/drm/meson
- hwtracing/coresight
- irqchip
- include
- asm-generic
- linux
- trace/events
- lib
- redhat/configs/common/generic
19 files changed
+299
-67
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1370 | 1370 | | |
1371 | 1371 | | |
1372 | 1372 | | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1373 | 1376 | | |
1374 | 1377 | | |
1375 | 1378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
124 | 114 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
144 | 119 | | |
145 | 120 | | |
146 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
| 451 | + | |
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
| 482 | + | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
0 commit comments