diff options
Diffstat (limited to 'arch/x86_64/kernel/process.c')
-rw-r--r-- | arch/x86_64/kernel/process.c | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 8661f82ac70b..b5a89c0bdf59 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/a.out.h> | 32 | #include <linux/a.out.h> |
33 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/irq.h> | ||
36 | #include <linux/ptrace.h> | 35 | #include <linux/ptrace.h> |
37 | #include <linux/utsname.h> | 36 | #include <linux/utsname.h> |
38 | #include <linux/random.h> | 37 | #include <linux/random.h> |
@@ -123,6 +122,7 @@ static void poll_idle (void) | |||
123 | : : | 122 | : : |
124 | "i" (_TIF_NEED_RESCHED), | 123 | "i" (_TIF_NEED_RESCHED), |
125 | "m" (current_thread_info()->flags)); | 124 | "m" (current_thread_info()->flags)); |
125 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
126 | } else { | 126 | } else { |
127 | set_need_resched(); | 127 | set_need_resched(); |
128 | } | 128 | } |
@@ -271,8 +271,11 @@ void __show_regs(struct pt_regs * regs) | |||
271 | 271 | ||
272 | printk("\n"); | 272 | printk("\n"); |
273 | print_modules(); | 273 | print_modules(); |
274 | printk("Pid: %d, comm: %.20s %s %s\n", | 274 | printk("Pid: %d, comm: %.20s %s %s %.*s\n", |
275 | current->pid, current->comm, print_tainted(), system_utsname.release); | 275 | current->pid, current->comm, print_tainted(), |
276 | system_utsname.release, | ||
277 | (int)strcspn(system_utsname.version, " "), | ||
278 | system_utsname.version); | ||
276 | printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); | 279 | printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); |
277 | printk_address(regs->rip); | 280 | printk_address(regs->rip); |
278 | printk("\nRSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, regs->eflags); | 281 | printk("\nRSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, regs->eflags); |
@@ -483,33 +486,6 @@ out: | |||
483 | } | 486 | } |
484 | 487 | ||
485 | /* | 488 | /* |
486 | * This function selects if the context switch from prev to next | ||
487 | * has to tweak the TSC disable bit in the cr4. | ||
488 | */ | ||
489 | static inline void disable_tsc(struct task_struct *prev_p, | ||
490 | struct task_struct *next_p) | ||
491 | { | ||
492 | struct thread_info *prev, *next; | ||
493 | |||
494 | /* | ||
495 | * gcc should eliminate the ->thread_info dereference if | ||
496 | * has_secure_computing returns 0 at compile time (SECCOMP=n). | ||
497 | */ | ||
498 | prev = prev_p->thread_info; | ||
499 | next = next_p->thread_info; | ||
500 | |||
501 | if (has_secure_computing(prev) || has_secure_computing(next)) { | ||
502 | /* slow path here */ | ||
503 | if (has_secure_computing(prev) && | ||
504 | !has_secure_computing(next)) { | ||
505 | write_cr4(read_cr4() & ~X86_CR4_TSD); | ||
506 | } else if (!has_secure_computing(prev) && | ||
507 | has_secure_computing(next)) | ||
508 | write_cr4(read_cr4() | X86_CR4_TSD); | ||
509 | } | ||
510 | } | ||
511 | |||
512 | /* | ||
513 | * This special macro can be used to load a debugging register | 489 | * This special macro can be used to load a debugging register |
514 | */ | 490 | */ |
515 | #define loaddebug(thread,r) set_debug(thread->debugreg ## r, r) | 491 | #define loaddebug(thread,r) set_debug(thread->debugreg ## r, r) |
@@ -627,8 +603,6 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct * | |||
627 | } | 603 | } |
628 | } | 604 | } |
629 | 605 | ||
630 | disable_tsc(prev_p, next_p); | ||
631 | |||
632 | return prev_p; | 606 | return prev_p; |
633 | } | 607 | } |
634 | 608 | ||