- Stephen Rothwell: APM updates
[davej-history.git] / include / asm-mips64 / smp.h
blobb8a8f8d754a99f0a844669a4e8742897bb3c3f57
1 #ifndef __ASM_SMP_H
2 #define __ASM_SMP_H
4 #include <linux/config.h>
6 #ifdef CONFIG_SMP
8 #include <linux/threads.h>
9 #include <linux/irq.h>
11 #if 0
12 struct cpuinfo_mips { /* XXX */
13 unsigned long loops_per_sec;
14 unsigned long last_asn;
15 unsigned long *pgd_cache;
16 unsigned long *pte_cache;
17 unsigned long pgtable_cache_sz;
18 unsigned long ipi_count;
19 unsigned long irq_attempt[NR_IRQS];
20 unsigned long smp_local_irq_count;
21 unsigned long prof_multiplier;
22 unsigned long prof_counter;
23 } __attribute__((aligned(64)));
25 extern struct cpuinfo_mips cpu_data[NR_CPUS];
26 #endif
28 #define smp_processor_id() (current->processor)
30 #define PROC_CHANGE_PENALTY 20
32 /* Map from cpu id to sequential logical cpu number. This will only
33 not be idempotent when cpus failed to come on-line. */
34 extern int __cpu_number_map[NR_CPUS];
35 #define cpu_number_map(cpu) __cpu_number_map[cpu]
37 /* The reverse map from sequential logical cpu number to cpu id. */
38 extern int __cpu_logical_map[NR_CPUS];
39 #define cpu_logical_map(cpu) __cpu_logical_map[cpu]
41 /* Good enough for toy^Wupto 64 CPU Origins. */
42 extern unsigned long cpu_present_mask;
44 #endif
46 #define NO_PROC_ID (-1)
48 #endif __ASM_SMP_H