[PATCH v2 0/3] perf hisi-ptt: Fix TLP header parsing and naming

From: Sizhe Liu

Date: Thu Jul 30 2026 - 02:39:26 EST


This series fixes bugs and issues in the hisi_ptt packet decoder that were
introduced by commit 5e91e57e6809 ("perf auxtrace arm64: Add support
for parsing HiSilicon PCIe Trace packet").

Patch 1: Bugfix:
The DW0 bit-field layout of the hisi_ptt_4dw union does not match
the actual little-endian memory ordering, so the extracted
Format/Type/T9/T8/TH/SO/Length/Time fields are wrong.

Meanwhile, make all DW hex values printed in big-endian byte order
for readability.

Patch 2: Fix endianness / Heap out-of-bounds read / Integer truncation
issues.

Patch 3: Fix spelling / abbreviation errors in symbol names and macros.

---
Changes in v2:
- Move spelling error fixes to the end of the patch series.
- Add fixes tag only for bugfix.
- Use get_unaligned_le32() to make memory read more robust.
- Fix pre-existing issues reported by Sashiko in patch 2.
- Link to v1: https://lore.kernel.org/linux-pci/20260729060220.624250-1-liusizhe5@xxxxxxxxxx/

---
Sizhe Liu (3):
perf hisi-ptt: Fix PTT trace TLP header parsing
perf hisi-ptt: Strengthen auxtrace event handling and packet type
detection
perf hisi-ptt: Fix spelling and abbreviation errors

Documentation/trace/hisi-ptt.rst | 28 ++++-----
.../hisi-ptt-decoder/hisi-ptt-pkt-decoder.c | 63 ++++++++++---------
.../hisi-ptt-decoder/hisi-ptt-pkt-decoder.h | 14 ++++-
tools/perf/util/hisi-ptt.c | 24 +++++--
4 files changed, 77 insertions(+), 52 deletions(-)

--
2.33.0