Commit 5a089006 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Mirror x86_64's PERCPU_ENOUGH_ROOM definition.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9bc83dcf
...@@ -1447,11 +1447,8 @@ void __init setup_per_cpu_areas(void) ...@@ -1447,11 +1447,8 @@ void __init setup_per_cpu_areas(void)
char *ptr; char *ptr;
/* Copy section for each CPU (we discard the original) */ /* Copy section for each CPU (we discard the original) */
goal = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); goal = PERCPU_ENOUGH_ROOM;
#ifdef CONFIG_MODULES
if (goal < PERCPU_ENOUGH_ROOM)
goal = PERCPU_ENOUGH_ROOM;
#endif
__per_cpu_shift = 0; __per_cpu_shift = 0;
for (size = 1UL; size < goal; size <<= 1UL) for (size = 1UL; size < goal; size <<= 1UL)
__per_cpu_shift++; __per_cpu_shift++;
......
...@@ -5,6 +5,16 @@ ...@@ -5,6 +5,16 @@
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#ifdef CONFIG_MODULES
# define PERCPU_MODULE_RESERVE 8192
#else
# define PERCPU_MODULE_RESERVE 0
#endif
#define PERCPU_ENOUGH_ROOM \
(ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
PERCPU_MODULE_RESERVE)
extern void setup_per_cpu_areas(void); extern void setup_per_cpu_areas(void);
extern unsigned long __per_cpu_base; extern unsigned long __per_cpu_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment