diff options
author | Mike Travis <travis@sgi.com> | 2008-05-12 15:21:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 05:31:25 -0400 |
commit | 3461b0af025251bbc6b3d56c821c6ac2de6f7209 (patch) | |
tree | 5350ad712311a69b4b59deec1ec60d8573db8817 /arch/x86/kernel/setup64.c | |
parent | 9f248bde9d47cc177011198c9a15fb339b9f3215 (diff) |
x86: remove static boot_cpu_pda array v2
* Remove the boot_cpu_pda array and pointer table from the data section.
Allocate the pointer table and array during init. do_boot_cpu()
will reallocate the pda in node local memory and if the cpu is being
brought up before the bootmem array is released (after_bootmem = 0),
then it will free the initial pda. This will happen for all cpus
present at system startup.
This removes 512k + 32k bytes from the data section.
For inclusion into sched-devel/latest tree.
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.git
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/setup64.c')
-rw-r--r-- | arch/x86/kernel/setup64.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c index aee0e8200777..631ea6cc01d8 100644 --- a/arch/x86/kernel/setup64.c +++ b/arch/x86/kernel/setup64.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kgdb.h> | 14 | #include <linux/kgdb.h> |
15 | #include <linux/topology.h> | ||
15 | #include <asm/pda.h> | 16 | #include <asm/pda.h> |
16 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
17 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
@@ -34,9 +35,8 @@ struct boot_params boot_params; | |||
34 | 35 | ||
35 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; | 36 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; |
36 | 37 | ||
37 | struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly; | 38 | struct x8664_pda **_cpu_pda __read_mostly; |
38 | EXPORT_SYMBOL(_cpu_pda); | 39 | EXPORT_SYMBOL(_cpu_pda); |
39 | struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned; | ||
40 | 40 | ||
41 | struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; | 41 | struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; |
42 | 42 | ||
@@ -114,8 +114,10 @@ void pda_init(int cpu) | |||
114 | __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER); | 114 | __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER); |
115 | if (!pda->irqstackptr) | 115 | if (!pda->irqstackptr) |
116 | panic("cannot allocate irqstack for cpu %d", cpu); | 116 | panic("cannot allocate irqstack for cpu %d", cpu); |
117 | } | ||
118 | 117 | ||
118 | if (pda->nodenumber == 0 && cpu_to_node(cpu) != NUMA_NO_NODE) | ||
119 | pda->nodenumber = cpu_to_node(cpu); | ||
120 | } | ||
119 | 121 | ||
120 | pda->irqstackptr += IRQSTACKSIZE-64; | 122 | pda->irqstackptr += IRQSTACKSIZE-64; |
121 | } | 123 | } |