aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/smp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/smp.h')
-rw-r--r--include/asm-mips/smp.h61
1 files changed, 5 insertions, 56 deletions
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h
index 23265879cee9..84fef1aeec0c 100644
--- a/include/asm-mips/smp.h
+++ b/include/asm-mips/smp.h
@@ -11,14 +11,13 @@
11#ifndef __ASM_SMP_H 11#ifndef __ASM_SMP_H
12#define __ASM_SMP_H 12#define __ASM_SMP_H
13 13
14
15#ifdef CONFIG_SMP
16
17#include <linux/bitops.h> 14#include <linux/bitops.h>
18#include <linux/linkage.h> 15#include <linux/linkage.h>
19#include <linux/threads.h> 16#include <linux/threads.h>
20#include <linux/cpumask.h> 17#include <linux/cpumask.h>
18
21#include <asm/atomic.h> 19#include <asm/atomic.h>
20#include <asm/smp-ops.h>
22 21
23extern int smp_num_siblings; 22extern int smp_num_siblings;
24extern cpumask_t cpu_sibling_map[]; 23extern cpumask_t cpu_sibling_map[];
@@ -52,56 +51,6 @@ extern struct call_data_struct *call_data;
52extern cpumask_t phys_cpu_present_map; 51extern cpumask_t phys_cpu_present_map;
53#define cpu_possible_map phys_cpu_present_map 52#define cpu_possible_map phys_cpu_present_map
54 53
55/*
56 * These are defined by the board-specific code.
57 */
58
59/*
60 * Cause the function described by call_data to be executed on the passed
61 * cpu. When the function has finished, increment the finished field of
62 * call_data.
63 */
64extern void core_send_ipi(int cpu, unsigned int action);
65
66static inline void core_send_ipi_mask(cpumask_t mask, unsigned int action)
67{
68 unsigned int i;
69
70 for_each_cpu_mask(i, mask)
71 core_send_ipi(i, action);
72}
73
74
75/*
76 * Firmware CPU startup hook
77 */
78extern void prom_boot_secondary(int cpu, struct task_struct *idle);
79
80/*
81 * After we've done initial boot, this function is called to allow the
82 * board code to clean up state, if needed
83 */
84extern void prom_init_secondary(void);
85
86/*
87 * Populate cpu_possible_map before smp_init, called from setup_arch.
88 */
89extern void plat_smp_setup(void);
90
91/*
92 * Called in smp_prepare_cpus.
93 */
94extern void plat_prepare_cpus(unsigned int max_cpus);
95
96/*
97 * Last chance for the board code to finish SMP initialization before
98 * the CPU is "online".
99 */
100extern void prom_smp_finish(void);
101
102/* Hook for after all CPUs are online */
103extern void prom_cpus_done(void);
104
105extern void asmlinkage smp_bootstrap(void); 54extern void asmlinkage smp_bootstrap(void);
106 55
107/* 56/*
@@ -111,11 +60,11 @@ extern void asmlinkage smp_bootstrap(void);
111 */ 60 */
112static inline void smp_send_reschedule(int cpu) 61static inline void smp_send_reschedule(int cpu)
113{ 62{
114 core_send_ipi(cpu, SMP_RESCHEDULE_YOURSELF); 63 extern struct plat_smp_ops *mp_ops; /* private */
64
65 mp_ops->send_ipi_single(cpu, SMP_RESCHEDULE_YOURSELF);
115} 66}
116 67
117extern asmlinkage void smp_call_function_interrupt(void); 68extern asmlinkage void smp_call_function_interrupt(void);
118 69
119#endif /* CONFIG_SMP */
120
121#endif /* __ASM_SMP_H */ 70#endif /* __ASM_SMP_H */