syscall(2) documentation of superh syscall method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently the man page for syscall(2) documents superh as using "trap
#0x17" with a note [4] that the low bits are the number of arguments.
While it was historically documented this way, that was never actually
the case; all traps in the range 0x10-0x1f have always behaved
identically on sh3/4, and on sh2, a different, gratuitously
incompatible rage, 0x20-0x2f, was chosen because some of the traps in
that range overlap with hardware exceptions.

I fixed the gratuitous incompatibility in kernel commit 3623d13821:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/sh/kernel/entry-common.S?id=3623d138213aedf0e2c89720f6a3cd0e164cb310

by adding 0x1f (which does not clash with hardware exceptions) as a
supported syscall trap on sh2, and the recommendation for application
code manually making syscalls is to always use 0x1f, which works on
all sh3/4 kernels (going back to original linux sh support) and all
recent sh2 kernels.

Also the trap instruction is misspelled; it should be "trapa" not
"trap".

I think the contents of the table should be changed from "trap #0x17"
to "trapa #0x1f" and the note should be changed to remove the
inaccurate information about number of arguments and to note that
while any trap in the range 0x10-0x1f works, 0x1f is preferred for
compatibility with sh2, and that old (pre-4.6) sh2 kernels need values
in the range 0x20-0x2f.

Thoughts?

Rich
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux