Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35890
b: refs/heads/master
c: ba4d40b
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Andi Kleen committed Sep 26, 2006
1 parent 44d612a commit f409ac5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 522e93e3fcdbf00ba85c72fde6df28cfc0486a65
refs/heads/master: ba4d40bb5c465f0a4dcc30d02dab80c2cb7e1ff3
7 changes: 2 additions & 5 deletions trunk/arch/x86_64/kernel/setup64.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@ void __init setup_per_cpu_areas(void)
#endif

/* Copy section for each CPU (we discard the original) */
size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
#ifdef CONFIG_MODULES
if (size < PERCPU_ENOUGH_ROOM)
size = PERCPU_ENOUGH_ROOM;
#endif
size = PERCPU_ENOUGH_ROOM;

printk(KERN_INFO "PERCPU: Allocating %lu bytes of per cpu data\n", size);
for_each_cpu_mask (i, cpu_possible_map) {
char *ptr;

Expand Down
10 changes: 10 additions & 0 deletions trunk/include/asm-x86_64/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@

#include <asm/pda.h>

#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)

#define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset)
#define __my_cpu_offset() read_pda(data_offset)

Expand Down

0 comments on commit f409ac5

Please sign in to comment.