aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/percpu.h26
1 files changed, 2 insertions, 24 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index af47b9e10064..d7d50d7ee51e 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -1,13 +1,9 @@
1#ifndef _ASM_GENERIC_PERCPU_H_ 1#ifndef _ASM_GENERIC_PERCPU_H_
2#define _ASM_GENERIC_PERCPU_H_ 2#define _ASM_GENERIC_PERCPU_H_
3
3#include <linux/compiler.h> 4#include <linux/compiler.h>
4#include <linux/threads.h> 5#include <linux/threads.h>
5 6#include <linux/percpu-defs.h>
6/*
7 * Determine the real variable name from the name visible in the
8 * kernel sources.
9 */
10#define per_cpu_var(var) per_cpu__##var
11 7
12#ifdef CONFIG_SMP 8#ifdef CONFIG_SMP
13 9
@@ -101,22 +97,4 @@ extern void setup_per_cpu_areas(void);
101#define PER_CPU_ATTRIBUTES 97#define PER_CPU_ATTRIBUTES
102#endif 98#endif
103 99
104#define DECLARE_PER_CPU_SECTION(type, name, section) \
105 extern \
106 __attribute__((__section__(PER_CPU_BASE_SECTION section))) \
107 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
108
109#define DECLARE_PER_CPU(type, name) \
110 DECLARE_PER_CPU_SECTION(type, name, "")
111
112#define DECLARE_PER_CPU_SHARED_ALIGNED(type, name) \
113 DECLARE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \
114 ____cacheline_aligned_in_smp
115
116#define DECLARE_PER_CPU_PAGE_ALIGNED(type, name) \
117 DECLARE_PER_CPU_SECTION(type, name, ".page_aligned")
118
119#define DECLARE_PER_CPU_FIRST(type, name) \
120 DECLARE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION)
121
122#endif /* _ASM_GENERIC_PERCPU_H_ */ 100#endif /* _ASM_GENERIC_PERCPU_H_ */