diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-10-29 09:34:15 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-10-29 09:34:15 -0400 |
commit | e0fdb0e050eae331046385643618f12452aa7e73 (patch) | |
tree | 6156f577879764fd75cf8c46ca7980433de0e59d /include/asm-generic | |
parent | f7b64fe806029e0a0454df132eec3c5ab576102c (diff) |
percpu: add __percpu for sparse.
We have to make __kernel "__attribute__((address_space(0)))" so we can
cast to it.
tj: * put_cpu_var() update.
* Annotations added to dynamic allocator interface.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/percpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index ca6f0491412b..fded453fd25c 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -41,7 +41,9 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
41 | * Only S390 provides its own means of moving the pointer. | 41 | * Only S390 provides its own means of moving the pointer. |
42 | */ | 42 | */ |
43 | #ifndef SHIFT_PERCPU_PTR | 43 | #ifndef SHIFT_PERCPU_PTR |
44 | #define SHIFT_PERCPU_PTR(__p, __offset) RELOC_HIDE((__p), (__offset)) | 44 | /* Weird cast keeps both GCC and sparse happy. */ |
45 | #define SHIFT_PERCPU_PTR(__p, __offset) \ | ||
46 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)) | ||
45 | #endif | 47 | #endif |
46 | 48 | ||
47 | /* | 49 | /* |