| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 1 | /* | 
 | 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 Vorobiev | 1451a39 | 2009-03-23 00:12:28 +0200 | [diff] [blame] | 16 | static void up_send_ipi_single(int cpu, unsigned int action) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 17 | { | 
 | 18 | 	panic(KERN_ERR "%s called", __func__); | 
 | 19 | } | 
 | 20 |  | 
| Rusty Russell | 48a048f | 2009-09-24 09:34:44 -0600 | [diff] [blame] | 21 | static inline void up_send_ipi_mask(const struct cpumask *mask, | 
 | 22 | 				    unsigned int action) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 23 | { | 
 | 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 |  */ | 
| Dmitri Vorobiev | 1451a39 | 2009-03-23 00:12:28 +0200 | [diff] [blame] | 31 | static void __cpuinit up_init_secondary(void) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 32 | { | 
 | 33 | } | 
 | 34 |  | 
| Dmitri Vorobiev | 1451a39 | 2009-03-23 00:12:28 +0200 | [diff] [blame] | 35 | static void __cpuinit up_smp_finish(void) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 36 | { | 
 | 37 | } | 
 | 38 |  | 
 | 39 | /* Hook for after all CPUs are online */ | 
| Dmitri Vorobiev | 1451a39 | 2009-03-23 00:12:28 +0200 | [diff] [blame] | 40 | static void up_cpus_done(void) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 41 | { | 
 | 42 | } | 
 | 43 |  | 
 | 44 | /* | 
 | 45 |  * Firmware CPU startup hook | 
 | 46 |  */ | 
| Dmitri Vorobiev | 1451a39 | 2009-03-23 00:12:28 +0200 | [diff] [blame] | 47 | static void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 48 | { | 
 | 49 | } | 
 | 50 |  | 
| Dmitri Vorobiev | 1451a39 | 2009-03-23 00:12:28 +0200 | [diff] [blame] | 51 | static void __init up_smp_setup(void) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 52 | { | 
 | 53 | } | 
 | 54 |  | 
| Dmitri Vorobiev | 1451a39 | 2009-03-23 00:12:28 +0200 | [diff] [blame] | 55 | static void __init up_prepare_cpus(unsigned int max_cpus) | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 56 | { | 
 | 57 | } | 
 | 58 |  | 
| Ralf Baechle | 1b2bc75 | 2009-06-23 10:00:31 +0100 | [diff] [blame] | 59 | #ifdef CONFIG_HOTPLUG_CPU | 
 | 60 | static int up_cpu_disable(void) | 
 | 61 | { | 
 | 62 | 	return -ENOSYS; | 
 | 63 | } | 
 | 64 |  | 
 | 65 | static void up_cpu_die(unsigned int cpu) | 
 | 66 | { | 
 | 67 | 	BUG(); | 
 | 68 | } | 
 | 69 | #endif | 
 | 70 |  | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 71 | struct plat_smp_ops up_smp_ops = { | 
 | 72 | 	.send_ipi_single	= up_send_ipi_single, | 
 | 73 | 	.send_ipi_mask		= up_send_ipi_mask, | 
 | 74 | 	.init_secondary		= up_init_secondary, | 
 | 75 | 	.smp_finish		= up_smp_finish, | 
 | 76 | 	.cpus_done		= up_cpus_done, | 
 | 77 | 	.boot_secondary		= up_boot_secondary, | 
 | 78 | 	.smp_setup		= up_smp_setup, | 
 | 79 | 	.prepare_cpus		= up_prepare_cpus, | 
| Ralf Baechle | 1b2bc75 | 2009-06-23 10:00:31 +0100 | [diff] [blame] | 80 | #ifdef CONFIG_HOTPLUG_CPU | 
 | 81 | 	.cpu_disable		= up_cpu_disable, | 
 | 82 | 	.cpu_die		= up_cpu_die, | 
 | 83 | #endif | 
| Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 84 | }; |