Import 2.3.13pre6
[davej-history.git] / include / asm-ppc / smp.h
blob9186b39e5e8bbd2503027ad6017e2e37978170cc
1 /* smp.h: PPC specific SMP stuff.
3 * Taken from asm-sparc/smp.h
4 */
6 #ifndef _PPC_SMP_H
7 #define _PPC_SMP_H
9 #include <linux/kernel.h>
10 #include <linux/tasks.h>
12 #ifdef __SMP__
14 #ifndef __ASSEMBLY__
16 struct cpuinfo_PPC {
17 unsigned long loops_per_sec;
18 unsigned long pvr;
19 unsigned long *pgd_cache;
20 unsigned long *pte_cache;
21 unsigned long pgtable_cache_sz;
23 extern struct cpuinfo_PPC cpu_data[NR_CPUS];
25 extern int first_cpu_booted;
26 extern unsigned long smp_proc_in_lock[NR_CPUS];
28 extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
29 extern void smp_store_cpu_info(int id);
30 extern void smp_message_recv(void);
32 #define NO_PROC_ID 0xFF /* No processor magic marker */
33 #define PROC_CHANGE_PENALTY 20
35 /* 1 to 1 mapping on PPC -- Cort */
36 #define cpu_logical_map(cpu) (cpu)
37 extern int cpu_number_map[NR_CPUS];
38 extern volatile unsigned long cpu_callin_map[NR_CPUS];
40 #define hard_smp_processor_id() (0)
41 #define smp_processor_id() (current->processor)
43 struct klock_info_struct {
44 unsigned long kernel_flag;
45 unsigned char akp;
48 extern struct klock_info_struct klock_info;
49 #define KLOCK_HELD 0xffffffff
50 #define KLOCK_CLEAR 0x0
52 #endif /* __ASSEMBLY__ */
54 #else /* !(__SMP__) */
56 #endif /* !(__SMP__) */
58 #endif /* !(_PPC_SMP_H) */