STRUCT MSC(9)
π 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β theintel_th_devicepointer, just living her life.mbufβ the MSU buffer, if one has been assigned.mbuf_privβ the MSU buffer's private data, ifmbufexists.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:
struct msc_window(9)struct msc_iter(9)struct msu_buffer_entry(9)msc_is_last_win(9)msc_next_window(9)msc_find_window(9)msc_oldest_window(9)msc_win_oldest_sg(9)msc_buffer_iterate(9)msc_buffer_clear_hw_header(9)msc_configure(9)msc_disable(9)msc_buffer_contig_alloc(9)msc_buffer_contig_free(9)msc_buffer_contig_get_page(9)msc_buffer_win_alloc(9)msc_buffer_win_free(9)msc_buffer_relink(9)msc_buffer_free(9)msc_buffer_alloc(9)msc_buffer_unlocked_free_unless_used(9)msc_buffer_free_unless_used(9)msc_buffer_get_page(9)struct msc_win_to_user_struct(9)msc_win_to_user(9)intel_th_msc_window_unlock(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms