1
2 #ifndef _ASM_IA64_PERCPU_H
3 #define _ASM_IA64_PERCPU_H
4
5
6
7
8
9
10 #ifdef __ASSEMBLY__
11 # define THIS_CPU(var) (var)
12 #else
13
14
15 #include <linux/threads.h>
16
17 #ifdef CONFIG_SMP
18
19 #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
20 # define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__)))
21 #endif
22
23 #define __my_cpu_offset __ia64_per_cpu_var(local_per_cpu_offset)
24
25 extern void *per_cpu_init(void);
26
27 #else
28
29 #define per_cpu_init() (__phys_per_cpu_start)
30
31 #endif
32
33 #define PER_CPU_BASE_SECTION ".data..percpu"
34
35
36
37
38
39
40
41 #define __ia64_per_cpu_var(var) (*({ \
42 __verify_pcpu_ptr(&(var)); \
43 ((typeof(var) __kernel __force *)&(var)); \
44 }))
45
46 #include <asm-generic/percpu.h>
47
48
49 DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
50
51 #endif
52
53 #endif