aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-09-12 12:49:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 13:50:57 -0400
commita0d58c9741e4ef42f5fbdfb2a6b86f03c6e9092f (patch)
treeaa51f2bb353ba48670ecb82a3137730c5021ccb6
parent1209140c3c70aaa32d1a0462d79557f2a44a4ef8 (diff)
[PATCH] x86-64: Set the stack pointer correctly in init_thread and init_tss
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/x86_64/kernel/init_task.c2
-rw-r--r--include/asm-x86_64/processor.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/init_task.c b/arch/x86_64/kernel/init_task.c
index c4dc91491157..e0ba5c1043fd 100644
--- a/arch/x86_64/kernel/init_task.c
+++ b/arch/x86_64/kernel/init_task.c
@@ -44,6 +44,6 @@ EXPORT_SYMBOL(init_task);
44 * section. Since TSS's are completely CPU-local, we want them 44 * section. Since TSS's are completely CPU-local, we want them
45 * on exact cacheline boundaries, to eliminate cacheline ping-pong. 45 * on exact cacheline boundaries, to eliminate cacheline ping-pong.
46 */ 46 */
47DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp; 47DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp = INIT_TSS;
48 48
49#define ALIGN_TO_4K __attribute__((section(".data.init_task"))) 49#define ALIGN_TO_4K __attribute__((section(".data.init_task")))
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
index c6461c16edbf..03837d34fba0 100644
--- a/include/asm-x86_64/processor.h
+++ b/include/asm-x86_64/processor.h
@@ -254,7 +254,13 @@ struct thread_struct {
254 u64 tls_array[GDT_ENTRY_TLS_ENTRIES]; 254 u64 tls_array[GDT_ENTRY_TLS_ENTRIES];
255} __attribute__((aligned(16))); 255} __attribute__((aligned(16)));
256 256
257#define INIT_THREAD {} 257#define INIT_THREAD { \
258 .rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \
259}
260
261#define INIT_TSS { \
262 .rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \
263}
258 264
259#define INIT_MMAP \ 265#define INIT_MMAP \
260{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } 266{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }