1 #ifndef __LINUX_SMP_H
2 #define __LINUX_SMP_H
3
4
5
6
7
8
9 #ifdef __SMP__
10 #include <asm/smp.h>
11
12 extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
13 extern void smp_boot_cpus(void);
14 extern void smp_callin(void);
15 extern void smp_commence(void);
16 extern int smp_num_cpus;
17 extern int smp_threads_ready;
18 #ifdef __SMP_PROF__
19 extern volatile unsigned long smp_spins[NR_CPUS];
20 extern volatile unsigned long smp_spins_sys_idle[];
21 extern volatile unsigned long smp_spins_syscall[];
22 extern volatile unsigned long smp_spins_syscall_cur[];
23
24 extern volatile unsigned long smp_idle_count[1+NR_CPUS];
25 extern volatile unsigned long smp_idle_map;
26 #else
27 extern volatile unsigned long smp_spins;
28 #endif
29
30
31 extern volatile unsigned long smp_msg_data;
32 extern volatile int smp_src_cpu;
33 extern volatile int smp_msg_id;
34
35 #define MSG_ALL_BUT_SELF 0x8000
36 #define MSG_ALL 0x8001
37
38 #define MSG_INVALIDATE_TLB 0x0001
39 #define MSG_STOP_CPU 0x0002
40 #define MSG_RESCHEDULE 0x0003
41
42 #else
43
44
45
46
47
48 #define smp_num_cpus 1
49 #define smp_processor_id() 0
50 #define smp_message_pass(t,m,d,w)
51 #define smp_threads_ready 1
52 #define kernel_lock()
53 #endif
54 #endif