diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-05 12:16:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-05 12:16:37 -0400 |
commit | 9e74e7c81a24aee66024fc477786bd1de84e293b (patch) | |
tree | 8f172b7e5a86fe6b51e46f1d219e9c0707beab60 /include/linux/percpu.h | |
parent | 4946d54cb55e86a156216fcfeed5568514b0830f (diff) | |
parent | d5e50daf92df8afcb701fd717b301985691e802f (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:
module: add stub for is_module_percpu_address
percpu, module: implement and use is_kernel/module_percpu_address()
module: encapsulate percpu handling better and record percpu_size
Diffstat (limited to 'include/linux/percpu.h')
-rw-r--r-- | include/linux/percpu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a93e5bfdccb8..11d5f834b54a 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -137,6 +137,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | 138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); |
139 | extern void free_percpu(void __percpu *__pdata); | 139 | extern void free_percpu(void __percpu *__pdata); |
140 | extern bool is_kernel_percpu_address(unsigned long addr); | ||
140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | 141 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); |
141 | 142 | ||
142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 143 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
@@ -163,6 +164,12 @@ static inline void free_percpu(void __percpu *p) | |||
163 | kfree(p); | 164 | kfree(p); |
164 | } | 165 | } |
165 | 166 | ||
167 | /* can't distinguish from other static vars, always false */ | ||
168 | static inline bool is_kernel_percpu_address(unsigned long addr) | ||
169 | { | ||
170 | return false; | ||
171 | } | ||
172 | |||
166 | static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) | 173 | static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) |
167 | { | 174 | { |
168 | return __pa(addr); | 175 | return __pa(addr); |