aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nds32/include/asm/syscall.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 11:58:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 11:58:04 -0400
commit57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 (patch)
treeb5fb03fc6bc5754de8b5b1f8b0e4f36d67c8315c /arch/nds32/include/asm/syscall.h
parent0a8ad0ffa4d80a544f6cbff703bf6394339afcdf (diff)
parent43e11fa2d1d3b6e35629fa556eb7d571edba2010 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: "VM: - z3fold fixes and enhancements by Henry Burns and Vitaly Wool - more accurate reclaimed slab caches calculations by Yafang Shao - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by Christoph Hellwig - !CONFIG_MMU fixes by Christoph Hellwig - new novmcoredd parameter to omit device dumps from vmcore, by Kairui Song - new test_meminit module for testing heap and pagealloc initialization, by Alexander Potapenko - ioremap improvements for huge mappings, by Anshuman Khandual - generalize kprobe page fault handling, by Anshuman Khandual - device-dax hotplug fixes and improvements, by Pavel Tatashin - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V - add pte_devmap() support for arm64, by Robin Murphy - unify locked_vm accounting with a helper, by Daniel Jordan - several misc fixes core/lib: - new typeof_member() macro including some users, by Alexey Dobriyan - make BIT() and GENMASK() available in asm, by Masahiro Yamada - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better code generation, by Alexey Dobriyan - rbtree code size optimizations, by Michel Lespinasse - convert struct pid count to refcount_t, by Joel Fernandes get_maintainer.pl: - add --no-moderated switch to skip moderated ML's, by Joe Perches misc: - ptrace PTRACE_GET_SYSCALL_INFO interface - coda updates - gdb scripts, various" [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ] * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits) fs/select.c: use struct_size() in kmalloc() mm: add account_locked_vm utility function arm64: mm: implement pte_devmap support mm: introduce ARCH_HAS_PTE_DEVMAP mm: clean up is_device_*_page() definitions mm/mmap: move common defines to mman-common.h mm: move MAP_SYNC to asm-generic/mman-common.h device-dax: "Hotremove" persistent memory that is used like normal RAM mm/hotplug: make remove_memory() interface usable device-dax: fix memory and resource leak if hotplug fails include/linux/lz4.h: fix spelling and copy-paste errors in documentation ipc/mqueue.c: only perform resource calculation if user valid include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures scripts/gdb: add helpers to find and list devices scripts/gdb: add lx-genpd-summary command drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl kernel/pid.c: convert struct pid count to refcount_t drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining() select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR ...
Diffstat (limited to 'arch/nds32/include/asm/syscall.h')
-rw-r--r--arch/nds32/include/asm/syscall.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/arch/nds32/include/asm/syscall.h b/arch/nds32/include/asm/syscall.h
index 899b2fb4b52f..7b5180d78e20 100644
--- a/arch/nds32/include/asm/syscall.h
+++ b/arch/nds32/include/asm/syscall.h
@@ -26,7 +26,8 @@ struct pt_regs;
26 * 26 *
27 * It's only valid to call this when @task is known to be blocked. 27 * It's only valid to call this when @task is known to be blocked.
28 */ 28 */
29int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) 29static inline int
30syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
30{ 31{
31 return regs->syscallno; 32 return regs->syscallno;
32} 33}
@@ -47,7 +48,8 @@ int syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
47 * system call instruction. This may not be the same as what the 48 * system call instruction. This may not be the same as what the
48 * register state looked like at system call entry tracing. 49 * register state looked like at system call entry tracing.
49 */ 50 */
50void syscall_rollback(struct task_struct *task, struct pt_regs *regs) 51static inline void
52syscall_rollback(struct task_struct *task, struct pt_regs *regs)
51{ 53{
52 regs->uregs[0] = regs->orig_r0; 54 regs->uregs[0] = regs->orig_r0;
53} 55}
@@ -62,7 +64,8 @@ void syscall_rollback(struct task_struct *task, struct pt_regs *regs)
62 * It's only valid to call this when @task is stopped for tracing on exit 64 * It's only valid to call this when @task is stopped for tracing on exit
63 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 65 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
64 */ 66 */
65long syscall_get_error(struct task_struct *task, struct pt_regs *regs) 67static inline long
68syscall_get_error(struct task_struct *task, struct pt_regs *regs)
66{ 69{
67 unsigned long error = regs->uregs[0]; 70 unsigned long error = regs->uregs[0];
68 return IS_ERR_VALUE(error) ? error : 0; 71 return IS_ERR_VALUE(error) ? error : 0;
@@ -79,7 +82,8 @@ long syscall_get_error(struct task_struct *task, struct pt_regs *regs)
79 * It's only valid to call this when @task is stopped for tracing on exit 82 * It's only valid to call this when @task is stopped for tracing on exit
80 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 83 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
81 */ 84 */
82long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) 85static inline long
86syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
83{ 87{
84 return regs->uregs[0]; 88 return regs->uregs[0];
85} 89}
@@ -99,8 +103,9 @@ long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
99 * It's only valid to call this when @task is stopped for tracing on exit 103 * It's only valid to call this when @task is stopped for tracing on exit
100 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 104 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
101 */ 105 */
102void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, 106static inline void
103 int error, long val) 107syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
108 int error, long val)
104{ 109{
105 regs->uregs[0] = (long)error ? error : val; 110 regs->uregs[0] = (long)error ? error : val;
106} 111}
@@ -118,8 +123,9 @@ void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
118 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 123 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
119 */ 124 */
120#define SYSCALL_MAX_ARGS 6 125#define SYSCALL_MAX_ARGS 6
121void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, 126static inline void
122 unsigned long *args) 127syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
128 unsigned long *args)
123{ 129{
124 args[0] = regs->orig_r0; 130 args[0] = regs->orig_r0;
125 args++; 131 args++;
@@ -138,8 +144,9 @@ void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
138 * It's only valid to call this when @task is stopped for tracing on 144 * It's only valid to call this when @task is stopped for tracing on
139 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 145 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
140 */ 146 */
141void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, 147static inline void
142 const unsigned long *args) 148syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
149 const unsigned long *args)
143{ 150{
144 regs->orig_r0 = args[0]; 151 regs->orig_r0 = args[0];
145 args++; 152 args++;