arch/arm/mach-exynos/platsmp.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-exynos/platsmp.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-exynos/platsmp.c- Extension
.c- Size
- 10091 bytes
- Lines
- 451
- Domain
- Architecture Layer
- Bucket
- arch/arm
- 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.
- 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
linux/init.hlinux/errno.hlinux/delay.hlinux/jiffies.hlinux/smp.hlinux/io.hlinux/of_address.hlinux/soc/samsung/exynos-regs-pmu.hasm/cacheflush.hasm/cp15.hasm/smp_plat.hasm/smp_scu.hasm/firmware.hcommon.h
Detected Declarations
function cpu_leave_lowpowerfunction platform_do_lowpowerfunction exynos_cpu_power_downfunction exynos_cpu_power_upfunction exynos_cpu_power_statefunction exynos_cluster_power_downfunction exynos_cluster_power_upfunction exynos_cluster_power_statefunction exynos_scu_enablefunction exynos_core_restartfunction exynos_write_pen_releasefunction exynos_secondary_initfunction exynos_set_boot_addrfunction exynos_get_boot_addrfunction exynos_boot_secondaryfunction exynos_smp_prepare_cpusfunction exynos_cpu_die
Annotated Snippet
if (exynos_pen_release == core_id) {
/*
* OK, proper wakeup, we're done
*/
break;
}
/*
* Getting here, means that we have come out of WFI without
* having been woken up - this shouldn't happen
*
* Just note it happening - when we're woken, we can report
* its occurrence.
*/
(*spurious)++;
}
}
#endif /* CONFIG_HOTPLUG_CPU */
/**
* exynos_cpu_power_down() - power down the specified cpu
* @cpu: the cpu to power down
*
* Power down the specified cpu. The sequence must be finished by a
* call to cpu_do_idle()
*/
void exynos_cpu_power_down(int cpu)
{
u32 core_conf;
if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) {
/*
* Bypass power down for CPU0 during suspend. Check for
* the SYS_PWR_REG value to decide if we are suspending
* the system.
*/
int val = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG);
if (!(val & S5P_CORE_LOCAL_PWR_EN))
return;
}
core_conf = pmu_raw_readl(EXYNOS_ARM_CORE_CONFIGURATION(cpu));
core_conf &= ~S5P_CORE_LOCAL_PWR_EN;
pmu_raw_writel(core_conf, EXYNOS_ARM_CORE_CONFIGURATION(cpu));
}
/**
* exynos_cpu_power_up() - power up the specified cpu
* @cpu: the cpu to power up
*
* Power up the specified cpu
*/
void exynos_cpu_power_up(int cpu)
{
u32 core_conf = S5P_CORE_LOCAL_PWR_EN;
if (soc_is_exynos3250())
core_conf |= S5P_CORE_AUTOWAKEUP_EN;
pmu_raw_writel(core_conf,
EXYNOS_ARM_CORE_CONFIGURATION(cpu));
}
/**
* exynos_cpu_power_state() - returns the power state of the cpu
* @cpu: the cpu to retrieve the power state from
*/
int exynos_cpu_power_state(int cpu)
{
return (pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) &
S5P_CORE_LOCAL_PWR_EN);
}
/**
* exynos_cluster_power_down() - power down the specified cluster
* @cluster: the cluster to power down
*/
void exynos_cluster_power_down(int cluster)
{
pmu_raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster));
}
/**
* exynos_cluster_power_up() - power up the specified cluster
* @cluster: the cluster to power up
*/
void exynos_cluster_power_up(int cluster)
{
pmu_raw_writel(S5P_CORE_LOCAL_PWR_EN,
Annotation
- Immediate include surface: `linux/init.h`, `linux/errno.h`, `linux/delay.h`, `linux/jiffies.h`, `linux/smp.h`, `linux/io.h`, `linux/of_address.h`, `linux/soc/samsung/exynos-regs-pmu.h`.
- Detected declarations: `function cpu_leave_lowpower`, `function platform_do_lowpower`, `function exynos_cpu_power_down`, `function exynos_cpu_power_up`, `function exynos_cpu_power_state`, `function exynos_cluster_power_down`, `function exynos_cluster_power_up`, `function exynos_cluster_power_state`, `function exynos_scu_enable`, `function exynos_core_restart`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: source 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.