diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/percpu.h | 14 | ||||
-rw-r--r-- | include/asm-sparc64/percpu.h | 10 | ||||
-rw-r--r-- | include/asm-x86_64/percpu.h | 10 | ||||
-rw-r--r-- | include/linux/percpu.h | 9 |
4 files changed, 8 insertions, 35 deletions
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h index 651ebb141b24..48348fe34c19 100644 --- a/include/asm-alpha/percpu.h +++ b/include/asm-alpha/percpu.h | |||
@@ -1,20 +1,6 @@ | |||
1 | #ifndef __ALPHA_PERCPU_H | 1 | #ifndef __ALPHA_PERCPU_H |
2 | #define __ALPHA_PERCPU_H | 2 | #define __ALPHA_PERCPU_H |
3 | 3 | ||
4 | /* | ||
5 | * Increase the per cpu area for Alpha so that | ||
6 | * modules using percpu area can load. | ||
7 | */ | ||
8 | #ifdef CONFIG_MODULES | ||
9 | # define PERCPU_MODULE_RESERVE 8192 | ||
10 | #else | ||
11 | # define PERCPU_MODULE_RESERVE 0 | ||
12 | #endif | ||
13 | |||
14 | #define PERCPU_ENOUGH_ROOM \ | ||
15 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ | ||
16 | PERCPU_MODULE_RESERVE) | ||
17 | |||
18 | #include <asm-generic/percpu.h> | 4 | #include <asm-generic/percpu.h> |
19 | 5 | ||
20 | #endif /* __ALPHA_PERCPU_H */ | 6 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h index 0d3df76aa47f..ced8cbde046d 100644 --- a/include/asm-sparc64/percpu.h +++ b/include/asm-sparc64/percpu.h | |||
@@ -5,16 +5,6 @@ | |||
5 | 5 | ||
6 | #ifdef CONFIG_SMP | 6 | #ifdef CONFIG_SMP |
7 | 7 | ||
8 | #ifdef CONFIG_MODULES | ||
9 | # define PERCPU_MODULE_RESERVE 8192 | ||
10 | #else | ||
11 | # define PERCPU_MODULE_RESERVE 0 | ||
12 | #endif | ||
13 | |||
14 | #define PERCPU_ENOUGH_ROOM \ | ||
15 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ | ||
16 | PERCPU_MODULE_RESERVE) | ||
17 | |||
18 | extern void setup_per_cpu_areas(void); | 8 | extern void setup_per_cpu_areas(void); |
19 | 9 | ||
20 | extern unsigned long __per_cpu_base; | 10 | extern unsigned long __per_cpu_base; |
diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h index 5ed0ef340842..c6fbb67eac90 100644 --- a/include/asm-x86_64/percpu.h +++ b/include/asm-x86_64/percpu.h | |||
@@ -11,16 +11,6 @@ | |||
11 | 11 | ||
12 | #include <asm/pda.h> | 12 | #include <asm/pda.h> |
13 | 13 | ||
14 | #ifdef CONFIG_MODULES | ||
15 | # define PERCPU_MODULE_RESERVE 8192 | ||
16 | #else | ||
17 | # define PERCPU_MODULE_RESERVE 0 | ||
18 | #endif | ||
19 | |||
20 | #define PERCPU_ENOUGH_ROOM \ | ||
21 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ | ||
22 | PERCPU_MODULE_RESERVE) | ||
23 | |||
24 | #define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset) | 14 | #define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset) |
25 | #define __my_cpu_offset() read_pda(data_offset) | 15 | #define __my_cpu_offset() read_pda(data_offset) |
26 | 16 | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 600e3d387ffc..b72be2f79e6a 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -11,9 +11,16 @@ | |||
11 | 11 | ||
12 | /* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */ | 12 | /* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */ |
13 | #ifndef PERCPU_ENOUGH_ROOM | 13 | #ifndef PERCPU_ENOUGH_ROOM |
14 | #define PERCPU_ENOUGH_ROOM 32768 | 14 | #ifdef CONFIG_MODULES |
15 | #define PERCPU_MODULE_RESERVE 8192 | ||
16 | #else | ||
17 | #define PERCPU_MODULE_RESERVE 0 | ||
15 | #endif | 18 | #endif |
16 | 19 | ||
20 | #define PERCPU_ENOUGH_ROOM \ | ||
21 | (__per_cpu_end - __per_cpu_start + PERCPU_MODULE_RESERVE) | ||
22 | #endif /* PERCPU_ENOUGH_ROOM */ | ||
23 | |||
17 | /* | 24 | /* |
18 | * Must be an lvalue. Since @var must be a simple identifier, | 25 | * Must be an lvalue. Since @var must be a simple identifier, |
19 | * we force a syntax error here if it isn't. | 26 | * we force a syntax error here if it isn't. |