Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110276
b: refs/heads/master
c: 34b2cd5
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Thomas Gleixner committed May 17, 2008
1 parent 9fa1b65 commit b4cb94d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 573da4224e8c3800e613d715e909c3179a7e3cb2
refs/heads/master: 34b2cd5b688b012975fcfc3b3970fc3508fa82c4
29 changes: 17 additions & 12 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,25 +500,30 @@ static inline void __switch_to_xtra(struct task_struct *prev_p,
{
struct thread_struct *prev, *next;
unsigned long debugctl;
unsigned long ds_prev = 0, ds_next = 0;

prev = &prev_p->thread,
next = &next_p->thread;

debugctl = prev->debugctlmsr;

#ifdef CONFIG_X86_DS
if (prev->ds_ctx)
ds_prev = (unsigned long)prev->ds_ctx->ds;
if (next->ds_ctx)
ds_next = (unsigned long)next->ds_ctx->ds;

if (ds_next != ds_prev) {
/* we clear debugctl to make sure DS
* is not in use when we change it */
debugctl = 0;
update_debugctlmsr(0);
wrmsrl(MSR_IA32_DS_AREA, ds_next);
{
unsigned long ds_prev = 0, ds_next = 0;

if (prev->ds_ctx)
ds_prev = (unsigned long)prev->ds_ctx->ds;
if (next->ds_ctx)
ds_next = (unsigned long)next->ds_ctx->ds;

if (ds_next != ds_prev) {
/*
* We clear debugctl to make sure DS
* is not in use when we change it:
*/
debugctl = 0;
update_debugctlmsr(0);
wrmsrl(MSR_IA32_DS_AREA, ds_next);
}
}
#endif /* CONFIG_X86_DS */

Expand Down

0 comments on commit b4cb94d

Please sign in to comment.