X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Flinux%2Fpercpu.h;h=926adaae0f9610885d5d64e341410a9b96900312;hb=a8dcf12f9e8ba113251c04d602f1695d537fb142;hp=600e3d387ffc9b2f5445cc3f2c92e6512524a996;hpb=ba00003aa83a61b615542dd66f5af8fb4a7cee1d;p=mv-sheeva.git diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 600e3d387ff..926adaae0f9 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -1,7 +1,7 @@ #ifndef __LINUX_PERCPU_H #define __LINUX_PERCPU_H -#include /* For preempt_disable() */ +#include #include /* For kmalloc() */ #include #include /* For memset() */ @@ -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.