2 * This file is subject to the terms and conditions of the GNU General
3 * Public License. See the file "COPYING" in the main directory of this
4 * archive for more details.
6 * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com)
7 * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc.
8 * Copyright (C) 2000, 2001, 2002 Ralf Baechle
9 * Copyright (C) 2000, 2001 Broadcom Corporation
11 #ifndef __ASM_SMP_OPS_H
12 #define __ASM_SMP_OPS_H
14 #include <linux/errno.h>
18 #include <linux/cpumask.h>
23 void (*send_ipi_single
)(int cpu
, unsigned int action
);
24 void (*send_ipi_mask
)(const struct cpumask
*mask
, unsigned int action
);
25 void (*init_secondary
)(void);
26 void (*smp_finish
)(void);
27 void (*cpus_done
)(void);
28 void (*boot_secondary
)(int cpu
, struct task_struct
*idle
);
29 void (*smp_setup
)(void);
30 void (*prepare_cpus
)(unsigned int max_cpus
);
31 #ifdef CONFIG_HOTPLUG_CPU
32 int (*cpu_disable
)(void);
33 void (*cpu_die
)(unsigned int cpu
);
37 extern void register_smp_ops(struct plat_smp_ops
*ops
);
39 static inline void plat_smp_setup(void)
41 extern struct plat_smp_ops
*mp_ops
; /* private */
46 #else /* !CONFIG_SMP */
50 static inline void plat_smp_setup(void)
52 /* UP, nothing to do ... */
55 static inline void register_smp_ops(struct plat_smp_ops
*ops
)
59 #endif /* !CONFIG_SMP */
61 static inline int register_up_smp_ops(void)
64 extern struct plat_smp_ops up_smp_ops
;
66 register_smp_ops(&up_smp_ops
);
74 static inline int register_cmp_smp_ops(void)
76 #ifdef CONFIG_MIPS_CMP
77 extern struct plat_smp_ops cmp_smp_ops
;
79 register_smp_ops(&cmp_smp_ops
);
87 static inline int register_vsmp_smp_ops(void)
89 #ifdef CONFIG_MIPS_MT_SMP
90 extern struct plat_smp_ops vsmp_smp_ops
;
92 register_smp_ops(&vsmp_smp_ops
);
100 #endif /* __ASM_SMP_OPS_H */