aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-02-26 10:54:17 +0900
committerTejun Heo <tj@kernel.org>2009-02-26 10:54:17 +0900
commite317603694bfd17b28a40de9d65e1a4ec12f816e (patch)
treeae286d9e1ae9ffacdd325ea76cd1d9ee88032efc /include
parentd2b0261506602bd969164879206027b30358ffdf (diff)
percpu: fix too low alignment restriction on UP
UP __alloc_percpu() triggered WARN_ON_ONCE() if the requested alignment is larger than that of unsigned long long, which is too small for all the cacheline aligned allocations. Bump it up to SMP_CACHE_BYTES which kmalloc allocations generally guarantee. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/percpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index d8e5a9abbce..545b068bcb7 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -156,7 +156,7 @@ static inline void *__alloc_percpu(size_t size, size_t align)
* on it. Larger alignment should only be used for module
* percpu sections on SMP for which this path isn't used.
*/
- WARN_ON_ONCE(align > __alignof__(unsigned long long));
+ WARN_ON_ONCE(align > SMP_CACHE_BYTES);
return kzalloc(size, GFP_KERNEL);
}