1 /* smp.h: PPC specific SMP stuff.
3 * Original was a copy of sparc smp.h. Now heavily modified
6 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
7 * Copyright (C) 1996-2001 Cort Dougan <cort@fsmlabs.com>
13 #include <linux/config.h>
14 #include <linux/kernel.h>
15 #include <linux/bitops.h>
16 #include <linux/errno.h>
17 #include <linux/cpumask.h>
18 #include <linux/threads.h>
25 unsigned long loops_per_jiffy
;
27 unsigned long *pgd_cache
;
28 unsigned long *pte_cache
;
29 unsigned long pgtable_cache_sz
;
32 extern struct cpuinfo_PPC cpu_data
[];
33 extern cpumask_t cpu_online_map
;
34 extern cpumask_t cpu_possible_map
;
35 extern unsigned long smp_proc_in_lock
[];
36 extern volatile unsigned long cpu_callin_map
[];
37 extern int smp_tb_synchronized
;
39 extern void smp_send_tlb_invalidate(int);
40 extern void smp_send_xmon_break(int cpu
);
42 extern void smp_message_recv(int, struct pt_regs
*);
43 extern void smp_local_timer_interrupt(struct pt_regs
*);
45 #define NO_PROC_ID 0xFF /* No processor magic marker */
46 #define PROC_CHANGE_PENALTY 20
48 #define smp_processor_id() (current_thread_info()->cpu)
50 extern int __cpu_up(unsigned int cpu
);
52 extern int smp_hw_index
[];
53 #define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
55 struct klock_info_struct
{
56 unsigned long kernel_flag
;
60 extern struct klock_info_struct klock_info
;
61 #define KLOCK_HELD 0xffffffff
62 #define KLOCK_CLEAR 0x0
64 #endif /* __ASSEMBLY__ */
66 #else /* !(CONFIG_SMP) */
68 #endif /* !(CONFIG_SMP) */
70 #endif /* !(_PPC_SMP_H) */
71 #endif /* __KERNEL__ */