Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8608
b: refs/heads/master
c: 083044e
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Sep 12, 2005
1 parent f99f919 commit c76a68a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 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: fe5d5f073eb133b65a8814b48af1722a1ca5aa25
refs/heads/master: 083044e63b4d10ebf9afb231bc0d34aec72169b4
29 changes: 0 additions & 29 deletions trunk/arch/x86_64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,33 +486,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
return err;
}

/*
* This function selects if the context switch from prev to next
* has to tweak the TSC disable bit in the cr4.
*/
static inline void disable_tsc(struct task_struct *prev_p,
struct task_struct *next_p)
{
struct thread_info *prev, *next;

/*
* gcc should eliminate the ->thread_info dereference if
* has_secure_computing returns 0 at compile time (SECCOMP=n).
*/
prev = prev_p->thread_info;
next = next_p->thread_info;

if (has_secure_computing(prev) || has_secure_computing(next)) {
/* slow path here */
if (has_secure_computing(prev) &&
!has_secure_computing(next)) {
write_cr4(read_cr4() & ~X86_CR4_TSD);
} else if (!has_secure_computing(prev) &&
has_secure_computing(next))
write_cr4(read_cr4() | X86_CR4_TSD);
}
}

/*
* This special macro can be used to load a debugging register
*/
Expand Down Expand Up @@ -631,8 +604,6 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct *
}
}

disable_tsc(prev_p, next_p);

return prev_p;
}

Expand Down

0 comments on commit c76a68a

Please sign in to comment.