4 #include <linux/config.h>
7 /* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */
9 static __inline__ unsigned char
10 __hard_smp_processor_id(void)
12 register unsigned char __r0 __asm__("$0");
17 : "$1", "$22", "$23", "$24", "$25");
23 #include <linux/threads.h>
26 struct cpuinfo_alpha {
27 unsigned long loops_per_jiffy;
28 unsigned long last_asn;
31 unsigned long *pgd_cache;
32 unsigned long *pmd_cache;
33 unsigned long *pte_cache;
34 unsigned long pgtable_cache_sz;
35 unsigned long ipi_count;
36 unsigned long irq_attempt[NR_IRQS];
37 unsigned long prof_multiplier;
38 unsigned long prof_counter;
39 unsigned char mcheck_expected;
40 unsigned char mcheck_taken;
41 unsigned char mcheck_extra;
42 } __attribute__((aligned(64)));
44 extern struct cpuinfo_alpha cpu_data[NR_CPUS];
46 #define PROC_CHANGE_PENALTY 20
48 /* Map from cpu id to sequential logical cpu number. This will only
49 not be idempotent when cpus failed to come on-line. */
50 extern int __cpu_number_map[NR_CPUS];
51 #define cpu_number_map(cpu) __cpu_number_map[cpu]
53 /* The reverse map from sequential logical cpu number to cpu id. */
54 extern int __cpu_logical_map[NR_CPUS];
55 #define cpu_logical_map(cpu) __cpu_logical_map[cpu]
57 #define hard_smp_processor_id() __hard_smp_processor_id()
58 #define smp_processor_id() (current->processor)
60 extern unsigned long cpu_present_mask;
61 #define cpu_online_map cpu_present_mask
63 extern int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, unsigned long cpu);
65 #else /* CONFIG_SMP */
67 #define smp_call_function_on_cpu(func,info,retry,wait,cpu) ({ 0; })
69 #endif /* CONFIG_SMP */
71 #define NO_PROC_ID (-1)