Rev 1112 | Rev 1184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1112 | Rev 1172 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | 37 | ||
38 | void before_thread_runs_arch(void) |
38 | void before_thread_runs_arch(void) |
39 | { |
39 | { |
40 | CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
40 | CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
41 | 41 | ||
42 | /* Syscall support - write thread stack address to hidden part of gs */ |
42 | /* Syscall support - write address of thread stack pointer to |
- | 43 | * hidden part of gs */ |
|
43 | swapgs(); |
44 | swapgs(); |
44 | write_msr(AMD_MSR_GS, |
45 | write_msr(AMD_MSR_GS, |
45 | (__u64)&THREAD->kstack); |
46 | (__u64)&THREAD->kstack); |
46 | swapgs(); |
47 | swapgs(); |
47 | 48 |