|
@@ -11,9 +11,16 @@
|
|
|
|
|
|
/* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
|
|
|
#ifndef PERCPU_ENOUGH_ROOM
|
|
|
-#define PERCPU_ENOUGH_ROOM 32768
|
|
|
+#ifdef CONFIG_MODULES
|
|
|
+#define PERCPU_MODULE_RESERVE 8192
|
|
|
+#else
|
|
|
+#define PERCPU_MODULE_RESERVE 0
|
|
|
#endif
|
|
|
|
|
|
+#define PERCPU_ENOUGH_ROOM \
|
|
|
+ (__per_cpu_end - __per_cpu_start + PERCPU_MODULE_RESERVE)
|
|
|
+#endif /* PERCPU_ENOUGH_ROOM */
|
|
|
+
|
|
|
/*
|
|
|
* Must be an lvalue. Since @var must be a simple identifier,
|
|
|
* we force a syntax error here if it isn't.
|