aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-05 16:11:35 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-01 09:58:11 -0400
commit45111b5398fd500a14b6048a347c37f3f959945a (patch)
tree4d7c2a6691467425a71dcf431c58a451e83b4741 /arch/mips
parentf925725d91895fe6ca293c6838cc8bd821488fcf (diff)
mips: merge the identical "return from syscall" per-ABI code
No need to keep 4 copies of that stuff; merged and taken to entry.S, unused public symbols there killed off. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/entry.S12
-rw-r--r--arch/mips/kernel/scall32-o32.S13
-rw-r--r--arch/mips/kernel/scall64-64.S13
-rw-r--r--arch/mips/kernel/scall64-n32.S13
-rw-r--r--arch/mips/kernel/scall64-o32.S13
5 files changed, 13 insertions, 51 deletions
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index 4b0937f19862..a6c133212003 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -77,7 +77,7 @@ FEXPORT(syscall_exit)
77 and t0, a2, t0 77 and t0, a2, t0
78 bnez t0, syscall_exit_work 78 bnez t0, syscall_exit_work
79 79
80FEXPORT(restore_all) # restore full frame 80restore_all: # restore full frame
81#ifdef CONFIG_MIPS_MT_SMTC 81#ifdef CONFIG_MIPS_MT_SMTC
82#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP 82#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
83/* Re-arm any temporarily masked interrupts not explicitly "acked" */ 83/* Re-arm any temporarily masked interrupts not explicitly "acked" */
@@ -117,7 +117,7 @@ FEXPORT(restore_all) # restore full frame
117 RESTORE_TEMP 117 RESTORE_TEMP
118 RESTORE_AT 118 RESTORE_AT
119 RESTORE_STATIC 119 RESTORE_STATIC
120FEXPORT(restore_partial) # restore partial frame 120restore_partial: # restore partial frame
121#ifdef CONFIG_TRACE_IRQFLAGS 121#ifdef CONFIG_TRACE_IRQFLAGS
122 SAVE_STATIC 122 SAVE_STATIC
123 SAVE_AT 123 SAVE_AT
@@ -164,7 +164,13 @@ work_notifysig: # deal with pending signals and
164 jal do_notify_resume # a2 already loaded 164 jal do_notify_resume # a2 already loaded
165 j resume_userspace 165 j resume_userspace
166 166
167FEXPORT(syscall_exit_work_partial) 167FEXPORT(syscall_exit_partial)
168 local_irq_disable # make sure need_resched doesn't
169 # change between and return
170 LONG_L a2, TI_FLAGS($28) # current->work
171 li t0, _TIF_ALLWORK_MASK
172 and t0, a2
173 beqz t0, restore_partial
168 SAVE_STATIC 174 SAVE_STATIC
169syscall_exit_work: 175syscall_exit_work:
170 LONG_L t0, PT_STATUS(sp) # returning to kernel mode? 176 LONG_L t0, PT_STATUS(sp) # returning to kernel mode?
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index a632bc144efa..dfd47dcbd96c 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -69,18 +69,7 @@ stack_done:
691: sw v0, PT_R2(sp) # result 691: sw v0, PT_R2(sp) # result
70 70
71o32_syscall_exit: 71o32_syscall_exit:
72 local_irq_disable # make sure need_resched and 72 j syscall_exit_partial
73 # signals dont change between
74 # sampling and return
75 lw a2, TI_FLAGS($28) # current->work
76 li t0, _TIF_ALLWORK_MASK
77 and t0, a2
78 bnez t0, o32_syscall_exit_work
79
80 j restore_partial
81
82o32_syscall_exit_work:
83 j syscall_exit_work_partial
84 73
85/* ------------------------------------------------------------------------ */ 74/* ------------------------------------------------------------------------ */
86 75
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 3b5a5e9ae49c..b83dc8b2832c 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -72,18 +72,7 @@ NESTED(handle_sys64, PT_SIZE, sp)
721: sd v0, PT_R2(sp) # result 721: sd v0, PT_R2(sp) # result
73 73
74n64_syscall_exit: 74n64_syscall_exit:
75 local_irq_disable # make sure need_resched and 75 j syscall_exit_partial
76 # signals dont change between
77 # sampling and return
78 LONG_L a2, TI_FLAGS($28) # current->work
79 li t0, _TIF_ALLWORK_MASK
80 and t0, a2, t0
81 bnez t0, n64_syscall_exit_work
82
83 j restore_partial
84
85n64_syscall_exit_work:
86 j syscall_exit_work_partial
87 76
88/* ------------------------------------------------------------------------ */ 77/* ------------------------------------------------------------------------ */
89 78
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 6be6f7020923..0cff8a30475e 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -70,18 +70,7 @@ NESTED(handle_sysn32, PT_SIZE, sp)
70 sd t1, PT_R0(sp) # save it for syscall restarting 70 sd t1, PT_R0(sp) # save it for syscall restarting
711: sd v0, PT_R2(sp) # result 711: sd v0, PT_R2(sp) # result
72 72
73 local_irq_disable # make sure need_resched and 73 j syscall_exit_partial
74 # signals dont change between
75 # sampling and return
76 LONG_L a2, TI_FLAGS($28) # current->work
77 li t0, _TIF_ALLWORK_MASK
78 and t0, a2, t0
79 bnez t0, n32_syscall_exit_work
80
81 j restore_partial
82
83n32_syscall_exit_work:
84 j syscall_exit_work_partial
85 74
86/* ------------------------------------------------------------------------ */ 75/* ------------------------------------------------------------------------ */
87 76
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 54228553691d..9b040e4b84d4 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -99,18 +99,7 @@ NESTED(handle_sys, PT_SIZE, sp)
991: sd v0, PT_R2(sp) # result 991: sd v0, PT_R2(sp) # result
100 100
101o32_syscall_exit: 101o32_syscall_exit:
102 local_irq_disable # make need_resched and 102 j syscall_exit_partial
103 # signals dont change between
104 # sampling and return
105 LONG_L a2, TI_FLAGS($28)
106 li t0, _TIF_ALLWORK_MASK
107 and t0, a2, t0
108 bnez t0, o32_syscall_exit_work
109
110 j restore_partial
111
112o32_syscall_exit_work:
113 j syscall_exit_work_partial
114 103
115/* ------------------------------------------------------------------------ */ 104/* ------------------------------------------------------------------------ */
116 105