diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2007-05-15 04:41:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-15 11:54:00 -0400 |
commit | 297d9c035edd04327fedc0d1da27c2b112b66fcc (patch) | |
tree | c5a2f1258def2f54790b57afc0bea9dc49563773 /arch/i386/kernel/smpboot.c | |
parent | 838c41184fee5e151c09972f2ba90c16493af614 (diff) |
i386: move common parts of smp into their own file
Several parts of kernel/smp.c and smpboot.c are generally useful for other
subarchitectures and paravirt_ops implementations, so make them available for
reuse.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r-- | arch/i386/kernel/smpboot.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index b92cc4e8b3bb..08f07a74a9d3 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -98,9 +98,6 @@ EXPORT_SYMBOL(x86_cpu_to_apicid); | |||
98 | 98 | ||
99 | u8 apicid_2_node[MAX_APICID]; | 99 | u8 apicid_2_node[MAX_APICID]; |
100 | 100 | ||
101 | DEFINE_PER_CPU(unsigned long, this_cpu_off); | ||
102 | EXPORT_PER_CPU_SYMBOL(this_cpu_off); | ||
103 | |||
104 | /* | 101 | /* |
105 | * Trampoline 80x86 program as an array. | 102 | * Trampoline 80x86 program as an array. |
106 | */ | 103 | */ |
@@ -763,25 +760,6 @@ static inline struct task_struct * alloc_idle_task(int cpu) | |||
763 | #define alloc_idle_task(cpu) fork_idle(cpu) | 760 | #define alloc_idle_task(cpu) fork_idle(cpu) |
764 | #endif | 761 | #endif |
765 | 762 | ||
766 | /* Initialize the CPU's GDT. This is either the boot CPU doing itself | ||
767 | (still using the master per-cpu area), or a CPU doing it for a | ||
768 | secondary which will soon come up. */ | ||
769 | static __cpuinit void init_gdt(int cpu) | ||
770 | { | ||
771 | struct desc_struct *gdt = get_cpu_gdt_table(cpu); | ||
772 | |||
773 | pack_descriptor((u32 *)&gdt[GDT_ENTRY_PERCPU].a, | ||
774 | (u32 *)&gdt[GDT_ENTRY_PERCPU].b, | ||
775 | __per_cpu_offset[cpu], 0xFFFFF, | ||
776 | 0x80 | DESCTYPE_S | 0x2, 0x8); | ||
777 | |||
778 | per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu]; | ||
779 | per_cpu(cpu_number, cpu) = cpu; | ||
780 | } | ||
781 | |||
782 | /* Defined in head.S */ | ||
783 | extern struct Xgt_desc_struct early_gdt_descr; | ||
784 | |||
785 | static int __cpuinit do_boot_cpu(int apicid, int cpu) | 763 | static int __cpuinit do_boot_cpu(int apicid, int cpu) |
786 | /* | 764 | /* |
787 | * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad | 765 | * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad |