diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/percpu.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 26fd9d12f050..e5000343dd61 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #ifdef CONFIG_SMP | 35 | #ifdef CONFIG_SMP |
36 | 36 | ||
37 | #ifdef CONFIG_HAVE_DYNAMIC_PER_CPU_AREA | 37 | #ifndef CONFIG_HAVE_LEGACY_PER_CPU_AREA |
38 | 38 | ||
39 | /* minimum unit size, also is the maximum supported allocation size */ | 39 | /* minimum unit size, also is the maximum supported allocation size */ |
40 | #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10) | 40 | #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10) |
@@ -80,7 +80,7 @@ extern ssize_t __init pcpu_embed_first_chunk( | |||
80 | 80 | ||
81 | extern void *__alloc_reserved_percpu(size_t size, size_t align); | 81 | extern void *__alloc_reserved_percpu(size_t size, size_t align); |
82 | 82 | ||
83 | #else /* CONFIG_HAVE_DYNAMIC_PER_CPU_AREA */ | 83 | #else /* CONFIG_HAVE_LEGACY_PER_CPU_AREA */ |
84 | 84 | ||
85 | struct percpu_data { | 85 | struct percpu_data { |
86 | void *ptrs[1]; | 86 | void *ptrs[1]; |
@@ -99,11 +99,15 @@ struct percpu_data { | |||
99 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ | 99 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ |
100 | }) | 100 | }) |
101 | 101 | ||
102 | #endif /* CONFIG_HAVE_DYNAMIC_PER_CPU_AREA */ | 102 | #endif /* CONFIG_HAVE_LEGACY_PER_CPU_AREA */ |
103 | 103 | ||
104 | extern void *__alloc_percpu(size_t size, size_t align); | 104 | extern void *__alloc_percpu(size_t size, size_t align); |
105 | extern void free_percpu(void *__pdata); | 105 | extern void free_percpu(void *__pdata); |
106 | 106 | ||
107 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | ||
108 | extern void __init setup_per_cpu_areas(void); | ||
109 | #endif | ||
110 | |||
107 | #else /* CONFIG_SMP */ | 111 | #else /* CONFIG_SMP */ |
108 | 112 | ||
109 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 113 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
@@ -124,6 +128,8 @@ static inline void free_percpu(void *p) | |||
124 | kfree(p); | 128 | kfree(p); |
125 | } | 129 | } |
126 | 130 | ||
131 | static inline void __init setup_per_cpu_areas(void) { } | ||
132 | |||
127 | #endif /* CONFIG_SMP */ | 133 | #endif /* CONFIG_SMP */ |
128 | 134 | ||
129 | #define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \ | 135 | #define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \ |