aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/smp.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:48:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:48:03 -0500
commit21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (patch)
tree5d288c1877b1ae9fbe24aa7fabd79565e73d3d2f /include/asm-mips/smp.h
parent5ea293a9048d3a58cb0c840fa719d85ad14cba47 (diff)
parenta9d2517c7a5c8028fbc5296d3af3c75597d3d180 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (68 commits) [MIPS] remove Documentation/mips/GT64120.README [MIPS] Malta: remaining bits of the board support code cleanup [MIPS] Malta: make the helper function static [MIPS] Malta: fix braces at single statement blocks [MIPS] Malta, Atlas: move an extern function declaration to the header file [MIPS] Malta: Use C89 style for comments [MIPS] Malta: else should follow close brace in malta_int.c [MIPS] Malta: remove a superfluous comment [MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h> [MIPS] Malta, Atlas, Sead: remove an extern from .c files [MIPS] Malta: fix oversized lines in malta_int.c [MIPS] Malta: remove a dead function declaration [MIPS] Malta: use tabs not spaces [MIPS] Malta: set up the screen info in a separate function [MIPS] Malta: check the PCI clock frequency in a separate function [MIPS] Malta: use the KERN_ facility level in printk() [MIPS] Malta: use Linux kernel style for structure initialization [MIPS]: constify function pointer tables [MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64 [MIPS] Cobalt 64-bits kernels can be safely unmarked experimental ...
Diffstat (limited to 'include/asm-mips/smp.h')
-rw-r--r--include/asm-mips/smp.h64
1 files changed, 8 insertions, 56 deletions
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h
index dc770025a9b..84fef1aeec0 100644
--- a/include/asm-mips/smp.h
+++ b/include/asm-mips/smp.h
@@ -11,14 +11,16 @@
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>
21
22extern int smp_num_siblings;
23extern cpumask_t cpu_sibling_map[];
22 24
23#define raw_smp_processor_id() (current_thread_info()->cpu) 25#define raw_smp_processor_id() (current_thread_info()->cpu)
24 26
@@ -49,56 +51,6 @@ extern struct call_data_struct *call_data;
49extern cpumask_t phys_cpu_present_map; 51extern cpumask_t phys_cpu_present_map;
50#define cpu_possible_map phys_cpu_present_map 52#define cpu_possible_map phys_cpu_present_map
51 53
52/*
53 * These are defined by the board-specific code.
54 */
55
56/*
57 * Cause the function described by call_data to be executed on the passed
58 * cpu. When the function has finished, increment the finished field of
59 * call_data.
60 */
61extern void core_send_ipi(int cpu, unsigned int action);
62
63static inline void core_send_ipi_mask(cpumask_t mask, unsigned int action)
64{
65 unsigned int i;
66
67 for_each_cpu_mask(i, mask)
68 core_send_ipi(i, action);
69}
70
71
72/*
73 * Firmware CPU startup hook
74 */
75extern void prom_boot_secondary(int cpu, struct task_struct *idle);
76
77/*
78 * After we've done initial boot, this function is called to allow the
79 * board code to clean up state, if needed
80 */
81extern void prom_init_secondary(void);
82
83/*
84 * Populate cpu_possible_map before smp_init, called from setup_arch.
85 */
86extern void plat_smp_setup(void);
87
88/*
89 * Called in smp_prepare_cpus.
90 */
91extern void plat_prepare_cpus(unsigned int max_cpus);
92
93/*
94 * Last chance for the board code to finish SMP initialization before
95 * the CPU is "online".
96 */
97extern void prom_smp_finish(void);
98
99/* Hook for after all CPUs are online */
100extern void prom_cpus_done(void);
101
102extern void asmlinkage smp_bootstrap(void); 54extern void asmlinkage smp_bootstrap(void);
103 55
104/* 56/*
@@ -108,11 +60,11 @@ extern void asmlinkage smp_bootstrap(void);
108 */ 60 */
109static inline void smp_send_reschedule(int cpu) 61static inline void smp_send_reschedule(int cpu)
110{ 62{
111 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);
112} 66}
113 67
114extern asmlinkage void smp_call_function_interrupt(void); 68extern asmlinkage void smp_call_function_interrupt(void);
115 69
116#endif /* CONFIG_SMP */
117
118#endif /* __ASM_SMP_H */ 70#endif /* __ASM_SMP_H */