proc: revert /proc/<pid>/maps [stack:TID] annotation
[firefly-linux-kernel-4.4.55.git] / include / linux / percpu.h
index 6f61b61b7996a8f248af9eb64139a5f9bfc52c7c..caebf2a758dc0e573d7e5dc76b916dc7cb639ea3 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/preempt.h>
 #include <linux/smp.h>
 #include <linux/cpumask.h>
+#include <linux/printk.h>
 #include <linux/pfn.h>
 #include <linux/init.h>
 
@@ -48,9 +49,9 @@
  * intelligent way to determine this would be nice.
  */
 #if BITS_PER_LONG > 32
-#define PERCPU_DYNAMIC_RESERVE         (20 << 10)
+#define PERCPU_DYNAMIC_RESERVE         (28 << 10)
 #else
-#define PERCPU_DYNAMIC_RESERVE         (12 << 10)
+#define PERCPU_DYNAMIC_RESERVE         (20 << 10)
 #endif
 
 extern void *pcpu_base_addr;
@@ -122,11 +123,19 @@ extern void __init setup_per_cpu_areas(void);
 #endif
 extern void __init percpu_init_late(void);
 
+extern void __percpu *__alloc_percpu_gfp(size_t size, size_t align, gfp_t gfp);
 extern void __percpu *__alloc_percpu(size_t size, size_t align);
 extern void free_percpu(void __percpu *__pdata);
 extern phys_addr_t per_cpu_ptr_to_phys(void *addr);
 
-#define alloc_percpu(type)     \
-       (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type))
+#define alloc_percpu_gfp(type, gfp)                                    \
+       (typeof(type) __percpu *)__alloc_percpu_gfp(sizeof(type),       \
+                                               __alignof__(type), gfp)
+#define alloc_percpu(type)                                             \
+       (typeof(type) __percpu *)__alloc_percpu(sizeof(type),           \
+                                               __alignof__(type))
+
+/* To avoid include hell, as printk can not declare this, we declare it here */
+DECLARE_PER_CPU(printk_func_t, printk_func);
 
 #endif /* __LINUX_PERCPU_H */