提交 a0d58c97 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

[PATCH] x86-64: Set the stack pointer correctly in init_thread and init_tss

Signed-off-by: NJan Beulich <jbeulich@novell.com>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 1209140c
......@@ -44,6 +44,6 @@ EXPORT_SYMBOL(init_task);
* section. Since TSS's are completely CPU-local, we want them
* on exact cacheline boundaries, to eliminate cacheline ping-pong.
*/
DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp;
DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp = INIT_TSS;
#define ALIGN_TO_4K __attribute__((section(".data.init_task")))
......@@ -254,7 +254,13 @@ struct thread_struct {
u64 tls_array[GDT_ENTRY_TLS_ENTRIES];
} __attribute__((aligned(16)));
#define INIT_THREAD {}
#define INIT_THREAD { \
.rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \
}
#define INIT_TSS { \
.rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \
}
#define INIT_MMAP \
{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册