s390/bpf: Fix skb_copy_bits() parameter passing
[linux/fpc-iii.git] / arch / ia64 / include / asm / percpu.h
blob0ec484d2dcbcad7c175b2510871b10c63644108a
1 #ifndef _ASM_IA64_PERCPU_H
2 #define _ASM_IA64_PERCPU_H
4 /*
5 * Copyright (C) 2002-2003 Hewlett-Packard Co
6 * David Mosberger-Tang <davidm@hpl.hp.com>
7 */
9 #define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE
11 #ifdef __ASSEMBLY__
12 # define THIS_CPU(var) (var) /* use this to mark accesses to per-CPU variables... */
13 #else /* !__ASSEMBLY__ */
16 #include <linux/threads.h>
18 #ifdef CONFIG_SMP
20 #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
21 # define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__)))
22 #endif
24 #define __my_cpu_offset __ia64_per_cpu_var(local_per_cpu_offset)
26 extern void *per_cpu_init(void);
28 #else /* ! SMP */
30 #define per_cpu_init() (__phys_per_cpu_start)
32 #endif /* SMP */
34 #define PER_CPU_BASE_SECTION ".data..percpu"
37 * Be extremely careful when taking the address of this variable! Due to virtual
38 * remapping, it is different from the canonical address returned by this_cpu_ptr(&var)!
39 * On the positive side, using __ia64_per_cpu_var() instead of this_cpu_ptr() is slightly
40 * more efficient.
42 #define __ia64_per_cpu_var(var) (*({ \
43 __verify_pcpu_ptr(&(var)); \
44 ((typeof(var) __kernel __force *)&(var)); \
45 }))
47 #include <asm-generic/percpu.h>
49 /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
50 DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
52 #endif /* !__ASSEMBLY__ */
54 #endif /* _ASM_IA64_PERCPU_H */