History log of /linux-master/arch/sh/kernel/syscalls_32.S
Revision Date Author Comments
# 68553692 05-Mar-2019 Firoz Khan <firoz.khan@linaro.org>

sh: remove nargs from __SYSCALL

The __SYSCALL macro's arguments are system call number, system call
entry name and number of arguments for the system call.

Argument- nargs in __SYSCALL(nr, entry, nargs) is neither calculated nor
used anywhere. So it would be better to keep the implementation as
__SYSCALL(nr, entry). This unifies the implementation with some other
architectures too.

Link: http://lkml.kernel.org/r/1546443445-21075-2-git-send-email-firoz.khan@linaro.org
Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 5933f6d2 28-Dec-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

sh: kernel: convert to SPDX identifiers

Update license to use SPDX-License-Identifier instead of verbose license
text.

Link: http://lkml.kernel.org/r/8736rccswn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Cc: Rich Felker <dalias@libc.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 2b3c5a99 13-Nov-2018 Firoz Khan <firoz.khan@linaro.org>

sh: generate uapi header and syscall table header files

System call table generation script must be run to gener-
ate unistd_32.h and syscall_table.h files. This patch will
have changes which will invokes the script.

This patch will generate unistd_32.h and syscall_table.h
files by the syscall table generation script invoked by
sh/Makefile and the generated files against the removed
files must be identical.

The generated uapi header file will be included in uapi/-
asm/unistd.h and generated system call table header file
will be included by kernel/syscall_32.S file.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 74bdaa61 28-Jun-2016 Yoshinori Sato <ysato@users.sourceforge.jp>

sh: system call wire up

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Rich Felker <dalias@libc.org>


# a246f581 14-Jan-2013 Paul Mundt <lethal@linux-sh.org>

sh: wire up finit_module syscall.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# cf759932 14-Oct-2012 Paul Mundt <lethal@linux-sh.org>

sh: Wire up kcmp syscall.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 9b2ffa8d 28-Mar-2012 Paul Mundt <lethal@linux-sh.org>

sh: Avoid exporting unimplemented syscalls.

Now that userspace is making use of kernel-provided sanitized headers for
working out supported interfaces, we need to be a bit more diligent with
matching the syscall definitions with their actual wiring/support state.

In theory it shouldn't hurt anything since sys_ni_syscall will ultimately
do the right thing, but there's also not much need to lie about legacy
x86 syscalls that we've never supported.

This tightens things up a bit for uClibc at least.

Suggested-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 149c370f 06-Nov-2011 Paul Mundt <lethal@linux-sh.org>

sh: Wire up process_vm syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# f5b94099 26-Aug-2011 NeilBrown <neilb@suse.de>

All Arch: remove linkage for sys_nfsservctl system call

The nfsservctl system call is now gone, so we should remove all
linkage for it.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 7b21fddd 27-May-2011 Eric W. Biederman <ebiederm@xmission.com>

ns: Wire up the setns system call

32bit and 64bit on x86 are tested and working. The rest I have looked
at closely and I can't find any problems.

setns is an easy system call to wire up. It just takes two ints so I
don't expect any weird architecture porting problems.

While doing this I have noticed that we have some architectures that are
very slow to get new system calls. cris seems to be the slowest where
the last system calls wired up were preadv and pwritev. avr32 is weird
in that recvmmsg was wired up but never declared in unistd.h. frv is
behind with perf_event_open being the last syscall wired up. On h8300
the last system call wired up was epoll_wait. On m32r the last system
call wired up was fallocate. mn10300 has recvmmsg as the last system
call wired up. The rest seem to at least have syncfs wired up which was
new in the 2.6.39.

v2: Most of the architecture support added by Daniel Lezcano <dlezcano@fr.ibm.com>
v3: ported to v2.6.36-rc4 by: Eric W. Biederman <ebiederm@xmission.com>
v4: Moved wiring up of the system call to another patch
v5: ported to v2.6.39-rc6
v6: rebased onto parisc-next and net-next to avoid syscall conflicts.
v7: ported to Linus's latest post 2.6.39 tree.

>  arch/blackfin/include/asm/unistd.h     |    3 ++-
>  arch/blackfin/mach-common/entry.S      |    1 +
Acked-by: Mike Frysinger <vapier@gentoo.org>

Oh - ia64 wiring looks good.
Acked-by: Tony Luck <tony.luck@intel.com>

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# c7434dbf 22-May-2011 Paul Mundt <lethal@linux-sh.org>

sh: wire up sys_sendmmsg.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 2a03cfbd 22-Mar-2011 Paul Mundt <lethal@linux-sh.org>

sh: wire up sys_syncfs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# a8840333 17-Mar-2011 Paul Mundt <lethal@linux-sh.org>

sh: Wire up new fhandle and clock_adjtime syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 21b6e4c7 13-Dec-2010 Carmelo AMOROSO <carmelo.amoroso@st.com>

sh: wire up accept4 syscall (non-multiplexed path)

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 51d149be 14-Sep-2010 Paul Mundt <lethal@linux-sh.org>

sh: Provide a non-multiplexed sys_recvmmsg path.

Now that the rest of the socket calls are provided through their own
paths, do the same for sys_recvmmsg. It's unlikely we'll ever be able to
kill off the socketcall path, but this at least permits userspace to
gradually begin migrating.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 459ebb34 31-Aug-2010 Carmelo AMOROSO <carmelo.amoroso@st.com>

sh: Add syscall entries for non multiplexed socket calls

Linux kernel already has socket syscalls that can be invoked
without the multiplexing sys_socketcall wrapper.
C library wrappers are ready to use them directly. It needs just
to define the missing syscall numbers and provide the related entries
into the syscalls table, like sh64 aleady does.

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 3e497df1 15-Aug-2010 Paul Mundt <lethal@linux-sh.org>

