diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 10:34:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 10:34:18 -0500 |
commit | 0a135ba14d71fb84c691a5386aff5049691fe6d7 (patch) | |
tree | adb1de887dd6839d69d2fc16ffa2a10ff63298fa /include/asm-generic/local.h | |
parent | 4850f524b2c4c8a4e9f8ef4dd9c7c4afde2f2b2c (diff) | |
parent | a29d8b8e2d811a24bbe49215a0f0c536b72ebc18 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: add __percpu sparse annotations to what's left
percpu: add __percpu sparse annotations to fs
percpu: add __percpu sparse annotations to core kernel subsystems
local_t: Remove leftover local.h
this_cpu: Remove pageset_notifier
this_cpu: Page allocator conversion
percpu, x86: Generic inc / dec percpu instructions
local_t: Move local.h include to ringbuffer.c and ring_buffer_benchmark.c
module: Use this_cpu_xx to dynamically allocate counters
local_t: Remove cpu_local_xx macros
percpu: refactor the code in pcpu_[de]populate_chunk()
percpu: remove compile warnings caused by __verify_pcpu_ptr()
percpu: make accessors check for percpu pointer in sparse
percpu: add __percpu for sparse.
percpu: make access macros universal
percpu: remove per_cpu__ prefix.
Diffstat (limited to 'include/asm-generic/local.h')
-rw-r--r-- | include/asm-generic/local.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index fc218444e315..c8a5d68541d7 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
@@ -52,23 +52,4 @@ typedef struct | |||
52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) | 52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) |
53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) | 53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) |
54 | 54 | ||
55 | /* Use these for per-cpu local_t variables: on some archs they are | ||
56 | * much more efficient than these naive implementations. Note they take | ||
57 | * a variable (eg. mystruct.foo), not an address. | ||
58 | */ | ||
59 | #define cpu_local_read(l) local_read(&__get_cpu_var(l)) | ||
60 | #define cpu_local_set(l, i) local_set(&__get_cpu_var(l), (i)) | ||
61 | #define cpu_local_inc(l) local_inc(&__get_cpu_var(l)) | ||
62 | #define cpu_local_dec(l) local_dec(&__get_cpu_var(l)) | ||
63 | #define cpu_local_add(i, l) local_add((i), &__get_cpu_var(l)) | ||
64 | #define cpu_local_sub(i, l) local_sub((i), &__get_cpu_var(l)) | ||
65 | |||
66 | /* Non-atomic increments, ie. preemption disabled and won't be touched | ||
67 | * in interrupt, etc. Some archs can optimize this case well. | ||
68 | */ | ||
69 | #define __cpu_local_inc(l) __local_inc(&__get_cpu_var(l)) | ||
70 | #define __cpu_local_dec(l) __local_dec(&__get_cpu_var(l)) | ||
71 | #define __cpu_local_add(i, l) __local_add((i), &__get_cpu_var(l)) | ||
72 | #define __cpu_local_sub(i, l) __local_sub((i), &__get_cpu_var(l)) | ||
73 | |||
74 | #endif /* _ASM_GENERIC_LOCAL_H */ | 55 | #endif /* _ASM_GENERIC_LOCAL_H */ |