Re: [GIT]: Sparc

From: Linus Torvalds
Date: Thu Apr 24 2008 - 11:40:35 EST




On Thu, 24 Apr 2008, David Miller wrote:
>
> 2) Make use of an unused field in pt_regs to store both
> a magic number, and the trap number, this allows:
>
> a) Removing the funny passing of the "restart_syscall"
> boolean in the trap return paths to the signal dispatch.
>
> b) Allow more accurate stack backtraces, since we have the
> magic cookie, we can detect trap frames accurately.
>
> c) The UTRACE guys want to be able to detect if a thread
> off the cpu is in a system call, they can do that trivially
> now just like they can on x86.
>
> In fact much of this idea is from Roland McGrath.

Heh. This is what x86 has done since day#1. I wonder why other
architectures wouldn't have copied that part..

That's "orig_eax". It's a strange name, it really has nothing to do with
"eax" except for the fact that the system call number comes from that
register - for traps etc it's a negative value.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/