arch/arm/mach-exynos/suspend.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-exynos/suspend.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-exynos/suspend.c- Extension
.c- Size
- 18042 bytes
- Lines
- 715
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/suspend.hlinux/syscore_ops.hlinux/cpu_pm.hlinux/io.hlinux/irq.hlinux/irqchip.hlinux/irqdomain.hlinux/of_address.hlinux/err.hlinux/regulator/machine.hlinux/soc/samsung/exynos-pmu.hlinux/soc/samsung/exynos-regs-pmu.hasm/cacheflush.hasm/hardware/cache-l2x0.hasm/firmware.hasm/mcpm.hasm/smp_scu.hasm/suspend.hcommon.hsmc.h
Detected Declarations
struct exynos_wkup_irqstruct exynos_pm_datastruct exynos_pm_statefunction exynos_read_eint_wakeup_maskfunction exynos_irq_set_wakefunction exynos_pmu_domain_translatefunction exynos_pmu_domain_allocfunction exynos_pmu_irq_initfunction exynos_cpu_do_idlefunction exynos_flush_cache_allfunction exynos_cpu_suspendfunction exynos3250_cpu_suspendfunction exynos5420_cpu_suspendfunction exynos_pm_set_wakeup_maskfunction exynos_pm_enter_sleep_modefunction exynos_pm_preparefunction exynos3250_pm_preparefunction exynos5420_pm_preparefunction exynos_pm_suspendfunction exynos5420_pm_suspendfunction exynos_pm_resumefunction exynos3250_pm_resumefunction exynos5420_prepare_pm_resumefunction exynos5420_pm_resumefunction exynos_suspend_enterfunction exynos_suspend_preparefunction exynos_suspend_finishfunction exynos_pm_init
Annotated Snippet
struct exynos_wkup_irq {
unsigned int hwirq;
u32 mask;
};
struct exynos_pm_data {
const struct exynos_wkup_irq *wkup_irq;
unsigned int wake_disable_mask;
void (*pm_prepare)(void);
void (*pm_resume_prepare)(void);
int (*cpu_suspend)(unsigned long);
const struct syscore_ops *syscore_ops;
};
/* Used only on Exynos542x/5800 */
struct exynos_pm_state {
int cpu_state;
unsigned int pmu_spare3;
void __iomem *sysram_base;
phys_addr_t sysram_phys;
bool secure_firmware;
};
static const struct exynos_pm_data *pm_data __ro_after_init;
static struct exynos_pm_state pm_state;
/*
* GIC wake-up support
*/
static u32 exynos_irqwake_intmask = 0xffffffff;
static const struct exynos_wkup_irq exynos3250_wkup_irq[] = {
{ 73, BIT(1) }, /* RTC alarm */
{ 74, BIT(2) }, /* RTC tick */
{ /* sentinel */ },
};
static const struct exynos_wkup_irq exynos4_wkup_irq[] = {
{ 44, BIT(1) }, /* RTC alarm */
{ 45, BIT(2) }, /* RTC tick */
{ /* sentinel */ },
};
static const struct exynos_wkup_irq exynos5250_wkup_irq[] = {
{ 43, BIT(1) }, /* RTC alarm */
{ 44, BIT(2) }, /* RTC tick */
{ /* sentinel */ },
};
static u32 exynos_read_eint_wakeup_mask(void)
{
return pmu_raw_readl(EXYNOS_EINT_WAKEUP_MASK);
}
static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
{
const struct exynos_wkup_irq *wkup_irq;
if (!pm_data->wkup_irq)
return -ENOENT;
wkup_irq = pm_data->wkup_irq;
while (wkup_irq->mask) {
if (wkup_irq->hwirq == data->hwirq) {
if (!state)
exynos_irqwake_intmask |= wkup_irq->mask;
else
exynos_irqwake_intmask &= ~wkup_irq->mask;
return 0;
}
++wkup_irq;
}
return -ENOENT;
}
static struct irq_chip exynos_pmu_chip = {
.name = "PMU",
.irq_eoi = irq_chip_eoi_parent,
.irq_mask = irq_chip_mask_parent,
.irq_unmask = irq_chip_unmask_parent,
.irq_retrigger = irq_chip_retrigger_hierarchy,
.irq_set_wake = exynos_irq_set_wake,
#ifdef CONFIG_SMP
.irq_set_affinity = irq_chip_set_affinity_parent,
#endif
};
Annotation
- Immediate include surface: `linux/init.h`, `linux/suspend.h`, `linux/syscore_ops.h`, `linux/cpu_pm.h`, `linux/io.h`, `linux/irq.h`, `linux/irqchip.h`, `linux/irqdomain.h`.
- Detected declarations: `struct exynos_wkup_irq`, `struct exynos_pm_data`, `struct exynos_pm_state`, `function exynos_read_eint_wakeup_mask`, `function exynos_irq_set_wake`, `function exynos_pmu_domain_translate`, `function exynos_pmu_domain_alloc`, `function exynos_pmu_irq_init`, `function exynos_cpu_do_idle`, `function exynos_flush_cache_all`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.