STRUCT MSC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so struct msc is literally the MSC device representation β€” the whole device vibe, packaged up for you, bestie. This page is from the Kernel API Manual, and yes, we're talking about struct msc(9) the entire time. No cap. 🫢

✨ SYNOPSIS ✨

here's the struct in all her exact, character-for-character glory β€” do not touch the spacing, she's sensitive πŸ’…:

       struct msc {
           void __iomem            *reg_base;
           void __iomem            *msu_base;
           struct intel_th_device  *thdev;
           const struct msu_buffer *mbuf;
           void *mbuf_priv;
           struct work_struct      work;
           struct list_head        win_list;
           struct sg_table         single_sgt;
           struct msc_window       *cur_win;
           struct msc_window       *switch_on_unlock;
           unsigned long           nr_pages;
           unsigned long           single_sz;
           unsigned int            single_wrap : 1;
           void *base;
           dma_addr_t base_addr;
           u32 orig_addr;
           u32 orig_sz;
           atomic_t user_count;
           atomic_t mmap_count;
           struct mutex            buf_mutex;
           struct list_head        iter_list;
           bool stop_on_full;
           unsigned int            enabled : 1, wrap    : 1, do_irq  : 1,
       multi_is_broken : 1;
           unsigned int            mode;
           unsigned int            burst_len;
           unsigned int            index;
        };

🫢 Members 🫢

every member gets her moment, periodt:

  • reg_base β€” the register window base address for the entire MSU. big main-character energy for the whole MSU ✨
  • msu_base β€” the register window base address for this MSC. this one's personal πŸ’…
  • thdev β€” the intel_th_device pointer, just living her life.
  • mbuf β€” the MSU buffer, if one has been assigned.
  • mbuf_priv β€” the MSU buffer's private data, if mbuf exists.
  • work β€” a work item to stop the trace when the buffer is full.
  • win_list β€” the list of windows in multiblock mode.
  • single_sgt β€” the single mode buffer.
  • cur_win β€” the current window.
  • switch_on_unlock β€” the window to switch to when it becomes available.
  • nr_pages β€” total number of pages allocated for this buffer.
  • single_sz β€” the amount of data in single mode.
  • single_wrap β€” a single mode wrap occurred.
  • base β€” the buffer's base pointer.
  • base_addr β€” the buffer's base address.
  • orig_addr β€” the MSC0 buffer's base address.
  • orig_sz β€” the MSC0 buffer's size.
  • user_count β€” number of users of the buffer.
  • mmap_count β€” number of mappings.
  • buf_mutex β€” a mutex to serialize access to buffer-related bits.
  • iter_list β€” list of open file descriptor iterators.
  • stop_on_full β€” stop the trace if the current window is full.
  • enabled β€” MSC is enabled, periodt.
  • wrap β€” wrapping is enabled.
  • do_irq β€” IRQ resource is available, handle interrupts.
  • multi_is_broken β€” multiblock mode enabled (not disabled by PCI drvdata). yes, the name is chaotic, but that's the documented deal.
  • mode β€” MSC operating mode.
  • burst_len β€” write burst length.
  • index β€” number of this MSC in the MSU.

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./drivers/hwtracing/intel_th/msu.c is the home base, and these besties are all linked:


later bestie πŸ’… this page is from the source/version ./drivers/hwtracing/intel_th, dated October 2026, and it's literally struct msc(9). mwah πŸŽ€

πŸ“¦ where this page comes from