Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4897
b: refs/heads/master
c: b339a18
h: refs/heads/master
i:
  4895: 7580815
v: v3
  • Loading branch information
Linus Torvalds committed Jul 22, 2005
1 parent 2b74d14 commit 790e0d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: f60f700876cd51de9de69f3a3c865d95e287a24d
refs/heads/master: b339a18b81a1f6ca1455559594f5df872b9e59f4
20 changes: 12 additions & 8 deletions trunk/arch/i386/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,23 +700,27 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas

/*
* Restore %fs and %gs if needed.
*
* Glibc normally makes %fs be zero, and %gs is one of
* the TLS segments.
*/
if (unlikely(prev->fs | prev->gs | next->fs | next->gs)) {
if (unlikely(prev->fs | next->fs))
loadsegment(fs, next->fs);

if (prev->gs | next->gs)
loadsegment(gs, next->gs);
}

/*
* Now maybe reload the debug registers
*/
if (unlikely(next->debugreg[7])) {
set_debugreg(current->thread.debugreg[0], 0);
set_debugreg(current->thread.debugreg[1], 1);
set_debugreg(current->thread.debugreg[2], 2);
set_debugreg(current->thread.debugreg[3], 3);
set_debugreg(next->debugreg[0], 0);
set_debugreg(next->debugreg[1], 1);
set_debugreg(next->debugreg[2], 2);
set_debugreg(next->debugreg[3], 3);
/* no 4 and 5 */
set_debugreg(current->thread.debugreg[6], 6);
set_debugreg(current->thread.debugreg[7], 7);
set_debugreg(next->debugreg[6], 6);
set_debugreg(next->debugreg[7], 7);
}

if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
Expand Down

0 comments on commit 790e0d9

Please sign in to comment.