Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org)
0007  *
0008  * Symmetric Uniprocessor (TM) Support
0009  */
0010 #include <linux/kernel.h>
0011 #include <linux/sched.h>
0012 
0013 /*
0014  * Send inter-processor interrupt
0015  */
0016 static void up_send_ipi_single(int cpu, unsigned int action)
0017 {
0018     panic(KERN_ERR "%s called", __func__);
0019 }
0020 
0021 static inline void up_send_ipi_mask(const struct cpumask *mask,
0022                     unsigned int action)
0023 {
0024     panic(KERN_ERR "%s called", __func__);
0025 }
0026 
0027 /*
0028  *  After we've done initial boot, this function is called to allow the
0029  *  board code to clean up state, if needed
0030  */
0031 static void up_init_secondary(void)
0032 {
0033 }
0034 
0035 static void up_smp_finish(void)
0036 {
0037 }
0038 
0039 /*
0040  * Firmware CPU startup hook
0041  */
0042 static int up_boot_secondary(int cpu, struct task_struct *idle)
0043 {
0044     return 0;
0045 }
0046 
0047 static void __init up_smp_setup(void)
0048 {
0049 }
0050 
0051 static void __init up_prepare_cpus(unsigned int max_cpus)
0052 {
0053 }
0054 
0055 #ifdef CONFIG_HOTPLUG_CPU
0056 static int up_cpu_disable(void)
0057 {
0058     return -ENOSYS;
0059 }
0060 
0061 static void up_cpu_die(unsigned int cpu)
0062 {
0063     BUG();
0064 }
0065 #endif
0066 
0067 const struct plat_smp_ops up_smp_ops = {
0068     .send_ipi_single    = up_send_ipi_single,
0069     .send_ipi_mask      = up_send_ipi_mask,
0070     .init_secondary     = up_init_secondary,
0071     .smp_finish     = up_smp_finish,
0072     .boot_secondary     = up_boot_secondary,
0073     .smp_setup      = up_smp_setup,
0074     .prepare_cpus       = up_prepare_cpus,
0075 #ifdef CONFIG_HOTPLUG_CPU
0076     .cpu_disable        = up_cpu_disable,
0077     .cpu_die        = up_cpu_die,
0078 #endif
0079 };