aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/percpu-defs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-06-17 19:12:39 -0400
committerTejun Heo <tj@kernel.org>2014-06-17 19:12:39 -0400
commit9c28278a24c01c0073fb89e53c1d2a605ab9587d (patch)
treee180627880bd5eaa5e1e8965abe583d0ee5ca989 /include/linux/percpu-defs.h
parenta32f8d8eda8bd49017ac5f88e2b859f1f582557f (diff)
percpu: reorder macros in percpu header files
* In include/asm-generic/percpu.h, collect {raw|_this}_cpu_generic*() macros into one place. They were dispersed through {raw|this}_cpu_*_N() definitions and the visiual inconsistency was making following the code unnecessarily difficult. * In include/linux/percpu-defs.h, move __verify_pcpu_ptr() later in the file so that it's right above accessor definitions where it's actually used. This is pure reorganization. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Christoph Lameter <cl@linux.com>
Diffstat (limited to 'include/linux/percpu-defs.h')
-rw-r--r--include/linux/percpu-defs.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index 6710eb9555fa..fd0b9ee19ec8 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -53,19 +53,6 @@
53 __attribute__((section(".discard"), unused)) 53 __attribute__((section(".discard"), unused))
54 54
55/* 55/*
56 * Macro which verifies @ptr is a percpu pointer without evaluating
57 * @ptr. This is to be used in percpu accessors to verify that the
58 * input parameter is a percpu pointer.
59 *
60 * + 0 is required in order to convert the pointer type from a
61 * potential array type to a pointer to a single item of the array.
62 */
63#define __verify_pcpu_ptr(ptr) do { \
64 const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
65 (void)__vpp_verify; \
66} while (0)
67
68/*
69 * s390 and alpha modules require percpu variables to be defined as 56 * s390 and alpha modules require percpu variables to be defined as
70 * weak to force the compiler to generate GOT based external 57 * weak to force the compiler to generate GOT based external
71 * references for them. This is necessary because percpu sections 58 * references for them. This is necessary because percpu sections
@@ -203,6 +190,19 @@
203 */ 190 */
204#ifndef __ASSEMBLY__ 191#ifndef __ASSEMBLY__
205 192
193/*
194 * Macro which verifies @ptr is a percpu pointer without evaluating
195 * @ptr. This is to be used in percpu accessors to verify that the
196 * input parameter is a percpu pointer.
197 *
198 * + 0 is required in order to convert the pointer type from a
199 * potential array type to a pointer to a single item of the array.
200 */
201#define __verify_pcpu_ptr(ptr) do { \
202 const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
203 (void)__vpp_verify; \
204} while (0)
205
206#ifdef CONFIG_SMP 206#ifdef CONFIG_SMP
207 207
208/* 208/*