diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-02-20 02:29:08 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-02-20 02:29:08 -0500 |
commit | 313e458f81ec3852106c5a83830fe0d4f405a71a (patch) | |
tree | 682cd5b6d7dc4e0e9eccdcc7915820dd33c87a34 /include/linux/percpu.h | |
parent | b36128c830a8f5bd7d4981f5b0b69950f5928ee6 (diff) |
alloc_percpu: add align argument to __alloc_percpu.
This prepares for a real __alloc_percpu, by adding an alignment argument.
Only one place uses __alloc_percpu directly, and that's for a string.
tj: af_inet also uses __alloc_percpu(), update it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/percpu.h')
-rw-r--r-- | include/linux/percpu.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index c80cfe1260ec..1fdaee93c04d 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -108,9 +108,10 @@ static inline void percpu_free(void *__pdata) | |||
108 | 108 | ||
109 | /* (legacy) interface for use without CPU hotplug handling */ | 109 | /* (legacy) interface for use without CPU hotplug handling */ |
110 | 110 | ||
111 | #define __alloc_percpu(size) percpu_alloc_mask((size), GFP_KERNEL, \ | 111 | #define __alloc_percpu(size, align) percpu_alloc_mask((size), GFP_KERNEL, \ |
112 | cpu_possible_map) | 112 | cpu_possible_map) |
113 | #define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type)) | 113 | #define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \ |
114 | __alignof__(type)) | ||
114 | #define free_percpu(ptr) percpu_free((ptr)) | 115 | #define free_percpu(ptr) percpu_free((ptr)) |
115 | /* | 116 | /* |
116 | * Use this to get to a cpu's version of the per-cpu object dynamically | 117 | * Use this to get to a cpu's version of the per-cpu object dynamically |