Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / arch / arm / mach-shmobile / platsmp.c
CommitLineData
1c51ed4f
MD
1/*
2 * SMP support for R-Mobile / SH-Mobile
3 *
4 * Copyright (C) 2010 Magnus Damm
c413521e 5 * Copyright (C) 2011 Paul Mundt
1c51ed4f
MD
6 *
7 * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#include <linux/init.h>
cc61591e
MD
14#include <asm/cacheflush.h>
15#include <asm/smp_plat.h>
fd44aa5e 16#include "common.h"
1c51ed4f 17
cc61591e
MD
18extern unsigned long shmobile_smp_fn[];
19extern unsigned long shmobile_smp_arg[];
20extern unsigned long shmobile_smp_mpidr[];
21
22void shmobile_smp_hook(unsigned int cpu, unsigned long fn, unsigned long arg)
23{
24 shmobile_smp_fn[cpu] = 0;
25 flush_cache_all();
26
27 shmobile_smp_mpidr[cpu] = cpu_logical_map(cpu);
28 shmobile_smp_fn[cpu] = fn;
29 shmobile_smp_arg[cpu] = arg;
30 flush_cache_all();
31}
5c4dfcd6
MD
32
33#ifdef CONFIG_HOTPLUG_CPU
787047ee 34bool shmobile_smp_cpu_can_disable(unsigned int cpu)
5c4dfcd6 35{
787047ee 36 return true; /* Hotplug of any CPU is supported */
5c4dfcd6
MD
37}
38#endif
c21af444
MD
39
40bool __init shmobile_smp_init_fallback_ops(void)
41{
42 /* fallback on PSCI/smp_ops if no other DT based method is detected */
869ec056
AB
43 if (!IS_ENABLED(CONFIG_SMP))
44 return false;
45
c21af444
MD
46 return platform_can_secondary_boot() ? true : false;
47}
This page took 0.26337 seconds and 5 git commands to generate.