[PATCH] i386: Fix UP gdt bugs
Fixes two problems with the GDT when compiling for uniprocessor: - There's no percpu segment, so trying to load its selector into %fs fails. Use a null selector instead. - The real gdt needs to be loaded at some point. Do it in cpu_init(). Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Andi Kleen
parent
1956c73bb5
commit
c5413fbe89
@@ -75,7 +75,11 @@
|
||||
#define __ESPFIX_SS (GDT_ENTRY_ESPFIX_SS * 8)
|
||||
|
||||
#define GDT_ENTRY_PERCPU (GDT_ENTRY_KERNEL_BASE + 15)
|
||||
#ifdef CONFIG_SMP
|
||||
#define __KERNEL_PERCPU (GDT_ENTRY_PERCPU * 8)
|
||||
#else
|
||||
#define __KERNEL_PERCPU 0
|
||||
#endif
|
||||
|
||||
#define GDT_ENTRY_DOUBLEFAULT_TSS 31
|
||||
|
||||
|
||||
Reference in New Issue
Block a user