arch/arm/mach-shmobile/platsmp-apmu.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-shmobile/platsmp-apmu.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-shmobile/platsmp-apmu.c- Extension
.c- Size
- 6867 bytes
- Lines
- 283
- 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/cpu_pm.hlinux/delay.hlinux/init.hlinux/io.hlinux/ioport.hlinux/of.hlinux/of_address.hlinux/smp.hlinux/suspend.hlinux/threads.hasm/cacheflush.hasm/cp15.hasm/proc-fns.hasm/smp_plat.hasm/suspend.hcommon.hrcar-gen2.h
Detected Declarations
function apmu_power_onfunction apmu_power_offfunction apmu_power_off_pollfunction apmu_wrapfunction cpu_enter_lowpower_a15function shmobile_smp_apmu_cpu_shutdownfunction shmobile_smp_apmu_cpu_diefunction shmobile_smp_apmu_cpu_killfunction shmobile_smp_apmu_do_suspendfunction cpu_leave_lowpowerfunction shmobile_smp_apmu_enter_suspendfunction shmobile_smp_apmu_suspend_initfunction apmu_init_cpufunction apmu_parse_dtfunction for_each_matching_nodefunction shmobile_smp_apmu_setup_bootfunction shmobile_smp_apmu_boot_secondaryfunction shmobile_smp_apmu_prepare_cpus_dt
Annotated Snippet
if (of_cpu_node_to_id(np_cpu) == 0) {
is_allowed = true;
of_node_put(np_cpu);
break;
}
of_node_put(np_cpu);
}
if (!is_allowed)
continue;
for (bit = 0; bit < CONFIG_NR_CPUS; bit++) {
np_cpu = of_parse_phandle(np_apmu, "cpus", bit);
if (!np_cpu)
break;
index = of_cpu_node_to_id(np_cpu);
if ((index >= 0) &&
!of_address_to_resource(np_apmu, 0, &res))
fn(&res, index, bit);
of_node_put(np_cpu);
}
}
}
static void __init shmobile_smp_apmu_setup_boot(void)
{
/* install boot code shared by all CPUs */
shmobile_boot_fn = __pa_symbol(shmobile_smp_boot);
shmobile_boot_fn_gen2 = shmobile_boot_fn;
}
static int shmobile_smp_apmu_boot_secondary(unsigned int cpu,
struct task_struct *idle)
{
/* For this particular CPU register boot vector */
shmobile_smp_hook(cpu, __pa_symbol(shmobile_boot_apmu), 0);
return apmu_wrap(cpu, apmu_power_on);
}
static void __init shmobile_smp_apmu_prepare_cpus_dt(unsigned int max_cpus)
{
shmobile_smp_apmu_setup_boot();
apmu_parse_dt(apmu_init_cpu);
rcar_gen2_pm_init();
}
static struct smp_operations apmu_smp_ops __initdata = {
.smp_prepare_cpus = shmobile_smp_apmu_prepare_cpus_dt,
.smp_boot_secondary = shmobile_smp_apmu_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU
.cpu_can_disable = shmobile_smp_cpu_can_disable,
.cpu_die = shmobile_smp_apmu_cpu_die,
.cpu_kill = shmobile_smp_apmu_cpu_kill,
#endif
};
CPU_METHOD_OF_DECLARE(shmobile_smp_apmu, "renesas,apmu", &apmu_smp_ops);
#endif /* CONFIG_SMP */
Annotation
- Immediate include surface: `linux/cpu_pm.h`, `linux/delay.h`, `linux/init.h`, `linux/io.h`, `linux/ioport.h`, `linux/of.h`, `linux/of_address.h`, `linux/smp.h`.
- Detected declarations: `function apmu_power_on`, `function apmu_power_off`, `function apmu_power_off_poll`, `function apmu_wrap`, `function cpu_enter_lowpower_a15`, `function shmobile_smp_apmu_cpu_shutdown`, `function shmobile_smp_apmu_cpu_die`, `function shmobile_smp_apmu_cpu_kill`, `function shmobile_smp_apmu_do_suspend`, `function cpu_leave_lowpower`.
- 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.