arch/arm64/include/asm/smp.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/smp.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/smp.h- Extension
.h- Size
- 3924 bytes
- Lines
- 161
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- 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/const.hlinux/threads.hlinux/cpumask.hlinux/thread_info.h
Detected Declarations
struct seq_filestruct secondary_dataenum ipi_msg_typefunction set_cpu_logical_mapfunction set_smp_ipi_rangefunction arch_send_wakeup_ipifunction __cpu_diefunction cpu_park_loopfunction update_cpu_boot_statusfunction cpu_panic_kernel
Annotated Snippet
struct secondary_data {
struct task_struct *task;
long status;
};
extern struct secondary_data secondary_data;
extern long __early_cpu_boot_status;
extern void secondary_entry(void);
extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
extern void arch_send_wakeup_ipi(unsigned int cpu);
#else
static inline void arch_send_wakeup_ipi(unsigned int cpu)
{
BUILD_BUG();
}
#endif
extern int __cpu_disable(void);
static inline void __cpu_die(unsigned int cpu) { }
extern void __noreturn cpu_die(void);
extern void __noreturn cpu_die_early(void);
static inline void __noreturn cpu_park_loop(void)
{
for (;;) {
wfe();
wfi();
}
}
static inline void update_cpu_boot_status(int val)
{
WRITE_ONCE(secondary_data.status, val);
/* Ensure the visibility of the status update */
dsb(ishst);
}
/*
* The calling secondary CPU has detected serious configuration mismatch,
* which calls for a kernel panic. Update the boot status and park the calling
* CPU.
*/
static inline void __noreturn cpu_panic_kernel(void)
{
update_cpu_boot_status(CPU_PANIC_KERNEL);
cpu_park_loop();
}
/*
* If a secondary CPU enters the kernel but fails to come online,
* (e.g. due to mismatched features), and cannot exit the kernel,
* we increment cpus_stuck_in_kernel and leave the CPU in a
* quiesecent loop within the kernel text. The memory containing
* this loop must not be re-used for anything else as the 'stuck'
* core is executing it.
*
* This function is used to inhibit features like kexec and hibernate.
*/
bool cpus_are_stuck_in_kernel(void);
extern void crash_smp_send_stop(void);
extern bool smp_crash_stop_failed(void);
#endif /* ifndef __ASSEMBLER__ */
#endif /* ifndef __ASM_SMP_H */
Annotation
- Immediate include surface: `linux/const.h`, `linux/threads.h`, `linux/cpumask.h`, `linux/thread_info.h`.
- Detected declarations: `struct seq_file`, `struct secondary_data`, `enum ipi_msg_type`, `function set_cpu_logical_map`, `function set_smp_ipi_range`, `function arch_send_wakeup_ipi`, `function __cpu_die`, `function cpu_park_loop`, `function update_cpu_boot_status`, `function cpu_panic_kernel`.
- Atlas domain: Architecture Layer / arch/arm64.
- 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.