arch/riscv/include/asm/smp.h
Source file repositories/reference/linux-study-clean/arch/riscv/include/asm/smp.h
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/include/asm/smp.h- Extension
.h- Size
- 2553 bytes
- Lines
- 118
- Domain
- Architecture Layer
- Bucket
- arch/riscv
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cpumask.hlinux/irqreturn.hlinux/thread_info.hlinux/jump_label.h
Detected Declarations
struct seq_filefunction __cpu_diefunction cpuid_to_hartid_mapfunction riscv_ipi_enablefunction riscv_ipi_set_virq_rangefunction cpu_has_hotplug
Annotated Snippet
static inline void __cpu_die(unsigned int cpu) { }
#endif /* CONFIG_HOTPLUG_CPU */
#else
static inline void show_ipi_stats(struct seq_file *p, int prec)
{
}
static inline int riscv_hartid_to_cpuid(unsigned long hartid)
{
if (hartid == boot_cpu_hartid)
return 0;
return -1;
}
static inline unsigned long cpuid_to_hartid_map(int cpu)
{
return boot_cpu_hartid;
}
static inline void riscv_ipi_enable(void)
{
}
static inline void riscv_ipi_disable(void)
{
}
static inline bool riscv_ipi_have_virq_range(void)
{
return false;
}
static inline void riscv_ipi_set_virq_range(int virq, int nr)
{
}
#endif /* CONFIG_SMP */
#if defined(CONFIG_HOTPLUG_CPU)
bool cpu_has_hotplug(unsigned int cpu);
#else
static inline bool cpu_has_hotplug(unsigned int cpu)
{
return false;
}
#endif
#endif /* _ASM_RISCV_SMP_H */
Annotation
- Immediate include surface: `linux/cpumask.h`, `linux/irqreturn.h`, `linux/thread_info.h`, `linux/jump_label.h`.
- Detected declarations: `struct seq_file`, `function __cpu_die`, `function cpuid_to_hartid_map`, `function riscv_ipi_enable`, `function riscv_ipi_set_virq_range`, `function cpu_has_hotplug`.
- Atlas domain: Architecture Layer / arch/riscv.
- Implementation status: source implementation candidate.
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.