diff options
-rw-r--r-- | arch/x86/kernel/process_64.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 93c501dc2496..eb62cbcaa490 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -406,10 +406,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
406 | * This won't pick up thread selector changes, but I guess that is ok. | 406 | * This won't pick up thread selector changes, but I guess that is ok. |
407 | */ | 407 | */ |
408 | savesegment(es, prev->es); | 408 | savesegment(es, prev->es); |
409 | if (next->es | prev->es) | 409 | if (unlikely(next->es | prev->es)) |
410 | loadsegment(es, next->es); | 410 | loadsegment(es, next->es); |
411 | |||
411 | savesegment(ds, prev->ds); | 412 | savesegment(ds, prev->ds); |
412 | if (next->ds | prev->ds) | 413 | if (unlikely(next->ds | prev->ds)) |
413 | loadsegment(ds, next->ds); | 414 | loadsegment(ds, next->ds); |
414 | 415 | ||
415 | 416 | ||