Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[wrt350n-kernel.git] / include / asm-mips / smp-ops.h
blobb17fdfb5d8187551faac0e87d1b850bb86cbe5ae
1 /*
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 #ifdef CONFIG_SMP
16 #include <linux/cpumask.h>
18 struct plat_smp_ops {
19 void (*send_ipi_single)(int cpu, unsigned int action);
20 void (*send_ipi_mask)(cpumask_t mask, unsigned int action);
21 void (*init_secondary)(void);
22 void (*smp_finish)(void);
23 void (*cpus_done)(void);
24 void (*boot_secondary)(int cpu, struct task_struct *idle);
25 void (*smp_setup)(void);
26 void (*prepare_cpus)(unsigned int max_cpus);
29 extern void register_smp_ops(struct plat_smp_ops *ops);
31 static inline void plat_smp_setup(void)
33 extern struct plat_smp_ops *mp_ops; /* private */
35 mp_ops->smp_setup();
38 #else /* !CONFIG_SMP */
40 struct plat_smp_ops;
42 static inline void plat_smp_setup(void)
44 /* UP, nothing to do ... */
47 static inline void register_smp_ops(struct plat_smp_ops *ops)
51 #endif /* !CONFIG_SMP */
53 extern struct plat_smp_ops up_smp_ops;
54 extern struct plat_smp_ops vsmp_smp_ops;
56 #endif /* __ASM_SMP_OPS_H */