All of lore.kernel.org
 help / color / mirror / Atom feed
* handle_sys question
@ 2012-05-22  9:40 Songmao Tian
  2012-05-22 19:46 ` David Daney
  0 siblings, 1 reply; 3+ messages in thread
From: Songmao Tian @ 2012-05-22  9:40 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

Hello all:
   In handle_sys there's a
50<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/mips/kernel/scall32-o32.S;h=a632bc144efa1b9ca977a582864530e33ee039cb;hb=72c04af9a2d57b7945cf3de8e71461bd80695d50#l50>
       sw      a3, PT_R26(sp)          # save a3 for syscall
restarting

I woner why it need to save  a3 in R26(k0) slot in the stack?

Thanks,
songmao

[-- Attachment #2: Type: text/html, Size: 463 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: handle_sys question
  2012-05-22  9:40 handle_sys question Songmao Tian
@ 2012-05-22 19:46 ` David Daney
  2012-05-23  8:17   ` Songmao Tian
  0 siblings, 1 reply; 3+ messages in thread
From: David Daney @ 2012-05-22 19:46 UTC (permalink / raw)
  To: Songmao Tian; +Cc: linux-mips

On 05/22/2012 02:40 AM, Songmao Tian wrote:
> Hello all:
>     In handle_sys there's a
> 50
> <http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/mips/kernel/scall32-o32.S;h=a632bc144efa1b9ca977a582864530e33ee039cb;hb=72c04af9a2d57b7945cf3de8e71461bd80695d50#l50>
>          sw      a3, PT_R26(sp)          # save a3 for syscall restarting
>
> I woner why it need to save  a3 in R26(k0) slot in the stack?
>

It has to go somewhere.  The K0 and K1 slots aren't used to save other 
things.

David Daney

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: handle_sys question
  2012-05-22 19:46 ` David Daney
@ 2012-05-23  8:17   ` Songmao Tian
  0 siblings, 0 replies; 3+ messages in thread
From: Songmao Tian @ 2012-05-23  8:17 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

OK, I find the usage. continue to read the code:-), thanks.

587 static int handle_signal(unsigned long sig, siginfo_t *info,
588     struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
589 {
590     int ret;
……
602     /* fallthrough */
603     case ERESTARTNOINTR:        /* Userland will reload $v0.  */
604         regs->regs[7] = regs->regs[26];
605         regs->cp0_epc -= 8;
606     }



2012/5/23 David Daney <david.daney@cavium.com>

> On 05/22/2012 02:40 AM, Songmao Tian wrote:
>
>> Hello all:
>>    In handle_sys there's a
>> 50
>> <http://git.kernel.org/?p=**linux/kernel/git/torvalds/**
>> linux-2.6.git;a=blob;f=arch/**mips/kernel/scall32-o32.S;h=**
>> a632bc144efa1b9ca977a582864530**e33ee039cb;hb=**
>> 72c04af9a2d57b7945cf3de8e71461**bd80695d50#l50<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/mips/kernel/scall32-o32.S;h=a632bc144efa1b9ca977a582864530e33ee039cb;hb=72c04af9a2d57b7945cf3de8e71461bd80695d50#l50>
>> >
>>
>>         sw      a3, PT_R26(sp)          # save a3 for syscall restarting
>>
>> I woner why it need to save  a3 in R26(k0) slot in the stack?
>>
>>
> It has to go somewhere.  The K0 and K1 slots aren't used to save other
> things.
>
> David Daney
>

[-- Attachment #2: Type: text/html, Size: 1892 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-23  8:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22  9:40 handle_sys question Songmao Tian
2012-05-22 19:46 ` David Daney
2012-05-23  8:17   ` Songmao Tian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.