From 854f80d85752ef0d5f781ba9b598e1fb6387d847 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 12 Sep 2005 18:49:24 +0200 Subject: [PATCH] --- yaml --- r: 8627 b: refs/heads/master c: a0d58c9741e4ef42f5fbdfb2a6b86f03c6e9092f h: refs/heads/master i: 8625: 4ee84043e23c71f71217121df5f3f14ce02a56d8 8623: 389218ee6c8bb65b2dfffcf58036ae000c5391c3 v: v3 --- [refs] | 2 +- trunk/arch/x86_64/kernel/init_task.c | 2 +- trunk/include/asm-x86_64/processor.h | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 38503eee67b0..ee7400b8533f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1209140c3c70aaa32d1a0462d79557f2a44a4ef8 +refs/heads/master: a0d58c9741e4ef42f5fbdfb2a6b86f03c6e9092f diff --git a/trunk/arch/x86_64/kernel/init_task.c b/trunk/arch/x86_64/kernel/init_task.c index c4dc91491157..e0ba5c1043fd 100644 --- a/trunk/arch/x86_64/kernel/init_task.c +++ b/trunk/arch/x86_64/kernel/init_task.c @@ -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"))) diff --git a/trunk/include/asm-x86_64/processor.h b/trunk/include/asm-x86_64/processor.h index c6461c16edbf..03837d34fba0 100644 --- a/trunk/include/asm-x86_64/processor.h +++ b/trunk/include/asm-x86_64/processor.h @@ -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 }