arch/x86/lib/cache-smp.c
Source file repositories/reference/linux-study-clean/arch/x86/lib/cache-smp.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/lib/cache-smp.c- Extension
.c- Size
- 846 bytes
- Lines
- 45
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/smp.hlinux/export.hlinux/kvm_types.h
Detected Declarations
function __wbinvdfunction wbinvd_on_cpufunction wbinvd_on_all_cpusfunction wbinvd_on_cpus_maskfunction __wbnoinvdfunction wbnoinvd_on_all_cpusfunction wbnoinvd_on_cpus_maskexport wbinvd_on_all_cpus
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include <linux/smp.h>
#include <linux/export.h>
#include <linux/kvm_types.h>
static void __wbinvd(void *dummy)
{
wbinvd();
}
void wbinvd_on_cpu(int cpu)
{
smp_call_function_single(cpu, __wbinvd, NULL, 1);
}
EXPORT_SYMBOL_FOR_KVM(wbinvd_on_cpu);
void wbinvd_on_all_cpus(void)
{
on_each_cpu(__wbinvd, NULL, 1);
}
EXPORT_SYMBOL(wbinvd_on_all_cpus);
void wbinvd_on_cpus_mask(struct cpumask *cpus)
{
on_each_cpu_mask(cpus, __wbinvd, NULL, 1);
}
EXPORT_SYMBOL_FOR_KVM(wbinvd_on_cpus_mask);
static void __wbnoinvd(void *dummy)
{
wbnoinvd();
}
void wbnoinvd_on_all_cpus(void)
{
on_each_cpu(__wbnoinvd, NULL, 1);
}
EXPORT_SYMBOL_FOR_KVM(wbnoinvd_on_all_cpus);
void wbnoinvd_on_cpus_mask(struct cpumask *cpus)
{
on_each_cpu_mask(cpus, __wbnoinvd, NULL, 1);
}
EXPORT_SYMBOL_FOR_KVM(wbnoinvd_on_cpus_mask);
Annotation
- Immediate include surface: `linux/smp.h`, `linux/export.h`, `linux/kvm_types.h`.
- Detected declarations: `function __wbinvd`, `function wbinvd_on_cpu`, `function wbinvd_on_all_cpus`, `function wbinvd_on_cpus_mask`, `function __wbnoinvd`, `function wbnoinvd_on_all_cpus`, `function wbnoinvd_on_cpus_mask`, `export wbinvd_on_all_cpus`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: integration 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.