spi: efm32: Convert to use GPIO descriptors
[linux/fpc-iii.git] / arch / ia64 / include / asm / percpu.h
blobf357b9bb3576a109da86ef589dd76e9f262279f0
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_IA64_PERCPU_H
3 #define _ASM_IA64_PERCPU_H
5 /*
6 * Copyright (C) 2002-2003 Hewlett-Packard Co
7 * David Mosberger-Tang <davidm@hpl.hp.com>
8 */
10 #ifdef __ASSEMBLY__
11 # define THIS_CPU(var) (var) /* use this to mark accesses to per-CPU variables... */
12 #else /* !__ASSEMBLY__ */
15 #include <linux/threads.h>
17 #ifdef CONFIG_SMP
19 #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
20 # define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__)))
21 #endif
23 #define __my_cpu_offset __ia64_per_cpu_var(local_per_cpu_offset)
25 extern void *per_cpu_init(void);
27 #else /* ! SMP */
29 #define per_cpu_init() (__phys_per_cpu_start)
31 #endif /* SMP */
33 #define PER_CPU_BASE_SECTION ".data..percpu"
36 * Be extremely careful when taking the address of this variable! Due to virtual
37 * remapping, it is different from the canonical address returned by this_cpu_ptr(&var)!
38 * On the positive side, using __ia64_per_cpu_var() instead of this_cpu_ptr() is slightly
39 * more efficient.
41 #define __ia64_per_cpu_var(var) (*({ \
42 __verify_pcpu_ptr(&(var)); \
43 ((typeof(var) __kernel __force *)&(var)); \
44 }))
46 #include <asm-generic/percpu.h>
48 /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
49 DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
51 #endif /* !__ASSEMBLY__ */
53 #endif /* _ASM_IA64_PERCPU_H */