On Tue, Jan 12, 2010 at 21:27, Song, Barry wrote:
>From: Mike Frysinger [mailto:[email protected]]
>>On Mon, Jan 11, 2010 at 22:20,  <[email protected]> wrote:
>>> @@ -90,7 +102,13 @@
>>>      r0 += 24;
>>>      [--sp] = rets;
>>>      SP += -12;
>>> +#if defined(CONFIG_ROMKERNEL)
>>> +        p5.l = _bfin_clone;
>>> +        p5.h = _bfin_clone;
>>> +        call ( p5 );
>>> +#else
>>>      call _bfin_clone;
>>> +#endif
>>>      SP += 12;
>>>      rets = [sp++];
>>>      rts;
>>> @@ -101,7 +119,13 @@
>>>      r0 += 24;
>>>      [--sp] = rets;
>>>      SP += -12;
>>> +#if defined(CONFIG_ROMKERNEL)
>>> +        p5.l = _do_rt_sigreturn;
>>> +        p5.h = _do_rt_sigreturn;
>>> +        call ( p5 );
>>> +#else
>>>      call _do_rt_sigreturn;
>>> +#endif
>>>      SP += 12;
>>>      rets = [sp++];
>>>      rts;
>>
>>are you sure using p4/p5 in these short function calls is safe ?
>>those arent scratch registers based on our ABI, they're call preserved
>>which means if they are modified in a func, that func must
>>save/restore them.
>
> I am not compelety sure all cases are ok. But I have tried to avoid p
> registers confliction, startup linux and run some basic tests. Things
> are ok.
> If there are problems later, that can be a bug report.

that's probably a really bad idea.  this would manifest as random
hard-to-reproduce crashes.  the sys_{vfork,clone,rt_sigreturn}
probably are fine, but should be fixed because it's trivial and
they're exported for C code to call.  system_call should be documented
as an internal func.  all the rest seem to be behind save/restore all.
-mike
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to