arch/x86/events/intel/uncore_snb.c
Source file repositories/reference/linux-study-clean/arch/x86/events/intel/uncore_snb.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/events/intel/uncore_snb.c- Extension
.c- Size
- 59883 bytes
- Lines
- 2015
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/msr.huncore.huncore_discovery.h
Detected Declarations
struct imc_uncore_pci_devenum perf_snb_uncore_imc_freerunning_typesenum perf_tgl_uncore_imc_freerunning_typesenum perf_adl_uncore_imc_freerunning_typesfunction snb_uncore_msr_enable_eventfunction snb_uncore_msr_disable_eventfunction snb_uncore_msr_init_boxfunction snb_uncore_msr_enable_boxfunction snb_uncore_msr_exit_boxfunction snb_uncore_cpu_initfunction skl_uncore_msr_init_boxfunction skl_uncore_msr_enable_boxfunction skl_uncore_msr_exit_boxfunction skl_uncore_cpu_initfunction icl_get_cbox_numfunction icl_uncore_cpu_initfunction rkl_uncore_msr_init_boxfunction tgl_uncore_cpu_initfunction adl_uncore_msr_enable_boxfunction adl_uncore_msr_disable_boxfunction adl_uncore_msr_exit_boxfunction adl_uncore_cpu_initfunction mtl_uncore_msr_init_boxfunction mtl_uncore_cpu_initfunction lnl_uncore_msr_init_boxfunction lnl_uncore_cpu_initfunction snb_uncore_imc_init_boxfunction snb_uncore_imc_enable_boxfunction knownfunction snb_uncore_imc_hw_configfunction snb_pci2phy_map_initfunction snb_uncore_imc_read_counterfunction for_each_imc_pci_idfunction imc_uncore_pci_initfunction snb_uncore_pci_initfunction ivb_uncore_pci_initfunction hsw_uncore_pci_initfunction bdw_uncore_pci_initfunction skl_uncore_pci_initfunction nhm_uncore_msr_disable_boxfunction nhm_uncore_msr_enable_boxfunction nhm_uncore_msr_enable_eventfunction nhm_uncore_cpu_initfunction uncore_get_box_mmio_addrfunction __uncore_imc_init_boxfunction tgl_uncore_imc_freerunning_init_boxfunction tgl_l_uncore_mmio_initfunction tgl_uncore_mmio_init
Annotated Snippet
static struct pci_driver snb_uncore_pci_driver = {
.name = "snb_uncore",
.id_table = snb_uncore_pci_ids,
};
static struct pci_driver ivb_uncore_pci_driver = {
.name = "ivb_uncore",
.id_table = ivb_uncore_pci_ids,
};
static struct pci_driver hsw_uncore_pci_driver = {
.name = "hsw_uncore",
.id_table = hsw_uncore_pci_ids,
};
static struct pci_driver bdw_uncore_pci_driver = {
.name = "bdw_uncore",
.id_table = bdw_uncore_pci_ids,
};
static struct pci_driver skl_uncore_pci_driver = {
.name = "skl_uncore",
.id_table = skl_uncore_pci_ids,
};
static struct pci_driver icl_uncore_pci_driver = {
.name = "icl_uncore",
.id_table = icl_uncore_pci_ids,
};
struct imc_uncore_pci_dev {
__u32 pci_id;
struct pci_driver *driver;
};
#define IMC_DEV(a, d) \
{ .pci_id = PCI_DEVICE_ID_INTEL_##a, .driver = (d) }
static const struct imc_uncore_pci_dev desktop_imc_pci_ids[] = {
IMC_DEV(SNB_IMC, &snb_uncore_pci_driver),
IMC_DEV(IVB_IMC, &ivb_uncore_pci_driver), /* 3rd Gen Core processor */
IMC_DEV(IVB_E3_IMC, &ivb_uncore_pci_driver), /* Xeon E3-1200 v2/3rd Gen Core processor */
IMC_DEV(HSW_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core Processor */
IMC_DEV(HSW_U_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core ULT Mobile Processor */
IMC_DEV(BDW_IMC, &bdw_uncore_pci_driver), /* 5th Gen Core U */
IMC_DEV(SKL_Y_IMC, &skl_uncore_pci_driver), /* 6th Gen Core Y */
IMC_DEV(SKL_U_IMC, &skl_uncore_pci_driver), /* 6th Gen Core U */
IMC_DEV(SKL_HD_IMC, &skl_uncore_pci_driver), /* 6th Gen Core H Dual Core */
IMC_DEV(SKL_HQ_IMC, &skl_uncore_pci_driver), /* 6th Gen Core H Quad Core */
IMC_DEV(SKL_SD_IMC, &skl_uncore_pci_driver), /* 6th Gen Core S Dual Core */
IMC_DEV(SKL_SQ_IMC, &skl_uncore_pci_driver), /* 6th Gen Core S Quad Core */
IMC_DEV(SKL_E3_IMC, &skl_uncore_pci_driver), /* Xeon E3 V5 Gen Core processor */
IMC_DEV(KBL_Y_IMC, &skl_uncore_pci_driver), /* 7th Gen Core Y */
IMC_DEV(KBL_U_IMC, &skl_uncore_pci_driver), /* 7th Gen Core U */
IMC_DEV(KBL_UQ_IMC, &skl_uncore_pci_driver), /* 7th Gen Core U Quad Core */
IMC_DEV(KBL_SD_IMC, &skl_uncore_pci_driver), /* 7th Gen Core S Dual Core */
IMC_DEV(KBL_SQ_IMC, &skl_uncore_pci_driver), /* 7th Gen Core S Quad Core */
IMC_DEV(KBL_HQ_IMC, &skl_uncore_pci_driver), /* 7th Gen Core H Quad Core */
IMC_DEV(KBL_WQ_IMC, &skl_uncore_pci_driver), /* 7th Gen Core S 4 cores Work Station */
IMC_DEV(CFL_2U_IMC, &skl_uncore_pci_driver), /* 8th Gen Core U 2 Cores */
IMC_DEV(CFL_4U_IMC, &skl_uncore_pci_driver), /* 8th Gen Core U 4 Cores */
IMC_DEV(CFL_4H_IMC, &skl_uncore_pci_driver), /* 8th Gen Core H 4 Cores */
IMC_DEV(CFL_6H_IMC, &skl_uncore_pci_driver), /* 8th Gen Core H 6 Cores */
IMC_DEV(CFL_2S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 2 Cores Desktop */
IMC_DEV(CFL_4S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 4 Cores Desktop */
IMC_DEV(CFL_6S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 6 Cores Desktop */
IMC_DEV(CFL_8S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 8 Cores Desktop */
IMC_DEV(CFL_4S_W_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 4 Cores Work Station */
IMC_DEV(CFL_6S_W_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 6 Cores Work Station */
IMC_DEV(CFL_8S_W_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 8 Cores Work Station */
IMC_DEV(CFL_4S_S_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 4 Cores Server */
IMC_DEV(CFL_6S_S_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 6 Cores Server */
IMC_DEV(CFL_8S_S_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 8 Cores Server */
IMC_DEV(AML_YD_IMC, &skl_uncore_pci_driver), /* 8th Gen Core Y Mobile Dual Core */
IMC_DEV(AML_YQ_IMC, &skl_uncore_pci_driver), /* 8th Gen Core Y Mobile Quad Core */
IMC_DEV(WHL_UQ_IMC, &skl_uncore_pci_driver), /* 8th Gen Core U Mobile Quad Core */
IMC_DEV(WHL_4_UQ_IMC, &skl_uncore_pci_driver), /* 8th Gen Core U Mobile Quad Core */
IMC_DEV(WHL_UD_IMC, &skl_uncore_pci_driver), /* 8th Gen Core U Mobile Dual Core */
IMC_DEV(CML_H1_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_H2_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_H3_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_U1_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_U2_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_U3_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_S1_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_S2_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_S3_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_S4_IMC, &skl_uncore_pci_driver),
IMC_DEV(CML_S5_IMC, &skl_uncore_pci_driver),
IMC_DEV(ICL_U_IMC, &icl_uncore_pci_driver), /* 10th Gen Core Mobile */
IMC_DEV(ICL_U2_IMC, &icl_uncore_pci_driver), /* 10th Gen Core Mobile */
Annotation
- Immediate include surface: `asm/msr.h`, `uncore.h`, `uncore_discovery.h`.
- Detected declarations: `struct imc_uncore_pci_dev`, `enum perf_snb_uncore_imc_freerunning_types`, `enum perf_tgl_uncore_imc_freerunning_types`, `enum perf_adl_uncore_imc_freerunning_types`, `function snb_uncore_msr_enable_event`, `function snb_uncore_msr_disable_event`, `function snb_uncore_msr_init_box`, `function snb_uncore_msr_enable_box`, `function snb_uncore_msr_exit_box`, `function snb_uncore_cpu_init`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.