diff options
Diffstat (limited to 'include/linux/percpu.h')
-rw-r--r-- | include/linux/percpu.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 6f61b61b7996..a3aa63e47637 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -48,9 +48,9 @@ | |||
48 | * intelligent way to determine this would be nice. | 48 | * intelligent way to determine this would be nice. |
49 | */ | 49 | */ |
50 | #if BITS_PER_LONG > 32 | 50 | #if BITS_PER_LONG > 32 |
51 | #define PERCPU_DYNAMIC_RESERVE (20 << 10) | 51 | #define PERCPU_DYNAMIC_RESERVE (28 << 10) |
52 | #else | 52 | #else |
53 | #define PERCPU_DYNAMIC_RESERVE (12 << 10) | 53 | #define PERCPU_DYNAMIC_RESERVE (20 << 10) |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | extern void *pcpu_base_addr; | 56 | extern void *pcpu_base_addr; |
@@ -122,11 +122,16 @@ extern void __init setup_per_cpu_areas(void); | |||
122 | #endif | 122 | #endif |
123 | extern void __init percpu_init_late(void); | 123 | extern void __init percpu_init_late(void); |
124 | 124 | ||
125 | extern void __percpu *__alloc_percpu_gfp(size_t size, size_t align, gfp_t gfp); | ||
125 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | 126 | extern void __percpu *__alloc_percpu(size_t size, size_t align); |
126 | extern void free_percpu(void __percpu *__pdata); | 127 | extern void free_percpu(void __percpu *__pdata); |
127 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | 128 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); |
128 | 129 | ||
129 | #define alloc_percpu(type) \ | 130 | #define alloc_percpu_gfp(type, gfp) \ |
130 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) | 131 | (typeof(type) __percpu *)__alloc_percpu_gfp(sizeof(type), \ |
132 | __alignof__(type), gfp) | ||
133 | #define alloc_percpu(type) \ | ||
134 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), \ | ||
135 | __alignof__(type)) | ||
131 | 136 | ||
132 | #endif /* __LINUX_PERCPU_H */ | 137 | #endif /* __LINUX_PERCPU_H */ |