• Ingo Molnar's avatar
    x86: fix switch_to() clobbers · 8b6451fe
    Ingo Molnar authored
    
    
    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: default avatarLiu Pingfan <kernelfans@gmail.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    8b6451fe