Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110274
b: refs/heads/master
c: 970e725
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Ingo Molnar committed May 12, 2008
1 parent 59aa412 commit aa96534
Show file tree
Hide file tree
Showing 2 changed files with 26 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: 93fa7636dfdc059b25df148f230c0991096afdef
refs/heads/master: 970e725098a6da5a9c1f8128102c812e31a0444c
37 changes: 25 additions & 12 deletions trunk/arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,20 +484,13 @@ int set_tsc_mode(unsigned int val)
return 0;
}

static noinline void
__switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
struct tss_struct *tss)
#ifdef CONFIG_X86_DS
static int update_debugctl(struct thread_struct *prev,
struct thread_struct *next, unsigned long debugctl)
{
struct thread_struct *prev, *next;
unsigned long debugctl;
unsigned long ds_prev = 0, ds_next = 0;
unsigned long ds_prev = 0;
unsigned long 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)
Expand All @@ -510,8 +503,28 @@ __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
update_debugctlmsr(0);
wrmsr(MSR_IA32_DS_AREA, ds_next, 0);
}
return debugctl;
}
#else
static int update_debugctl(struct thread_struct *prev,
struct thread_struct *next, unsigned long debugctl)
{
return debugctl;
}
#endif /* CONFIG_X86_DS */

static noinline void
__switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
struct tss_struct *tss)
{
struct thread_struct *prev, *next;
unsigned long debugctl;

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

debugctl = update_debugctl(prev, next, prev->debugctlmsr);

if (next->debugctlmsr != debugctl)
update_debugctlmsr(next->debugctlmsr);

Expand Down

0 comments on commit aa96534

Please sign in to comment.