]> git.baikalelectronics.ru Git - kernel.git/commit
x86: fix switch_to() clobbers
authorIngo Molnar <mingo@elte.hu>
Wed, 5 Mar 2008 09:46:38 +0000 (10:46 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:52 +0000 (17:40 +0200)
commita4fe4bd35bd8903a6fe0ffe0dd553cf225ff16ac
treea9e6a3a9f79877675a1855469ed98677db771797
parent23b81d60e1e9406f7dc71b7f73c0d983dd3e7dbb
x86: fix switch_to() clobbers

Liu Pingfan noticed that switch_to() clobbers more registers than its
asm constraints specify.

We get away with this due to luck mostly - schedule()
by its nature only has 'local' state which gets reloaded
automatically. Fix it nevertheless, we could hit this anytime.

it turns out that with the extra constraints gcc manages to make
schedule() even more compact:

   text    data     bss     dec     hex filename
  28626     684    2640   31950    7cce sched.o.before
  28613     684    2640   31937    7cc1 sched.o.after

Reported-by: Liu Pingfan <kernelfans@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/system.h