diff options
Diffstat (limited to 'include/linux/percpu.h')
-rw-r--r-- | include/linux/percpu.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index fb8d2d24e4bb..20317d88deba 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -33,14 +33,14 @@ struct percpu_data { | |||
33 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ | 33 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ |
34 | }) | 34 | }) |
35 | 35 | ||
36 | extern void *__alloc_percpu(size_t size, size_t align); | 36 | extern void *__alloc_percpu(size_t size); |
37 | extern void free_percpu(const void *); | 37 | extern void free_percpu(const void *); |
38 | 38 | ||
39 | #else /* CONFIG_SMP */ | 39 | #else /* CONFIG_SMP */ |
40 | 40 | ||
41 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 41 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
42 | 42 | ||
43 | static inline void *__alloc_percpu(size_t size, size_t align) | 43 | static inline void *__alloc_percpu(size_t size) |
44 | { | 44 | { |
45 | void *ret = kmalloc(size, GFP_KERNEL); | 45 | void *ret = kmalloc(size, GFP_KERNEL); |
46 | if (ret) | 46 | if (ret) |
@@ -55,7 +55,6 @@ static inline void free_percpu(const void *ptr) | |||
55 | #endif /* CONFIG_SMP */ | 55 | #endif /* CONFIG_SMP */ |
56 | 56 | ||
57 | /* Simple wrapper for the common case: zeros memory. */ | 57 | /* Simple wrapper for the common case: zeros memory. */ |
58 | #define alloc_percpu(type) \ | 58 | #define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type)))) |
59 | ((type *)(__alloc_percpu(sizeof(type), __alignof__(type)))) | ||
60 | 59 | ||
61 | #endif /* __LINUX_PERCPU_H */ | 60 | #endif /* __LINUX_PERCPU_H */ |