diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/process.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index e9f35c60f8c6..687ed357e685 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -487,33 +487,6 @@ out: | |||
487 | } | 487 | } |
488 | 488 | ||
489 | /* | 489 | /* |
490 | * This function selects if the context switch from prev to next | ||
491 | * has to tweak the TSC disable bit in the cr4. | ||
492 | */ | ||
493 | static inline void disable_tsc(struct task_struct *prev_p, | ||
494 | struct task_struct *next_p) | ||
495 | { | ||
496 | struct thread_info *prev, *next; | ||
497 | |||
498 | /* | ||
499 | * gcc should eliminate the ->thread_info dereference if | ||
500 | * has_secure_computing returns 0 at compile time (SECCOMP=n). | ||
501 | */ | ||
502 | prev = prev_p->thread_info; | ||
503 | next = next_p->thread_info; | ||
504 | |||
505 | if (has_secure_computing(prev) || has_secure_computing(next)) { | ||
506 | /* slow path here */ | ||
507 | if (has_secure_computing(prev) && | ||
508 | !has_secure_computing(next)) { | ||
509 | write_cr4(read_cr4() & ~X86_CR4_TSD); | ||
510 | } else if (!has_secure_computing(prev) && | ||
511 | has_secure_computing(next)) | ||
512 | write_cr4(read_cr4() | X86_CR4_TSD); | ||
513 | } | ||
514 | } | ||
515 | |||
516 | /* | ||
517 | * This special macro can be used to load a debugging register | 490 | * This special macro can be used to load a debugging register |
518 | */ | 491 | */ |
519 | #define loaddebug(thread,r) set_debug(thread->debugreg ## r, r) | 492 | #define loaddebug(thread,r) set_debug(thread->debugreg ## r, r) |
@@ -631,8 +604,6 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct * | |||
631 | } | 604 | } |
632 | } | 605 | } |
633 | 606 | ||
634 | disable_tsc(prev_p, next_p); | ||
635 | |||
636 | return prev_p; | 607 | return prev_p; |
637 | } | 608 | } |
638 | 609 | ||