File: /usr/src/linux/include/asm-mips/smp.h

1     #ifndef __ASM_MIPS_SMP_H
2     #define __ASM_MIPS_SMP_H
3     
4     #include <linux/config.h>
5     
6     #ifdef CONFIG_SMP
7     
8     #include <asm/spinlock.h>
9     #include <asm/atomic.h>
10     #include <asm/current.h>
11     
12     
13     /* Mappings are straight across.  If we want
14        to add support for disabling cpus and such,
15        we'll have to do what the mips64 port does here */
16     #define cpu_logical_map(cpu)	(cpu)
17     #define cpu_number_map(cpu)     (cpu)
18     
19     #define smp_processor_id()  (current->processor)
20     
21     
22     /* I've no idea what the real meaning of this is */
23     #define PROC_CHANGE_PENALTY	20
24     
25     #define NO_PROC_ID	(-1)
26     
27     struct smp_fn_call_struct {
28     	spinlock_t lock;
29     	atomic_t   finished;
30     	void (*fn)(void *);
31     	void *data;
32     };
33     
34     extern struct smp_fn_call_struct smp_fn_call;
35     
36     #endif /* CONFIG_SMP */
37     #endif /* __ASM_MIPS_SMP_H */
38