Linux-2.3.3 and a short hiatus..
[davej-history.git] / include / asm-alpha / smp.h
blobd53142bb11fd78b0efe2c82112c550583f22da35
1 #ifndef __ASM_SMP_H
2 #define __ASM_SMP_H
4 #ifdef __SMP__
6 #include <linux/tasks.h>
7 #include <asm/init.h>
8 #include <asm/pal.h>
10 struct cpuinfo_alpha {
11 unsigned long loops_per_sec;
12 unsigned long *pgd_cache;
13 unsigned long *pte_cache;
14 unsigned long pgtable_cache_sz;
15 unsigned long ipi_count;
16 unsigned long prof_multiplier;
17 unsigned long prof_counter;
18 } __cacheline_aligned;
20 extern struct cpuinfo_alpha cpu_data[NR_CPUS];
22 #define PROC_CHANGE_PENALTY 20
24 /* Map from cpu id to sequential logical cpu number. This will only
25 not be idempotent when cpus failed to come on-line. */
26 extern int cpu_number_map[NR_CPUS];
28 /* The reverse map from sequential logical cpu number to cpu id. */
29 extern int __cpu_logical_map[NR_CPUS];
30 #define cpu_logical_map(cpu) __cpu_logical_map[cpu]
32 /* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */
34 static __inline__ unsigned char hard_smp_processor_id(void)
36 register unsigned char __r0 __asm__("$0");
37 __asm__ __volatile__(
38 "call_pal %1 #whami"
39 : "=r"(__r0)
40 :"i" (PAL_whami)
41 : "$1", "$22", "$23", "$24", "$25");
42 return __r0;
45 #define smp_processor_id() (current->processor)
47 #endif /* __SMP__ */
49 #define NO_PROC_ID (-1)
51 #endif