arch/powerpc/platforms/pseries/papr_scm.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/pseries/papr_scm.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/pseries/papr_scm.c- Extension
.c- Size
- 40236 bytes
- Lines
- 1544
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/of.hlinux/kernel.hlinux/module.hlinux/ioport.hlinux/seq_file.hlinux/slab.hlinux/sysfs.hlinux/ndctl.hlinux/sched.hlinux/libnvdimm.hlinux/platform_device.hlinux/delay.hlinux/seq_buf.hlinux/nd.hasm/plpar_wrappers.huapi/linux/papr_pdsm.hlinux/papr_scm.hasm/mce.hlinux/unaligned.hlinux/perf_event.h
Detected Declarations
struct papr_scm_perf_statstruct papr_scm_perf_statsstruct papr_scm_privstruct pdsm_cmd_descfunction papr_scm_pmem_flushfunction drc_pmem_bindfunction drc_pmem_unbindfunction drc_pmem_query_n_bindfunction themfunction papr_scm_pmu_get_valuefunction papr_scm_pmu_event_initfunction papr_scm_pmu_addfunction papr_scm_pmu_readfunction papr_scm_pmu_delfunction papr_scm_pmu_registerfunction papr_scm_pmu_registerfunction drc_pmem_query_healthfunction papr_scm_meta_getfunction papr_scm_meta_setfunction is_cmd_validfunction papr_pdsm_fuel_gaugefunction papr_pdsm_dscfunction papr_pdsm_healthfunction papr_pdsm_smart_injectfunction papr_scm_service_pdsmfunction papr_scm_ndctlfunction health_bitmap_inject_showfunction perf_stats_showfunction flags_showfunction dirty_shutdown_showfunction papr_nd_attribute_visiblefunction papr_scm_nvdimm_initfunction papr_scm_add_badblockfunction handle_mce_uefunction papr_scm_probefunction papr_scm_removefunction papr_scm_initfunction papr_scm_exitmodule init papr_scm_init
Annotated Snippet
module_init(papr_scm_init);
static void __exit papr_scm_exit(void)
{
mce_unregister_notifier(&mce_ue_nb);
platform_driver_unregister(&papr_scm_driver);
}
module_exit(papr_scm_exit);
MODULE_DEVICE_TABLE(of, papr_scm_match);
MODULE_DESCRIPTION("PAPR Storage Class Memory interface driver");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("IBM Corporation");
Annotation
- Immediate include surface: `linux/of.h`, `linux/kernel.h`, `linux/module.h`, `linux/ioport.h`, `linux/seq_file.h`, `linux/slab.h`, `linux/sysfs.h`, `linux/ndctl.h`.
- Detected declarations: `struct papr_scm_perf_stat`, `struct papr_scm_perf_stats`, `struct papr_scm_priv`, `struct pdsm_cmd_desc`, `function papr_scm_pmem_flush`, `function drc_pmem_bind`, `function drc_pmem_unbind`, `function drc_pmem_query_n_bind`, `function them`, `function papr_scm_pmu_get_value`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: integration 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.