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