sh: wire up fanotify/prlimit64 syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 6eacb2c4 19-Jan-2010 Paul Mundt <lethal@linux-sh.org>

sh: unwire sys_recvmmsg.

sh32 at the moment only uses sys_socketcall to reach these, so unwire
recvmmsg for now. While we're at it, add it to the ignore list, as per
the s390 change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# c89fbd39 10-Dec-2009 Paul Mundt <lethal@linux-sh.org>

sh: Wire up recvmmsg syscall.

The stub already existed in the _64 syscall table, but was lacking a
__NR_recvmmsg definition, while it was absent entirely for _32 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# cdd6c482 20-Sep-2009 Ingo Molnar <mingo@elte.hu>

perf: Do the big rename: Performance Counters -> Performance Events

Bye-bye Performance Counters, welcome Performance Events!

In the past few months the perfcounters subsystem has grown out its
initial role of counting hardware events, and has become (and is
becoming) a much broader generic event enumeration, reporting, logging,
monitoring, analysis facility.

Naming its core object 'perf_counter' and naming the subsystem
'perfcounters' has become more and more of a misnomer. With pending
code like hw-breakpoints support the 'counter' name is less and
less appropriate.

All in one, we've decided to rename the subsystem to 'performance
events' and to propagate this rename through all fields, variables
and API names. (in an ABI compatible fashion)

The word 'event' is also a bit shorter than 'counter' - which makes
it slightly more convenient to write/handle as well.

Thanks goes to Stephane Eranian who first observed this misnomer and
suggested a rename.

User-space tooling and ABI compatibility is not affected - this patch
should be function-invariant. (Also, defconfigs were not touched to
keep the size down.)

This patch has been generated via the following script:

FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

sed -i \
-e 's/PERF_EVENT_/PERF_RECORD_/g' \
-e 's/PERF_COUNTER/PERF_EVENT/g' \
-e 's/perf_counter/perf_event/g' \
-e 's/nb_counters/nb_events/g' \
-e 's/swcounter/swevent/g' \
-e 's/tpcounter_event/tp_event/g' \
$FILES

for N in $(find . -name perf_counter.[ch]); do
M=$(echo $N | sed 's/perf_counter/perf_event/g')
mv $N $M
done

FILES=$(find . -name perf_event.*)

sed -i \
-e 's/COUNTER_MASK/REG_MASK/g' \
-e 's/COUNTER/EVENT/g' \
-e 's/\<event\>/event_id/g' \
-e 's/counter/event/g' \
-e 's/Counter/Event/g' \
$FILES

... to keep it as correct as possible. This script can also be
used by anyone who has pending perfcounters patches - it converts
a Linux kernel tree over to the new naming. We tried to time this
change to the point in time where the amount of pending patches
is the smallest: the end of the merge window.

Namespace clashes were fixed up in a preparatory patch - and some
stylistic fallout will be fixed up in a subsequent patch.

( NOTE: 'counters' are still the proper terminology when we deal
with hardware registers - and these sed scripts are a bit
over-eager in renaming them. I've undone some of that, but
in case there's something left where 'counter' would be
better than 'event' we can undo that on an individual basis
instead of touching an otherwise nicely automated patch. )

Suggested-by: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-arch@vger.kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 6d243dd3 24-Aug-2009 Stuart Menefy <stuart.menefy@st.com>

sh: Add sys_cacheflush() call for SH CPUs.

Adds a system call to allow user code to flush code from the cache.
You can use instructions for the data side, but the iside can
only be done by a flush ROM which really only works with a direct
mapped cache. The later SH4's have 2 way Iside, so this call allows
a portable way to flush the cache.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 19470e18 11-Jun-2009 Paul Mundt <lethal@linux-sh.org>

sh: Wire up sys_perf_counter_open.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 6a1555fd 11-Jun-2009 Paul Mundt <lethal@linux-sh.org>

sh: Wire up sys_rt_tgsigqueueinfo.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 75c936ae 11-Jun-2009 Paul Mundt <lethal@linux-sh.org>

sh: Fix sys_pwritev() syscall table entry for sh32.

There was a typo here that had this as sys_writev() instead of
sys_pwritev(), fix this up. sh64 got this right, as did the preadv()
case.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 090fed50 06-Apr-2009 Paul Mundt <lethal@linux-sh.org>

sh: wire up sys_preadv/sys_pwritev() syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 1134723e 14-Jan-2009 Heiko Carstens <hca@linux.ibm.com>

[CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2

Remove __attribute__((weak)) from common code sys_pipe implemantation.
IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations
with the same name. Just rename them.
For sys_pipe2 there is no architecture specific implementation.

Cc: Richard Henderson <rth@twiddle.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>


# e55380ed 14-Jan-2009 Heiko Carstens <hca@linux.ibm.com>

[CVE-2009-0029] Rename old_readdir to sys_old_readdir

This way it matches the generic system call name convention.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>


# 44f95989 28-Jul-2008 Paul Mundt <lethal@linux-sh.org>

sh: Wire up new syscalls.

This wires up the signalfd4, eventfd2, epoll_create1, dup3, pipe2, and
inotify_init1 syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 5d0e1464 06-Feb-2008 Paul Mundt <lethal@linux-sh.org>

sh: Wire up new timerfd syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 9692bd9c 05-Feb-2008 Andrew Morton <akpm@linux-foundation.org>

timerfd: fix remaining architectures

Cc: David Howells <dhowells@redhat.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 1b6cf817 11-Nov-2007 Paul Mundt <lethal@linux-sh.org>

sh: Split out syscall ABI for _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>