STRUCT HISI_PTT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct hisi_ptt(9) β€” like, the whole vibe

okay so bestie, this is straight out of the Kernel API Manual, section 9, and it's the page for struct hisi_ptt β€” the per-PTT-device data struct πŸŽ€. Yes, "per PTT device data" is literally the NAME. We love a self-explanatory icon.


✨ NAME ✨

struct hisi_ptt β€” Per PTT device data πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct hisi_ptt {
    struct hisi_ptt_trace_ctrl trace_ctrl;
    struct notifier_block hisi_ptt_nb;
    struct hlist_node hotplug_node;
    struct pmu hisi_ptt_pmu;
    void __iomem *iobase;
    struct pci_dev *pdev;
    struct mutex tune_lock;
    spinlock_t pmu_lock;
    int trace_irq;
    u32 upper_bdf;
    u32 lower_bdf;
    struct list_head port_filters;
    struct list_head req_filters;
    struct mutex filter_lock;
    bool sysfs_inited;
    u16 port_mask;
    struct delayed_work work;
    spinlock_t filter_update_lock;
    struct hisi_ptt_filter_update_info *filter_update_kfifo;
};

like, that's the whole struct, no cap. every field is doing its little job and honestly? main character energy from all of them πŸ’œ


🌸 Members 🌸

okay now the cast list, member by member, and I am not skipping a single one:

  • trace_ctrl β€” the control information of PTT trace πŸŽ€
  • hisi_ptt_nb β€” dynamic filter update notifier πŸ“£
  • hotplug_node β€” node for register cpu hotplug event πŸ”Œ
  • hisi_ptt_pmu β€” the pum device of trace (that's literally what it says, I'm just the messenger 😭)
  • iobase β€” base IO address of the device 🏠
  • pdev β€” pci_dev of this PTT device
  • tune_lock β€” lock to serialize the tune process πŸ”’
  • pmu_lock β€” lock to serialize the perf process πŸ”’
  • trace_irq β€” interrupt number used by trace ⚑
  • upper_bdf β€” the upper BDF range of the PCI devices managed by this PTT device
  • lower_bdf β€” the lower BDF range of the PCI devices managed by this PTT device
  • port_filters β€” the filter list of root ports πŸšͺ
  • req_filters β€” the filter list of requester ID πŸ†”
  • filter_lock β€” lock to protect the filters πŸ”
  • sysfs_inited β€” whether the filters' sysfs entries has been initialized βœ…
  • port_mask β€” port mask of the managed root ports 🎭
  • work β€” delayed work for filter updating ⏳
  • filter_update_lock β€” spinlock to protect the filter update fifo πŸ”
ngl bestie, notice how many locks are in here β€” tune_lock, pmu_lock, filter_lock, filter_update_lock. the concurrency is concurrencing. that's not a warning, that's just me being obsessed with the drama of it all πŸ’€

🫢 SEE ALSO 🫢

  • Kernel file ./drivers/hwtracing/ptt/hisi_ptt.h struct
  • struct hisi_ptt_tune_desc(9)
  • struct hisi_ptt_dma_buffer(9)
  • struct hisi_ptt_trace_ctrl(9)
  • struct hisi_ptt_filter_desc(9)
  • struct hisi_ptt_filter_update_info(9)
  • struct hisi_ptt_pmu_buf(9)

go read those next, iykyk πŸ“šβœ¨


and that's the page!! πŸŽ‰ sourced from ./drivers/hwtracing/ptt, dated October 2026 β€” mwah, slay, periodt, go forth and trace your PTT devices responsibly πŸ§šπŸ’–

πŸ“¦ where this page comes from