Thanks for fixing this problem. I didn't realize it because I usually use a buffer size >= the default ETR buffer size, which is harder to reproduce the problem. The patches LGTM, maybe you also want to fix the problem commented by Leo Yan. I tested the patches by recording etm data with a buffer size smaller than the default ETR buffer size. Then I saw barrier packets when decoding with OpenCSD. And I could decode successfully without error message.
- [PATCH 0/2] coresight: Add barrier packet when moving offs... Mathieu Poirier
- [PATCH 1/2] coresight: tmc: Make memory width mask co... Mathieu Poirier
- [PATCH 2/2] coresight: tmc-etr: Add barrier packet wh... Mathieu Poirier
- Re: [PATCH 0/2] coresight: Add barrier packet when mo... Yabin Cui
- Re: [PATCH 0/2] coresight: Add barrier packet whe... Mathieu Poirier