[parisc-linux] Re: schedule_tail

Matthew Wilcox matthew@wil.cx
Wed, 21 Feb 2001 22:47:32 -0700


On Thu, Feb 22, 2001 at 04:32:51PM +1100, Alan Modra wrote:
> On Thu, 22 Feb 2001, Helge Deller wrote:
> 
> > As far as I've tested, the following patch (HACK!) to 
> > ret_from_kernel_thread() against CVS head gets me at least to the 
> > init-process (where it then crashes).
> 
> I ripped out this call to schedule_tail _and_ the other one in
> child_return, and things are working again for me.  schedule_tail doesn't
> do much on uniprocessor.  Most likely %r26 was wrong.  I'd like to know 
> why the stack adjust before calling schedule_tail too.

It does a lot of important stuff on SMP though.  It does the stack adjust
before calling because the disassembled 32-bit SMP code looks like this:

101186f4 <schedule_tail>:
101186f4:       08 03 02 41     copy r3,r1
101186f8:       08 1e 02 43     copy sp,r3
101186fc:       6b c2 3f d9     stw rp,-14(sr0,sp)

and we don't want to trash what was below the sp.

-- 
Revolutions do not require corporate support.