kvm tools, setup: Create private directory
[linux-2.6/next.git] / arch / mips / include / asm / smp-ops.h
blob9e09af34c8a87cbfc03b65c429fc99844edcd69d
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 task_struct;
20 struct plat_smp_ops {
21 void (*send_ipi_single)(int cpu, unsigned int action);
22 void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
23 void (*init_secondary)(void);
24 void (*smp_finish)(void);
25 void (*cpus_done)(void);
26 void (*boot_secondary)(int cpu, struct task_struct *idle);
27 void (*smp_setup)(void);
28 void (*prepare_cpus)(unsigned int max_cpus);
29 #ifdef CONFIG_HOTPLUG_CPU
30 int (*cpu_disable)(void);
31 void (*cpu_die)(unsigned int cpu);
32 #endif
35 extern void register_smp_ops(struct plat_smp_ops *ops);
37 static inline void plat_smp_setup(void)
39 extern struct plat_smp_ops *mp_ops; /* private */
41 mp_ops->smp_setup();
44 #else /* !CONFIG_SMP */
46 struct plat_smp_ops;
48 static inline void plat_smp_setup(void)
50 /* UP, nothing to do ... */
53 static inline void register_smp_ops(struct plat_smp_ops *ops)
57 #endif /* !CONFIG_SMP */
59 extern struct plat_smp_ops up_smp_ops;
60 extern struct plat_smp_ops cmp_smp_ops;
61 extern struct plat_smp_ops vsmp_smp_ops;
63 #endif /* __ASM_SMP_OPS_H */