1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * SMP operations for Alpine platform.
5 * Copyright (C) 2015 Annapurna Labs Ltd.
8 #include <linux/init.h>
9 #include <linux/errno.h>
13 #include <asm/smp_plat.h>
15 #include "alpine_cpu_pm.h"
17 static int alpine_boot_secondary(unsigned int cpu, struct task_struct *idle)
21 addr = __pa_symbol(secondary_startup);
23 if (addr > (phys_addr_t)(uint32_t)(-1)) {
24 pr_err("FAIL: resume address over 32bit (%pa)", &addr);
28 return alpine_cpu_wakeup(cpu_logical_map(cpu), (uint32_t)addr);
31 static void __init alpine_smp_prepare_cpus(unsigned int max_cpus)
36 static const struct smp_operations alpine_smp_ops __initconst = {
37 .smp_prepare_cpus = alpine_smp_prepare_cpus,
38 .smp_boot_secondary = alpine_boot_secondary,
40 CPU_METHOD_OF_DECLARE(alpine_smp, "al,alpine-smp", &alpine_smp_ops);