mm: make wait_on_page_writeback() wait for multiple pending writebacks
[linux/fpc-iii.git] / arch / arm / mach-alpine / platsmp.c
blobfc4bba2902ad3d29ae814f0060f3d7d7a26937a8
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * SMP operations for Alpine platform.
5 * Copyright (C) 2015 Annapurna Labs Ltd.
6 */
8 #include <linux/init.h>
9 #include <linux/errno.h>
10 #include <linux/io.h>
11 #include <linux/of.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)
19 phys_addr_t addr;
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);
25 return -EINVAL;
28 return alpine_cpu_wakeup(cpu_logical_map(cpu), (uint32_t)addr);
31 static void __init alpine_smp_prepare_cpus(unsigned int max_cpus)
33 alpine_cpu_pm_init();
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);