1 #ifndef __ASM_SMP_H
2 #define __ASM_SMP_H
3
4 #include <linux/config.h>
5 #include <asm/pal.h>
6
7 /* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */
8
9 static __inline__ unsigned char
10 __hard_smp_processor_id(void)
11 {
12 register unsigned char __r0 __asm__("$0");
13 __asm__ __volatile__(
14 "call_pal %1 #whami"
15 : "=r"(__r0)
16 :"i" (PAL_whami)
17 : "$1", "$22", "$23", "$24", "$25");
18 return __r0;
19 }
20
21 #ifdef CONFIG_SMP
22
23 #include <linux/threads.h>
24 #include <asm/irq.h>
25
26 struct cpuinfo_alpha {
27 unsigned long loops_per_jiffy;
28 unsigned long last_asn;
29 int need_new_asn;
30 int asn_lock;
31 unsigned long *pgd_cache;
32 unsigned long *pte_cache;
33 unsigned long pgtable_cache_sz;
34 unsigned long ipi_count;
35 unsigned long irq_attempt[NR_IRQS];
36 unsigned long prof_multiplier;
37 unsigned long prof_counter;
38 unsigned char mcheck_expected;
39 unsigned char mcheck_taken;
40 unsigned char mcheck_extra;
41 } __attribute__((aligned(64)));
42
43 extern struct cpuinfo_alpha cpu_data[NR_CPUS];
44
45 #define PROC_CHANGE_PENALTY 20
46
47 /* Map from cpu id to sequential logical cpu number. This will only
48 not be idempotent when cpus failed to come on-line. */
49 extern int __cpu_number_map[NR_CPUS];
50 #define cpu_number_map(cpu) __cpu_number_map[cpu]
51
52 /* The reverse map from sequential logical cpu number to cpu id. */
53 extern int __cpu_logical_map[NR_CPUS];
54 #define cpu_logical_map(cpu) __cpu_logical_map[cpu]
55
56 #define hard_smp_processor_id() __hard_smp_processor_id()
57 #define smp_processor_id() (current->processor)
58
59 extern unsigned long cpu_present_mask;
60
61 #endif /* CONFIG_SMP */
62
63 #define NO_PROC_ID (-1)
64
65 #endif
66
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.