blob: 525d3196f793f254d2620cd8a3f7a828547be3fa [file] [log] [blame]
Ralf Baechle940f6b42007-11-24 22:33:28 +00001/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org)
7 *
8 * Symmetric Uniprocessor (TM) Support
9 */
10#include <linux/kernel.h>
11#include <linux/sched.h>
12
13/*
14 * Send inter-processor interrupt
15 */
Dmitri Vorobiev1451a392009-03-23 00:12:28 +020016static void up_send_ipi_single(int cpu, unsigned int action)
Ralf Baechle940f6b42007-11-24 22:33:28 +000017{
18 panic(KERN_ERR "%s called", __func__);
19}
20
Rusty Russell48a048f2009-09-24 09:34:44 -060021static inline void up_send_ipi_mask(const struct cpumask *mask,
22 unsigned int action)
Ralf Baechle940f6b42007-11-24 22:33:28 +000023{
24 panic(KERN_ERR "%s called", __func__);
25}
26
27/*
28 * After we've done initial boot, this function is called to allow the
29 * board code to clean up state, if needed
30 */
Paul Gortmaker078a55f2013-06-18 13:38:59 +000031static void up_init_secondary(void)
Ralf Baechle940f6b42007-11-24 22:33:28 +000032{
33}
34
Paul Gortmaker078a55f2013-06-18 13:38:59 +000035static void up_smp_finish(void)
Ralf Baechle940f6b42007-11-24 22:33:28 +000036{
37}
38
Ralf Baechle940f6b42007-11-24 22:33:28 +000039/*
40 * Firmware CPU startup hook
41 */
Paul Burtond595d422017-08-12 19:49:40 -070042static int up_boot_secondary(int cpu, struct task_struct *idle)
Ralf Baechle940f6b42007-11-24 22:33:28 +000043{
Paul Burtond595d422017-08-12 19:49:40 -070044 return 0;
Ralf Baechle940f6b42007-11-24 22:33:28 +000045}
46
Dmitri Vorobiev1451a392009-03-23 00:12:28 +020047static void __init up_smp_setup(void)
Ralf Baechle940f6b42007-11-24 22:33:28 +000048{
49}
50
Dmitri Vorobiev1451a392009-03-23 00:12:28 +020051static void __init up_prepare_cpus(unsigned int max_cpus)
Ralf Baechle940f6b42007-11-24 22:33:28 +000052{
53}
54
Ralf Baechle1b2bc752009-06-23 10:00:31 +010055#ifdef CONFIG_HOTPLUG_CPU
56static int up_cpu_disable(void)
57{
58 return -ENOSYS;
59}
60
61static void up_cpu_die(unsigned int cpu)
62{
63 BUG();
64}
65#endif
66
Matt Redfearnff2c8252017-07-19 09:21:03 +010067const struct plat_smp_ops up_smp_ops = {
Ralf Baechle940f6b42007-11-24 22:33:28 +000068 .send_ipi_single = up_send_ipi_single,
69 .send_ipi_mask = up_send_ipi_mask,
70 .init_secondary = up_init_secondary,
71 .smp_finish = up_smp_finish,
Ralf Baechle940f6b42007-11-24 22:33:28 +000072 .boot_secondary = up_boot_secondary,
73 .smp_setup = up_smp_setup,
74 .prepare_cpus = up_prepare_cpus,
Ralf Baechle1b2bc752009-06-23 10:00:31 +010075#ifdef CONFIG_HOTPLUG_CPU
76 .cpu_disable = up_cpu_disable,
77 .cpu_die = up_cpu_die,
78#endif
Ralf Baechle940f6b42007-11-24 22:33:28 +000079};