summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup_64.c
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-05-28 16:19:53 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-08 12:48:16 +0200
commita939098afcfa5f81d3474782ec15c6d114e57763 (patch)
tree62c21fb10d6b58dc8247c34e68ab5562e045b8d0 /arch/x86/kernel/setup_64.c
parent736f12bff9d9e7b4e895c64f73b190c8383fc2a1 (diff)
downloadblackbird-op-linux-a939098afcfa5f81d3474782ec15c6d114e57763.tar.gz
blackbird-op-linux-a939098afcfa5f81d3474782ec15c6d114e57763.zip
x86: move x86_64 gdt closer to i386
i386 and x86_64 used two different schemes for maintaining the gdt. With this patch, x86_64 initial gdt table is defined in a .c file, same way as i386 is now. Also, we call it "gdt_page", and the descriptor, "early_gdt_descr". This way we achieve common naming, which can allow for more code integration. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_64.c')
-rw-r--r--arch/x86/kernel/setup_64.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 504caeaffd58..a93300de4da9 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -81,8 +81,6 @@
#define ARCH_SETUP
#endif
-#include "cpu/cpu.h"
-
/*
* Machine setup..
*/
@@ -228,6 +226,23 @@ static inline void copy_edd(void)
}
#endif
+/* Overridden in paravirt.c if CONFIG_PARAVIRT */
+void __attribute__((weak)) __init memory_setup(void)
+{
+ machine_specific_memory_setup();
+}
+
+/* Current gdt points %fs at the "master" per-cpu area: after this,
+ * it's on the real one. */
+void switch_to_new_gdt(void)
+{
+ struct desc_ptr gdt_descr;
+
+ gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
+ gdt_descr.size = GDT_SIZE - 1;
+ load_gdt(&gdt_descr);
+}
+
/*
* setup_arch - architecture-specific boot-time initializations
*
OpenPOWER on IntegriCloud