Fix up incorrect "unlikely()" on %gs reload in x86 __switch_to
authorLinus Torvalds <torvalds@evo.osdl.org>
Fri, 22 Jul 2005 19:23:47 +0000 (15:23 -0400)
committerLinus Torvalds <torvalds@evo.osdl.org>
Fri, 22 Jul 2005 19:23:47 +0000 (15:23 -0400)
commitb339a18b81a1f6ca1455559594f5df872b9e59f4
tree1c3a34047734e5923484353dbe710b167ad7c72b
parentf60f700876cd51de9de69f3a3c865d95e287a24d
Fix up incorrect "unlikely()" on %gs reload in x86 __switch_to

These days %gs is normally the TLS segment, so it's no longer zero.  As
a result, we shouldn't just assume that %fs/%gs tend to be zero
together, but test them independently instead.

Also, fix setting of debug registers to use the "next" pointer instead
of "current".  It so happens that the scheduler will have set the new
current pointer before calling __switch_to(), but that's just an
implementation detail.
arch/i386/kernel/process.c