aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/entry.S
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-12-03 11:00:08 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-12-08 03:42:38 -0500
commit86ed42f401cb8fa54a8c553e075ea411caac7404 (patch)
tree455585c385cc718a0e6ae5f5e63b5a7b3698f9e5 /arch/s390/kernel/entry.S
parent7490daf01f11b5b692f69963eaee9be4adc135c3 (diff)
s390: use local symbol names in entry[64].S
To improve the output of the perf tool hide most of the symbols from entry[64].S by using the '.L' prefix. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/entry.S')
-rw-r--r--arch/s390/kernel/entry.S424
1 files changed, 212 insertions, 212 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 70203265196f..398329b2b518 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -53,7 +53,7 @@ _PIF_WORK = (_PIF_PER_TRAP)
53 .macro TRACE_IRQS_ON 53 .macro TRACE_IRQS_ON
54#ifdef CONFIG_TRACE_IRQFLAGS 54#ifdef CONFIG_TRACE_IRQFLAGS
55 basr %r2,%r0 55 basr %r2,%r0
56 l %r1,BASED(.Lhardirqs_on) 56 l %r1,BASED(.Lc_hardirqs_on)
57 basr %r14,%r1 # call trace_hardirqs_on_caller 57 basr %r14,%r1 # call trace_hardirqs_on_caller
58#endif 58#endif
59 .endm 59 .endm
@@ -61,7 +61,7 @@ _PIF_WORK = (_PIF_PER_TRAP)
61 .macro TRACE_IRQS_OFF 61 .macro TRACE_IRQS_OFF
62#ifdef CONFIG_TRACE_IRQFLAGS 62#ifdef CONFIG_TRACE_IRQFLAGS
63 basr %r2,%r0 63 basr %r2,%r0
64 l %r1,BASED(.Lhardirqs_off) 64 l %r1,BASED(.Lc_hardirqs_off)
65 basr %r14,%r1 # call trace_hardirqs_off_caller 65 basr %r14,%r1 # call trace_hardirqs_off_caller
66#endif 66#endif
67 .endm 67 .endm
@@ -70,7 +70,7 @@ _PIF_WORK = (_PIF_PER_TRAP)
70#ifdef CONFIG_LOCKDEP 70#ifdef CONFIG_LOCKDEP
71 tm __PT_PSW+1(%r11),0x01 # returning to user ? 71 tm __PT_PSW+1(%r11),0x01 # returning to user ?
72 jz .+10 72 jz .+10
73 l %r1,BASED(.Llockdep_sys_exit) 73 l %r1,BASED(.Lc_lockdep_sys_exit)
74 basr %r14,%r1 # call lockdep_sys_exit 74 basr %r14,%r1 # call lockdep_sys_exit
75#endif 75#endif
76 .endm 76 .endm
@@ -87,8 +87,8 @@ _PIF_WORK = (_PIF_PER_TRAP)
87 tmh %r8,0x0001 # interrupting from user ? 87 tmh %r8,0x0001 # interrupting from user ?
88 jnz 1f 88 jnz 1f
89 lr %r14,%r9 89 lr %r14,%r9
90 sl %r14,BASED(.Lcritical_start) 90 sl %r14,BASED(.Lc_critical_start)
91 cl %r14,BASED(.Lcritical_length) 91 cl %r14,BASED(.Lc_critical_length)
92 jhe 0f 92 jhe 0f
93 la %r11,\savearea # inside critical section, do cleanup 93 la %r11,\savearea # inside critical section, do cleanup
94 bras %r14,cleanup_critical 94 bras %r14,cleanup_critical
@@ -162,7 +162,7 @@ ENTRY(__switch_to)
162 lm %r6,%r15,__SF_GPRS(%r15) # load gprs of next task 162 lm %r6,%r15,__SF_GPRS(%r15) # load gprs of next task
163 br %r14 163 br %r14
164 164
165__critical_start: 165.L__critical_start:
166/* 166/*
167 * SVC interrupt handler routine. System calls are synchronous events and 167 * SVC interrupt handler routine. System calls are synchronous events and
168 * are executed with interrupts enabled. 168 * are executed with interrupts enabled.
@@ -170,145 +170,145 @@ __critical_start:
170 170
171ENTRY(system_call) 171ENTRY(system_call)
172 stpt __LC_SYNC_ENTER_TIMER 172 stpt __LC_SYNC_ENTER_TIMER
173sysc_stm: 173.Lsysc_stm:
174 stm %r8,%r15,__LC_SAVE_AREA_SYNC 174 stm %r8,%r15,__LC_SAVE_AREA_SYNC
175 l %r12,__LC_THREAD_INFO 175 l %r12,__LC_THREAD_INFO
176 l %r13,__LC_SVC_NEW_PSW+4 176 l %r13,__LC_SVC_NEW_PSW+4
177 lhi %r14,_PIF_SYSCALL 177 lhi %r14,_PIF_SYSCALL
178sysc_per: 178.Lsysc_per:
179 l %r15,__LC_KERNEL_STACK 179 l %r15,__LC_KERNEL_STACK
180 la %r11,STACK_FRAME_OVERHEAD(%r15) # pointer to pt_regs 180 la %r11,STACK_FRAME_OVERHEAD(%r15) # pointer to pt_regs
181sysc_vtime: 181.Lsysc_vtime:
182 UPDATE_VTIME %r8,%r9,__LC_SYNC_ENTER_TIMER 182 UPDATE_VTIME %r8,%r9,__LC_SYNC_ENTER_TIMER
183 stm %r0,%r7,__PT_R0(%r11) 183 stm %r0,%r7,__PT_R0(%r11)
184 mvc __PT_R8(32,%r11),__LC_SAVE_AREA_SYNC 184 mvc __PT_R8(32,%r11),__LC_SAVE_AREA_SYNC
185 mvc __PT_PSW(8,%r11),__LC_SVC_OLD_PSW 185 mvc __PT_PSW(8,%r11),__LC_SVC_OLD_PSW
186 mvc __PT_INT_CODE(4,%r11),__LC_SVC_ILC 186 mvc __PT_INT_CODE(4,%r11),__LC_SVC_ILC
187 st %r14,__PT_FLAGS(%r11) 187 st %r14,__PT_FLAGS(%r11)
188sysc_do_svc: 188.Lsysc_do_svc:
189 l %r10,__TI_sysc_table(%r12) # 31 bit system call table 189 l %r10,__TI_sysc_table(%r12) # 31 bit system call table
190 lh %r8,__PT_INT_CODE+2(%r11) 190 lh %r8,__PT_INT_CODE+2(%r11)
191 sla %r8,2 # shift and test for svc0 191 sla %r8,2 # shift and test for svc0
192 jnz sysc_nr_ok 192 jnz .Lsysc_nr_ok
193 # svc 0: system call number in %r1 193 # svc 0: system call number in %r1
194 cl %r1,BASED(.Lnr_syscalls) 194 cl %r1,BASED(.Lnr_syscalls)
195 jnl sysc_nr_ok 195 jnl .Lsysc_nr_ok
196 sth %r1,__PT_INT_CODE+2(%r11) 196 sth %r1,__PT_INT_CODE+2(%r11)
197 lr %r8,%r1 197 lr %r8,%r1
198 sla %r8,2 198 sla %r8,2
199sysc_nr_ok: 199.Lsysc_nr_ok:
200 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 200 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
201 st %r2,__PT_ORIG_GPR2(%r11) 201 st %r2,__PT_ORIG_GPR2(%r11)
202 st %r7,STACK_FRAME_OVERHEAD(%r15) 202 st %r7,STACK_FRAME_OVERHEAD(%r15)
203 l %r9,0(%r8,%r10) # get system call addr. 203 l %r9,0(%r8,%r10) # get system call addr.
204 tm __TI_flags+3(%r12),_TIF_TRACE 204 tm __TI_flags+3(%r12),_TIF_TRACE
205 jnz sysc_tracesys 205 jnz .Lsysc_tracesys
206 basr %r14,%r9 # call sys_xxxx 206 basr %r14,%r9 # call sys_xxxx
207 st %r2,__PT_R2(%r11) # store return value 207 st %r2,__PT_R2(%r11) # store return value
208 208
209sysc_return: 209.Lsysc_return:
210 LOCKDEP_SYS_EXIT 210 LOCKDEP_SYS_EXIT
211sysc_tif: 211.Lsysc_tif:
212 tm __PT_PSW+1(%r11),0x01 # returning to user ? 212 tm __PT_PSW+1(%r11),0x01 # returning to user ?
213 jno sysc_restore 213 jno .Lsysc_restore
214 tm __PT_FLAGS+3(%r11),_PIF_WORK 214 tm __PT_FLAGS+3(%r11),_PIF_WORK
215 jnz sysc_work 215 jnz .Lsysc_work
216 tm __TI_flags+3(%r12),_TIF_WORK 216 tm __TI_flags+3(%r12),_TIF_WORK
217 jnz sysc_work # check for thread work 217 jnz .Lsysc_work # check for thread work
218 tm __LC_CPU_FLAGS+3,_CIF_WORK 218 tm __LC_CPU_FLAGS+3,_CIF_WORK
219 jnz sysc_work 219 jnz .Lsysc_work
220sysc_restore: 220.Lsysc_restore:
221 mvc __LC_RETURN_PSW(8),__PT_PSW(%r11) 221 mvc __LC_RETURN_PSW(8),__PT_PSW(%r11)
222 stpt __LC_EXIT_TIMER 222 stpt __LC_EXIT_TIMER
223 lm %r0,%r15,__PT_R0(%r11) 223 lm %r0,%r15,__PT_R0(%r11)
224 lpsw __LC_RETURN_PSW 224 lpsw __LC_RETURN_PSW
225sysc_done: 225.Lsysc_done:
226 226
227# 227#
228# One of the work bits is on. Find out which one. 228# One of the work bits is on. Find out which one.
229# 229#
230sysc_work: 230.Lsysc_work:
231 tm __LC_CPU_FLAGS+3,_CIF_MCCK_PENDING 231 tm __LC_CPU_FLAGS+3,_CIF_MCCK_PENDING
232 jo sysc_mcck_pending 232 jo .Lsysc_mcck_pending
233 tm __TI_flags+3(%r12),_TIF_NEED_RESCHED 233 tm __TI_flags+3(%r12),_TIF_NEED_RESCHED
234 jo sysc_reschedule 234 jo .Lsysc_reschedule
235 tm __PT_FLAGS+3(%r11),_PIF_PER_TRAP 235 tm __PT_FLAGS+3(%r11),_PIF_PER_TRAP
236 jo sysc_singlestep 236 jo .Lsysc_singlestep
237 tm __TI_flags+3(%r12),_TIF_SIGPENDING 237 tm __TI_flags+3(%r12),_TIF_SIGPENDING
238 jo sysc_sigpending 238 jo .Lsysc_sigpending
239 tm __TI_flags+3(%r12),_TIF_NOTIFY_RESUME 239 tm __TI_flags+3(%r12),_TIF_NOTIFY_RESUME
240 jo sysc_notify_resume 240 jo .Lsysc_notify_resume
241 tm __LC_CPU_FLAGS+3,_CIF_ASCE 241 tm __LC_CPU_FLAGS+3,_CIF_ASCE
242 jo sysc_uaccess 242 jo .Lsysc_uaccess
243 j sysc_return # beware of critical section cleanup 243 j .Lsysc_return # beware of critical section cleanup
244 244
245# 245#
246# _TIF_NEED_RESCHED is set, call schedule 246# _TIF_NEED_RESCHED is set, call schedule
247# 247#
248sysc_reschedule: 248.Lsysc_reschedule:
249 l %r1,BASED(.Lschedule) 249 l %r1,BASED(.Lc_schedule)
250 la %r14,BASED(sysc_return) 250 la %r14,BASED(.Lsysc_return)
251 br %r1 # call schedule 251 br %r1 # call schedule
252 252
253# 253#
254# _CIF_MCCK_PENDING is set, call handler 254# _CIF_MCCK_PENDING is set, call handler
255# 255#
256sysc_mcck_pending: 256.Lsysc_mcck_pending:
257 l %r1,BASED(.Lhandle_mcck) 257 l %r1,BASED(.Lc_handle_mcck)
258 la %r14,BASED(sysc_return) 258 la %r14,BASED(.Lsysc_return)
259 br %r1 # TIF bit will be cleared by handler 259 br %r1 # TIF bit will be cleared by handler
260 260
261# 261#
262# _CIF_ASCE is set, load user space asce 262# _CIF_ASCE is set, load user space asce
263# 263#
264sysc_uaccess: 264.Lsysc_uaccess:
265 ni __LC_CPU_FLAGS+3,255-_CIF_ASCE 265 ni __LC_CPU_FLAGS+3,255-_CIF_ASCE
266 lctl %c1,%c1,__LC_USER_ASCE # load primary asce 266 lctl %c1,%c1,__LC_USER_ASCE # load primary asce
267 j sysc_return 267 j .Lsysc_return
268 268
269# 269#
270# _TIF_SIGPENDING is set, call do_signal 270# _TIF_SIGPENDING is set, call do_signal
271# 271#
272sysc_sigpending: 272.Lsysc_sigpending:
273 lr %r2,%r11 # pass pointer to pt_regs 273 lr %r2,%r11 # pass pointer to pt_regs
274 l %r1,BASED(.Ldo_signal) 274 l %r1,BASED(.Lc_do_signal)
275 basr %r14,%r1 # call do_signal 275 basr %r14,%r1 # call do_signal
276 tm __PT_FLAGS+3(%r11),_PIF_SYSCALL 276 tm __PT_FLAGS+3(%r11),_PIF_SYSCALL
277 jno sysc_return 277 jno .Lsysc_return
278 lm %r2,%r7,__PT_R2(%r11) # load svc arguments 278 lm %r2,%r7,__PT_R2(%r11) # load svc arguments
279 l %r10,__TI_sysc_table(%r12) # 31 bit system call table 279 l %r10,__TI_sysc_table(%r12) # 31 bit system call table
280 xr %r8,%r8 # svc 0 returns -ENOSYS 280 xr %r8,%r8 # svc 0 returns -ENOSYS
281 clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2) 281 clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2)
282 jnl sysc_nr_ok # invalid svc number -> do svc 0 282 jnl .Lsysc_nr_ok # invalid svc number -> do svc 0
283 lh %r8,__PT_INT_CODE+2(%r11) # load new svc number 283 lh %r8,__PT_INT_CODE+2(%r11) # load new svc number
284 sla %r8,2 284 sla %r8,2
285 j sysc_nr_ok # restart svc 285 j .Lsysc_nr_ok # restart svc
286 286
287# 287#
288# _TIF_NOTIFY_RESUME is set, call do_notify_resume 288# _TIF_NOTIFY_RESUME is set, call do_notify_resume
289# 289#
290sysc_notify_resume: 290.Lsysc_notify_resume:
291 lr %r2,%r11 # pass pointer to pt_regs 291 lr %r2,%r11 # pass pointer to pt_regs
292 l %r1,BASED(.Ldo_notify_resume) 292 l %r1,BASED(.Lc_do_notify_resume)
293 la %r14,BASED(sysc_return) 293 la %r14,BASED(.Lsysc_return)
294 br %r1 # call do_notify_resume 294 br %r1 # call do_notify_resume
295 295
296# 296#
297# _PIF_PER_TRAP is set, call do_per_trap 297# _PIF_PER_TRAP is set, call do_per_trap
298# 298#
299sysc_singlestep: 299.Lsysc_singlestep:
300 ni __PT_FLAGS+3(%r11),255-_PIF_PER_TRAP 300 ni __PT_FLAGS+3(%r11),255-_PIF_PER_TRAP
301 lr %r2,%r11 # pass pointer to pt_regs 301 lr %r2,%r11 # pass pointer to pt_regs
302 l %r1,BASED(.Ldo_per_trap) 302 l %r1,BASED(.Lc_do_per_trap)
303 la %r14,BASED(sysc_return) 303 la %r14,BASED(.Lsysc_return)
304 br %r1 # call do_per_trap 304 br %r1 # call do_per_trap
305 305
306# 306#
307# call tracehook_report_syscall_entry/tracehook_report_syscall_exit before 307# call tracehook_report_syscall_entry/tracehook_report_syscall_exit before
308# and after the system call 308# and after the system call
309# 309#
310sysc_tracesys: 310.Lsysc_tracesys:
311 l %r1,BASED(.Ltrace_enter) 311 l %r1,BASED(.Lc_trace_enter)
312 lr %r2,%r11 # pass pointer to pt_regs 312 lr %r2,%r11 # pass pointer to pt_regs
313 la %r3,0 313 la %r3,0
314 xr %r0,%r0 314 xr %r0,%r0
@@ -316,22 +316,22 @@ sysc_tracesys:
316 st %r0,__PT_R2(%r11) 316 st %r0,__PT_R2(%r11)
317 basr %r14,%r1 # call do_syscall_trace_enter 317 basr %r14,%r1 # call do_syscall_trace_enter
318 cl %r2,BASED(.Lnr_syscalls) 318 cl %r2,BASED(.Lnr_syscalls)
319 jnl sysc_tracenogo 319 jnl .Lsysc_tracenogo
320 lr %r8,%r2 320 lr %r8,%r2
321 sll %r8,2 321 sll %r8,2
322 l %r9,0(%r8,%r10) 322 l %r9,0(%r8,%r10)
323sysc_tracego: 323.Lsysc_tracego:
324 lm %r3,%r7,__PT_R3(%r11) 324 lm %r3,%r7,__PT_R3(%r11)
325 st %r7,STACK_FRAME_OVERHEAD(%r15) 325 st %r7,STACK_FRAME_OVERHEAD(%r15)
326 l %r2,__PT_ORIG_GPR2(%r11) 326 l %r2,__PT_ORIG_GPR2(%r11)
327 basr %r14,%r9 # call sys_xxx 327 basr %r14,%r9 # call sys_xxx
328 st %r2,__PT_R2(%r11) # store return value 328 st %r2,__PT_R2(%r11) # store return value
329sysc_tracenogo: 329.Lsysc_tracenogo:
330 tm __TI_flags+3(%r12),_TIF_TRACE 330 tm __TI_flags+3(%r12),_TIF_TRACE
331 jz sysc_return 331 jz .Lsysc_return
332 l %r1,BASED(.Ltrace_exit) 332 l %r1,BASED(.Lc_trace_exit)
333 lr %r2,%r11 # pass pointer to pt_regs 333 lr %r2,%r11 # pass pointer to pt_regs
334 la %r14,BASED(sysc_return) 334 la %r14,BASED(.Lsysc_return)
335 br %r1 # call do_syscall_trace_exit 335 br %r1 # call do_syscall_trace_exit
336 336
337# 337#
@@ -341,18 +341,18 @@ ENTRY(ret_from_fork)
341 la %r11,STACK_FRAME_OVERHEAD(%r15) 341 la %r11,STACK_FRAME_OVERHEAD(%r15)
342 l %r12,__LC_THREAD_INFO 342 l %r12,__LC_THREAD_INFO
343 l %r13,__LC_SVC_NEW_PSW+4 343 l %r13,__LC_SVC_NEW_PSW+4
344 l %r1,BASED(.Lschedule_tail) 344 l %r1,BASED(.Lc_schedule_tail)
345 basr %r14,%r1 # call schedule_tail 345 basr %r14,%r1 # call schedule_tail
346 TRACE_IRQS_ON 346 TRACE_IRQS_ON
347 ssm __LC_SVC_NEW_PSW # reenable interrupts 347 ssm __LC_SVC_NEW_PSW # reenable interrupts
348 tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ? 348 tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ?
349 jne sysc_tracenogo 349 jne .Lsysc_tracenogo
350 # it's a kernel thread 350 # it's a kernel thread
351 lm %r9,%r10,__PT_R9(%r11) # load gprs 351 lm %r9,%r10,__PT_R9(%r11) # load gprs
352ENTRY(kernel_thread_starter) 352ENTRY(kernel_thread_starter)
353 la %r2,0(%r10) 353 la %r2,0(%r10)
354 basr %r14,%r9 354 basr %r14,%r9
355 j sysc_tracenogo 355 j .Lsysc_tracenogo
356 356
357/* 357/*
358 * Program check handler routine 358 * Program check handler routine
@@ -369,7 +369,7 @@ ENTRY(pgm_check_handler)
369 tmh %r8,0x4000 # PER bit set in old PSW ? 369 tmh %r8,0x4000 # PER bit set in old PSW ?
370 jnz 0f # -> enabled, can't be a double fault 370 jnz 0f # -> enabled, can't be a double fault
371 tm __LC_PGM_ILC+3,0x80 # check for per exception 371 tm __LC_PGM_ILC+3,0x80 # check for per exception
372 jnz pgm_svcper # -> single stepped svc 372 jnz .Lpgm_svcper # -> single stepped svc
3730: CHECK_STACK STACK_SIZE,__LC_SAVE_AREA_SYNC 3730: CHECK_STACK STACK_SIZE,__LC_SAVE_AREA_SYNC
374 ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE) 374 ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
375 j 2f 375 j 2f
@@ -386,42 +386,42 @@ ENTRY(pgm_check_handler)
386 jz 0f 386 jz 0f
387 l %r1,__TI_task(%r12) 387 l %r1,__TI_task(%r12)
388 tmh %r8,0x0001 # kernel per event ? 388 tmh %r8,0x0001 # kernel per event ?
389 jz pgm_kprobe 389 jz .Lpgm_kprobe
390 oi __PT_FLAGS+3(%r11),_PIF_PER_TRAP 390 oi __PT_FLAGS+3(%r11),_PIF_PER_TRAP
391 mvc __THREAD_per_address(4,%r1),__LC_PER_ADDRESS 391 mvc __THREAD_per_address(4,%r1),__LC_PER_ADDRESS
392 mvc __THREAD_per_cause(2,%r1),__LC_PER_CODE 392 mvc __THREAD_per_cause(2,%r1),__LC_PER_CODE
393 mvc __THREAD_per_paid(1,%r1),__LC_PER_ACCESS_ID 393 mvc __THREAD_per_paid(1,%r1),__LC_PER_ACCESS_ID
3940: REENABLE_IRQS 3940: REENABLE_IRQS
395 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 395 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
396 l %r1,BASED(.Ljump_table) 396 l %r1,BASED(.Lc_jump_table)
397 la %r10,0x7f 397 la %r10,0x7f
398 n %r10,__PT_INT_CODE(%r11) 398 n %r10,__PT_INT_CODE(%r11)
399 je sysc_return 399 je .Lsysc_return
400 sll %r10,2 400 sll %r10,2
401 l %r1,0(%r10,%r1) # load address of handler routine 401 l %r1,0(%r10,%r1) # load address of handler routine
402 lr %r2,%r11 # pass pointer to pt_regs 402 lr %r2,%r11 # pass pointer to pt_regs
403 basr %r14,%r1 # branch to interrupt-handler 403 basr %r14,%r1 # branch to interrupt-handler
404 j sysc_return 404 j .Lsysc_return
405 405
406# 406#
407# PER event in supervisor state, must be kprobes 407# PER event in supervisor state, must be kprobes
408# 408#
409pgm_kprobe: 409.Lpgm_kprobe:
410 REENABLE_IRQS 410 REENABLE_IRQS
411 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 411 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
412 l %r1,BASED(.Ldo_per_trap) 412 l %r1,BASED(.Lc_do_per_trap)
413 lr %r2,%r11 # pass pointer to pt_regs 413 lr %r2,%r11 # pass pointer to pt_regs
414 basr %r14,%r1 # call do_per_trap 414 basr %r14,%r1 # call do_per_trap
415 j sysc_return 415 j .Lsysc_return
416 416
417# 417#
418# single stepped system call 418# single stepped system call
419# 419#
420pgm_svcper: 420.Lpgm_svcper:
421 mvc __LC_RETURN_PSW(4),__LC_SVC_NEW_PSW 421 mvc __LC_RETURN_PSW(4),__LC_SVC_NEW_PSW
422 mvc __LC_RETURN_PSW+4(4),BASED(.Lsysc_per) 422 mvc __LC_RETURN_PSW+4(4),BASED(.Lc_sysc_per)
423 lhi %r14,_PIF_SYSCALL | _PIF_PER_TRAP 423 lhi %r14,_PIF_SYSCALL | _PIF_PER_TRAP
424 lpsw __LC_RETURN_PSW # branch to sysc_per and enable irqs 424 lpsw __LC_RETURN_PSW # branch to .Lsysc_per and enable irqs
425 425
426/* 426/*
427 * IO interrupt handler routine 427 * IO interrupt handler routine
@@ -435,9 +435,9 @@ ENTRY(io_int_handler)
435 l %r13,__LC_SVC_NEW_PSW+4 435 l %r13,__LC_SVC_NEW_PSW+4
436 lm %r8,%r9,__LC_IO_OLD_PSW 436 lm %r8,%r9,__LC_IO_OLD_PSW
437 tmh %r8,0x0001 # interrupting from user ? 437 tmh %r8,0x0001 # interrupting from user ?
438 jz io_skip 438 jz .Lio_skip
439 UPDATE_VTIME %r14,%r15,__LC_ASYNC_ENTER_TIMER 439 UPDATE_VTIME %r14,%r15,__LC_ASYNC_ENTER_TIMER
440io_skip: 440.Lio_skip:
441 SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_STACK,STACK_SHIFT 441 SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_STACK,STACK_SHIFT
442 stm %r0,%r7,__PT_R0(%r11) 442 stm %r0,%r7,__PT_R0(%r11)
443 mvc __PT_R8(32,%r11),__LC_SAVE_AREA_ASYNC 443 mvc __PT_R8(32,%r11),__LC_SAVE_AREA_ASYNC
@@ -446,35 +446,35 @@ io_skip:
446 xc __PT_FLAGS(4,%r11),__PT_FLAGS(%r11) 446 xc __PT_FLAGS(4,%r11),__PT_FLAGS(%r11)
447 TRACE_IRQS_OFF 447 TRACE_IRQS_OFF
448 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 448 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
449io_loop: 449.Lio_loop:
450 l %r1,BASED(.Ldo_IRQ) 450 l %r1,BASED(.Lc_do_IRQ)
451 lr %r2,%r11 # pass pointer to pt_regs 451 lr %r2,%r11 # pass pointer to pt_regs
452 lhi %r3,IO_INTERRUPT 452 lhi %r3,IO_INTERRUPT
453 tm __PT_INT_CODE+8(%r11),0x80 # adapter interrupt ? 453 tm __PT_INT_CODE+8(%r11),0x80 # adapter interrupt ?
454 jz io_call 454 jz .Lio_call
455 lhi %r3,THIN_INTERRUPT 455 lhi %r3,THIN_INTERRUPT
456io_call: 456.Lio_call:
457 basr %r14,%r1 # call do_IRQ 457 basr %r14,%r1 # call do_IRQ
458 tm __LC_MACHINE_FLAGS+2,0x10 # MACHINE_FLAG_LPAR 458 tm __LC_MACHINE_FLAGS+2,0x10 # MACHINE_FLAG_LPAR
459 jz io_return 459 jz .Lio_return
460 tpi 0 460 tpi 0
461 jz io_return 461 jz .Lio_return
462 mvc __PT_INT_CODE(12,%r11),__LC_SUBCHANNEL_ID 462 mvc __PT_INT_CODE(12,%r11),__LC_SUBCHANNEL_ID
463 j io_loop 463 j .Lio_loop
464io_return: 464.Lio_return:
465 LOCKDEP_SYS_EXIT 465 LOCKDEP_SYS_EXIT
466 TRACE_IRQS_ON 466 TRACE_IRQS_ON
467io_tif: 467.Lio_tif:
468 tm __TI_flags+3(%r12),_TIF_WORK 468 tm __TI_flags+3(%r12),_TIF_WORK
469 jnz io_work # there is work to do (signals etc.) 469 jnz .Lio_work # there is work to do (signals etc.)
470 tm __LC_CPU_FLAGS+3,_CIF_WORK 470 tm __LC_CPU_FLAGS+3,_CIF_WORK
471 jnz io_work 471 jnz .Lio_work
472io_restore: 472.Lio_restore:
473 mvc __LC_RETURN_PSW(8),__PT_PSW(%r11) 473 mvc __LC_RETURN_PSW(8),__PT_PSW(%r11)
474 stpt __LC_EXIT_TIMER 474 stpt __LC_EXIT_TIMER
475 lm %r0,%r15,__PT_R0(%r11) 475 lm %r0,%r15,__PT_R0(%r11)
476 lpsw __LC_RETURN_PSW 476 lpsw __LC_RETURN_PSW
477io_done: 477.Lio_done:
478 478
479# 479#
480# There is work todo, find out in which context we have been interrupted: 480# There is work todo, find out in which context we have been interrupted:
@@ -483,15 +483,15 @@ io_done:
483# the preemption counter and if it is zero call preempt_schedule_irq 483# the preemption counter and if it is zero call preempt_schedule_irq
484# Before any work can be done, a switch to the kernel stack is required. 484# Before any work can be done, a switch to the kernel stack is required.
485# 485#
486io_work: 486.Lio_work:
487 tm __PT_PSW+1(%r11),0x01 # returning to user ? 487 tm __PT_PSW+1(%r11),0x01 # returning to user ?
488 jo io_work_user # yes -> do resched & signal 488 jo .Lio_work_user # yes -> do resched & signal
489#ifdef CONFIG_PREEMPT 489#ifdef CONFIG_PREEMPT
490 # check for preemptive scheduling 490 # check for preemptive scheduling
491 icm %r0,15,__TI_precount(%r12) 491 icm %r0,15,__TI_precount(%r12)
492 jnz io_restore # preemption disabled 492 jnz .Lio_restore # preemption disabled
493 tm __TI_flags+3(%r12),_TIF_NEED_RESCHED 493 tm __TI_flags+3(%r12),_TIF_NEED_RESCHED
494 jno io_restore 494 jno .Lio_restore
495 # switch to kernel stack 495 # switch to kernel stack
496 l %r1,__PT_R15(%r11) 496 l %r1,__PT_R15(%r11)
497 ahi %r1,-(STACK_FRAME_OVERHEAD + __PT_SIZE) 497 ahi %r1,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
@@ -499,20 +499,20 @@ io_work:
499 xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1) 499 xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1)
500 la %r11,STACK_FRAME_OVERHEAD(%r1) 500 la %r11,STACK_FRAME_OVERHEAD(%r1)
501 lr %r15,%r1 501 lr %r15,%r1
502 # TRACE_IRQS_ON already done at io_return, call 502 # TRACE_IRQS_ON already done at .Lio_return, call
503 # TRACE_IRQS_OFF to keep things symmetrical 503 # TRACE_IRQS_OFF to keep things symmetrical
504 TRACE_IRQS_OFF 504 TRACE_IRQS_OFF
505 l %r1,BASED(.Lpreempt_irq) 505 l %r1,BASED(.Lc_preempt_irq)
506 basr %r14,%r1 # call preempt_schedule_irq 506 basr %r14,%r1 # call preempt_schedule_irq
507 j io_return 507 j .Lio_return
508#else 508#else
509 j io_restore 509 j .Lio_restore
510#endif 510#endif
511 511
512# 512#
513# Need to do work before returning to userspace, switch to kernel stack 513# Need to do work before returning to userspace, switch to kernel stack
514# 514#
515io_work_user: 515.Lio_work_user:
516 l %r1,__LC_KERNEL_STACK 516 l %r1,__LC_KERNEL_STACK
517 mvc STACK_FRAME_OVERHEAD(__PT_SIZE,%r1),0(%r11) 517 mvc STACK_FRAME_OVERHEAD(__PT_SIZE,%r1),0(%r11)
518 xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1) 518 xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1)
@@ -522,74 +522,74 @@ io_work_user:
522# 522#
523# One of the work bits is on. Find out which one. 523# One of the work bits is on. Find out which one.
524# 524#
525io_work_tif: 525.Lio_work_tif:
526 tm __LC_CPU_FLAGS+3(%r12),_CIF_MCCK_PENDING 526 tm __LC_CPU_FLAGS+3(%r12),_CIF_MCCK_PENDING
527 jo io_mcck_pending 527 jo .Lio_mcck_pending
528 tm __TI_flags+3(%r12),_TIF_NEED_RESCHED 528 tm __TI_flags+3(%r12),_TIF_NEED_RESCHED
529 jo io_reschedule 529 jo .Lio_reschedule
530 tm __TI_flags+3(%r12),_TIF_SIGPENDING 530 tm __TI_flags+3(%r12),_TIF_SIGPENDING
531 jo io_sigpending 531 jo .Lio_sigpending
532 tm __TI_flags+3(%r12),_TIF_NOTIFY_RESUME 532 tm __TI_flags+3(%r12),_TIF_NOTIFY_RESUME
533 jo io_notify_resume 533 jo .Lio_notify_resume
534 tm __LC_CPU_FLAGS+3,_CIF_ASCE 534 tm __LC_CPU_FLAGS+3,_CIF_ASCE
535 jo io_uaccess 535 jo .Lio_uaccess
536 j io_return # beware of critical section cleanup 536 j .Lio_return # beware of critical section cleanup
537 537
538# 538#
539# _CIF_MCCK_PENDING is set, call handler 539# _CIF_MCCK_PENDING is set, call handler
540# 540#
541io_mcck_pending: 541.Lio_mcck_pending:
542 # TRACE_IRQS_ON already done at io_return 542 # TRACE_IRQS_ON already done at .Lio_return
543 l %r1,BASED(.Lhandle_mcck) 543 l %r1,BASED(.Lc_handle_mcck)
544 basr %r14,%r1 # TIF bit will be cleared by handler 544 basr %r14,%r1 # TIF bit will be cleared by handler
545 TRACE_IRQS_OFF 545 TRACE_IRQS_OFF
546 j io_return 546 j .Lio_return
547 547
548# 548#
549# _CIF_ASCE is set, load user space asce 549# _CIF_ASCE is set, load user space asce
550# 550#
551io_uaccess: 551.Lio_uaccess:
552 ni __LC_CPU_FLAGS+3,255-_CIF_ASCE 552 ni __LC_CPU_FLAGS+3,255-_CIF_ASCE
553 lctl %c1,%c1,__LC_USER_ASCE # load primary asce 553 lctl %c1,%c1,__LC_USER_ASCE # load primary asce
554 j io_return 554 j .Lio_return
555 555
556# 556#
557# _TIF_NEED_RESCHED is set, call schedule 557# _TIF_NEED_RESCHED is set, call schedule
558# 558#
559io_reschedule: 559.Lio_reschedule:
560 # TRACE_IRQS_ON already done at io_return 560 # TRACE_IRQS_ON already done at .Lio_return
561 l %r1,BASED(.Lschedule) 561 l %r1,BASED(.Lc_schedule)
562 ssm __LC_SVC_NEW_PSW # reenable interrupts 562 ssm __LC_SVC_NEW_PSW # reenable interrupts
563 basr %r14,%r1 # call scheduler 563 basr %r14,%r1 # call scheduler
564 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts 564 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
565 TRACE_IRQS_OFF 565 TRACE_IRQS_OFF
566 j io_return 566 j .Lio_return
567 567
568# 568#
569# _TIF_SIGPENDING is set, call do_signal 569# _TIF_SIGPENDING is set, call do_signal
570# 570#
571io_sigpending: 571.Lio_sigpending:
572 # TRACE_IRQS_ON already done at io_return 572 # TRACE_IRQS_ON already done at .Lio_return
573 l %r1,BASED(.Ldo_signal) 573 l %r1,BASED(.Lc_do_signal)
574 ssm __LC_SVC_NEW_PSW # reenable interrupts 574 ssm __LC_SVC_NEW_PSW # reenable interrupts
575 lr %r2,%r11 # pass pointer to pt_regs 575 lr %r2,%r11 # pass pointer to pt_regs
576 basr %r14,%r1 # call do_signal 576 basr %r14,%r1 # call do_signal
577 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts 577 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
578 TRACE_IRQS_OFF 578 TRACE_IRQS_OFF
579 j io_return 579 j .Lio_return
580 580
581# 581#
582# _TIF_SIGPENDING is set, call do_signal 582# _TIF_SIGPENDING is set, call do_signal
583# 583#
584io_notify_resume: 584.Lio_notify_resume:
585 # TRACE_IRQS_ON already done at io_return 585 # TRACE_IRQS_ON already done at .Lio_return
586 l %r1,BASED(.Ldo_notify_resume) 586 l %r1,BASED(.Lc_do_notify_resume)
587 ssm __LC_SVC_NEW_PSW # reenable interrupts 587 ssm __LC_SVC_NEW_PSW # reenable interrupts
588 lr %r2,%r11 # pass pointer to pt_regs 588 lr %r2,%r11 # pass pointer to pt_regs
589 basr %r14,%r1 # call do_notify_resume 589 basr %r14,%r1 # call do_notify_resume
590 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts 590 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
591 TRACE_IRQS_OFF 591 TRACE_IRQS_OFF
592 j io_return 592 j .Lio_return
593 593
594/* 594/*
595 * External interrupt handler routine 595 * External interrupt handler routine
@@ -603,9 +603,9 @@ ENTRY(ext_int_handler)
603 l %r13,__LC_SVC_NEW_PSW+4 603 l %r13,__LC_SVC_NEW_PSW+4
604 lm %r8,%r9,__LC_EXT_OLD_PSW 604 lm %r8,%r9,__LC_EXT_OLD_PSW
605 tmh %r8,0x0001 # interrupting from user ? 605 tmh %r8,0x0001 # interrupting from user ?
606 jz ext_skip 606 jz .Lext_skip
607 UPDATE_VTIME %r14,%r15,__LC_ASYNC_ENTER_TIMER 607 UPDATE_VTIME %r14,%r15,__LC_ASYNC_ENTER_TIMER
608ext_skip: 608.Lext_skip:
609 SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_STACK,STACK_SHIFT 609 SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_STACK,STACK_SHIFT
610 stm %r0,%r7,__PT_R0(%r11) 610 stm %r0,%r7,__PT_R0(%r11)
611 mvc __PT_R8(32,%r11),__LC_SAVE_AREA_ASYNC 611 mvc __PT_R8(32,%r11),__LC_SAVE_AREA_ASYNC
@@ -614,29 +614,29 @@ ext_skip:
614 mvc __PT_INT_PARM(4,%r11),__LC_EXT_PARAMS 614 mvc __PT_INT_PARM(4,%r11),__LC_EXT_PARAMS
615 xc __PT_FLAGS(4,%r11),__PT_FLAGS(%r11) 615 xc __PT_FLAGS(4,%r11),__PT_FLAGS(%r11)
616 TRACE_IRQS_OFF 616 TRACE_IRQS_OFF
617 l %r1,BASED(.Ldo_IRQ) 617 l %r1,BASED(.Lc_do_IRQ)
618 lr %r2,%r11 # pass pointer to pt_regs 618 lr %r2,%r11 # pass pointer to pt_regs
619 lhi %r3,EXT_INTERRUPT 619 lhi %r3,EXT_INTERRUPT
620 basr %r14,%r1 # call do_IRQ 620 basr %r14,%r1 # call do_IRQ
621 j io_return 621 j .Lio_return
622 622
623/* 623/*
624 * Load idle PSW. The second "half" of this function is in cleanup_idle. 624 * Load idle PSW. The second "half" of this function is in .Lcleanup_idle.
625 */ 625 */
626ENTRY(psw_idle) 626ENTRY(psw_idle)
627 st %r3,__SF_EMPTY(%r15) 627 st %r3,__SF_EMPTY(%r15)
628 basr %r1,0 628 basr %r1,0
629 la %r1,psw_idle_lpsw+4-.(%r1) 629 la %r1,.Lpsw_idle_lpsw+4-.(%r1)
630 st %r1,__SF_EMPTY+4(%r15) 630 st %r1,__SF_EMPTY+4(%r15)
631 oi __SF_EMPTY+4(%r15),0x80 631 oi __SF_EMPTY+4(%r15),0x80
632 stck __CLOCK_IDLE_ENTER(%r2) 632 stck __CLOCK_IDLE_ENTER(%r2)
633 stpt __TIMER_IDLE_ENTER(%r2) 633 stpt __TIMER_IDLE_ENTER(%r2)
634psw_idle_lpsw: 634.Lpsw_idle_lpsw:
635 lpsw __SF_EMPTY(%r15) 635 lpsw __SF_EMPTY(%r15)
636 br %r14 636 br %r14
637psw_idle_end: 637.Lpsw_idle_end:
638 638
639__critical_end: 639.L__critical_end:
640 640
641/* 641/*
642 * Machine check handler routines 642 * Machine check handler routines
@@ -650,7 +650,7 @@ ENTRY(mcck_int_handler)
650 l %r13,__LC_SVC_NEW_PSW+4 650 l %r13,__LC_SVC_NEW_PSW+4
651 lm %r8,%r9,__LC_MCK_OLD_PSW 651 lm %r8,%r9,__LC_MCK_OLD_PSW
652 tm __LC_MCCK_CODE,0x80 # system damage? 652 tm __LC_MCCK_CODE,0x80 # system damage?
653 jo mcck_panic # yes -> rest of mcck code invalid 653 jo .Lmcck_panic # yes -> rest of mcck code invalid
654 la %r14,__LC_CPU_TIMER_SAVE_AREA 654 la %r14,__LC_CPU_TIMER_SAVE_AREA
655 mvc __LC_MCCK_ENTER_TIMER(8),0(%r14) 655 mvc __LC_MCCK_ENTER_TIMER(8),0(%r14)
656 tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? 656 tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid?
@@ -668,22 +668,22 @@ ENTRY(mcck_int_handler)
6682: spt 0(%r14) 6682: spt 0(%r14)
669 mvc __LC_MCCK_ENTER_TIMER(8),0(%r14) 669 mvc __LC_MCCK_ENTER_TIMER(8),0(%r14)
6703: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? 6703: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid?
671 jno mcck_panic # no -> skip cleanup critical 671 jno .Lmcck_panic # no -> skip cleanup critical
672 tm %r8,0x0001 # interrupting from user ? 672 tm %r8,0x0001 # interrupting from user ?
673 jz mcck_skip 673 jz .Lmcck_skip
674 UPDATE_VTIME %r14,%r15,__LC_MCCK_ENTER_TIMER 674 UPDATE_VTIME %r14,%r15,__LC_MCCK_ENTER_TIMER
675mcck_skip: 675.Lmcck_skip:
676 SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+32,__LC_PANIC_STACK,PAGE_SHIFT 676 SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+32,__LC_PANIC_STACK,PAGE_SHIFT
677 stm %r0,%r7,__PT_R0(%r11) 677 stm %r0,%r7,__PT_R0(%r11)
678 mvc __PT_R8(32,%r11),__LC_GPREGS_SAVE_AREA+32 678 mvc __PT_R8(32,%r11),__LC_GPREGS_SAVE_AREA+32
679 stm %r8,%r9,__PT_PSW(%r11) 679 stm %r8,%r9,__PT_PSW(%r11)
680 xc __PT_FLAGS(4,%r11),__PT_FLAGS(%r11) 680 xc __PT_FLAGS(4,%r11),__PT_FLAGS(%r11)
681 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 681 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
682 l %r1,BASED(.Ldo_machine_check) 682 l %r1,BASED(.Lc_do_machine_check)
683 lr %r2,%r11 # pass pointer to pt_regs 683 lr %r2,%r11 # pass pointer to pt_regs
684 basr %r14,%r1 # call s390_do_machine_check 684 basr %r14,%r1 # call s390_do_machine_check
685 tm __PT_PSW+1(%r11),0x01 # returning to user ? 685 tm __PT_PSW+1(%r11),0x01 # returning to user ?
686 jno mcck_return 686 jno .Lmcck_return
687 l %r1,__LC_KERNEL_STACK # switch to kernel stack 687 l %r1,__LC_KERNEL_STACK # switch to kernel stack
688 mvc STACK_FRAME_OVERHEAD(__PT_SIZE,%r1),0(%r11) 688 mvc STACK_FRAME_OVERHEAD(__PT_SIZE,%r1),0(%r11)
689 xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1) 689 xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1)
@@ -691,12 +691,12 @@ mcck_skip:
691 lr %r15,%r1 691 lr %r15,%r1
692 ssm __LC_PGM_NEW_PSW # turn dat on, keep irqs off 692 ssm __LC_PGM_NEW_PSW # turn dat on, keep irqs off
693 tm __LC_CPU_FLAGS+3,_CIF_MCCK_PENDING 693 tm __LC_CPU_FLAGS+3,_CIF_MCCK_PENDING
694 jno mcck_return 694 jno .Lmcck_return
695 TRACE_IRQS_OFF 695 TRACE_IRQS_OFF
696 l %r1,BASED(.Lhandle_mcck) 696 l %r1,BASED(.Lc_handle_mcck)
697 basr %r14,%r1 # call s390_handle_mcck 697 basr %r14,%r1 # call s390_handle_mcck
698 TRACE_IRQS_ON 698 TRACE_IRQS_ON
699mcck_return: 699.Lmcck_return:
700 mvc __LC_RETURN_MCCK_PSW(8),__PT_PSW(%r11) # move return PSW 700 mvc __LC_RETURN_MCCK_PSW(8),__PT_PSW(%r11) # move return PSW
701 tm __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ? 701 tm __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ?
702 jno 0f 702 jno 0f
@@ -706,15 +706,15 @@ mcck_return:
7060: lm %r0,%r15,__PT_R0(%r11) 7060: lm %r0,%r15,__PT_R0(%r11)
707 lpsw __LC_RETURN_MCCK_PSW 707 lpsw __LC_RETURN_MCCK_PSW
708 708
709mcck_panic: 709.Lmcck_panic:
710 l %r14,__LC_PANIC_STACK 710 l %r14,__LC_PANIC_STACK
711 slr %r14,%r15 711 slr %r14,%r15
712 sra %r14,PAGE_SHIFT 712 sra %r14,PAGE_SHIFT
713 jz 0f 713 jz 0f
714 l %r15,__LC_PANIC_STACK 714 l %r15,__LC_PANIC_STACK
715 j mcck_skip 715 j .Lmcck_skip
7160: ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE) 7160: ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
717 j mcck_skip 717 j .Lmcck_skip
718 718
719# 719#
720# PSW restart interrupt handler 720# PSW restart interrupt handler
@@ -764,58 +764,58 @@ stack_overflow:
7641: .long kernel_stack_overflow 7641: .long kernel_stack_overflow
765#endif 765#endif
766 766
767cleanup_table: 767.Lcleanup_table:
768 .long system_call + 0x80000000 768 .long system_call + 0x80000000
769 .long sysc_do_svc + 0x80000000 769 .long .Lsysc_do_svc + 0x80000000
770 .long sysc_tif + 0x80000000 770 .long .Lsysc_tif + 0x80000000
771 .long sysc_restore + 0x80000000 771 .long .Lsysc_restore + 0x80000000
772 .long sysc_done + 0x80000000 772 .long .Lsysc_done + 0x80000000
773 .long io_tif + 0x80000000 773 .long .Lio_tif + 0x80000000
774 .long io_restore + 0x80000000 774 .long .Lio_restore + 0x80000000
775 .long io_done + 0x80000000 775 .long .Lio_done + 0x80000000
776 .long psw_idle + 0x80000000 776 .long psw_idle + 0x80000000
777 .long psw_idle_end + 0x80000000 777 .long .Lpsw_idle_end + 0x80000000
778 778
779cleanup_critical: 779cleanup_critical:
780 cl %r9,BASED(cleanup_table) # system_call 780 cl %r9,BASED(.Lcleanup_table) # system_call
781 jl 0f 781 jl 0f
782 cl %r9,BASED(cleanup_table+4) # sysc_do_svc 782 cl %r9,BASED(.Lcleanup_table+4) # .Lsysc_do_svc
783 jl cleanup_system_call 783 jl .Lcleanup_system_call
784 cl %r9,BASED(cleanup_table+8) # sysc_tif 784 cl %r9,BASED(.Lcleanup_table+8) # .Lsysc_tif
785 jl 0f 785 jl 0f
786 cl %r9,BASED(cleanup_table+12) # sysc_restore 786 cl %r9,BASED(.Lcleanup_table+12) # .Lsysc_restore
787 jl cleanup_sysc_tif 787 jl .Lcleanup_sysc_tif
788 cl %r9,BASED(cleanup_table+16) # sysc_done 788 cl %r9,BASED(.Lcleanup_table+16) # .Lsysc_done
789 jl cleanup_sysc_restore 789 jl .Lcleanup_sysc_restore
790 cl %r9,BASED(cleanup_table+20) # io_tif 790 cl %r9,BASED(.Lcleanup_table+20) # .Lio_tif
791 jl 0f 791 jl 0f
792 cl %r9,BASED(cleanup_table+24) # io_restore 792 cl %r9,BASED(.Lcleanup_table+24) # .Lio_restore
793 jl cleanup_io_tif 793 jl .Lcleanup_io_tif
794 cl %r9,BASED(cleanup_table+28) # io_done 794 cl %r9,BASED(.Lcleanup_table+28) # .Lio_done
795 jl cleanup_io_restore 795 jl .Lcleanup_io_restore
796 cl %r9,BASED(cleanup_table+32) # psw_idle 796 cl %r9,BASED(.Lcleanup_table+32) # psw_idle
797 jl 0f 797 jl 0f
798 cl %r9,BASED(cleanup_table+36) # psw_idle_end 798 cl %r9,BASED(.Lcleanup_table+36) # .Lpsw_idle_end
799 jl cleanup_idle 799 jl .Lcleanup_idle
8000: br %r14 8000: br %r14
801 801
802cleanup_system_call: 802.Lcleanup_system_call:
803 # check if stpt has been executed 803 # check if stpt has been executed
804 cl %r9,BASED(cleanup_system_call_insn) 804 cl %r9,BASED(.Lcleanup_system_call_insn)
805 jh 0f 805 jh 0f
806 mvc __LC_SYNC_ENTER_TIMER(8),__LC_ASYNC_ENTER_TIMER 806 mvc __LC_SYNC_ENTER_TIMER(8),__LC_ASYNC_ENTER_TIMER
807 chi %r11,__LC_SAVE_AREA_ASYNC 807 chi %r11,__LC_SAVE_AREA_ASYNC
808 je 0f 808 je 0f
809 mvc __LC_SYNC_ENTER_TIMER(8),__LC_MCCK_ENTER_TIMER 809 mvc __LC_SYNC_ENTER_TIMER(8),__LC_MCCK_ENTER_TIMER
8100: # check if stm has been executed 8100: # check if stm has been executed
811 cl %r9,BASED(cleanup_system_call_insn+4) 811 cl %r9,BASED(.Lcleanup_system_call_insn+4)
812 jh 0f 812 jh 0f
813 mvc __LC_SAVE_AREA_SYNC(32),0(%r11) 813 mvc __LC_SAVE_AREA_SYNC(32),0(%r11)
8140: # set up saved registers r12, and r13 8140: # set up saved registers r12, and r13
815 st %r12,16(%r11) # r12 thread-info pointer 815 st %r12,16(%r11) # r12 thread-info pointer
816 st %r13,20(%r11) # r13 literal-pool pointer 816 st %r13,20(%r11) # r13 literal-pool pointer
817 # check if the user time calculation has been done 817 # check if the user time calculation has been done
818 cl %r9,BASED(cleanup_system_call_insn+8) 818 cl %r9,BASED(.Lcleanup_system_call_insn+8)
819 jh 0f 819 jh 0f
820 l %r10,__LC_EXIT_TIMER 820 l %r10,__LC_EXIT_TIMER
821 l %r15,__LC_EXIT_TIMER+4 821 l %r15,__LC_EXIT_TIMER+4
@@ -824,7 +824,7 @@ cleanup_system_call:
824 st %r10,__LC_USER_TIMER 824 st %r10,__LC_USER_TIMER
825 st %r15,__LC_USER_TIMER+4 825 st %r15,__LC_USER_TIMER+4
8260: # check if the system time calculation has been done 8260: # check if the system time calculation has been done
827 cl %r9,BASED(cleanup_system_call_insn+12) 827 cl %r9,BASED(.Lcleanup_system_call_insn+12)
828 jh 0f 828 jh 0f
829 l %r10,__LC_LAST_UPDATE_TIMER 829 l %r10,__LC_LAST_UPDATE_TIMER
830 l %r15,__LC_LAST_UPDATE_TIMER+4 830 l %r15,__LC_LAST_UPDATE_TIMER+4
@@ -848,20 +848,20 @@ cleanup_system_call:
848 # setup saved register 15 848 # setup saved register 15
849 st %r15,28(%r11) # r15 stack pointer 849 st %r15,28(%r11) # r15 stack pointer
850 # set new psw address and exit 850 # set new psw address and exit
851 l %r9,BASED(cleanup_table+4) # sysc_do_svc + 0x80000000 851 l %r9,BASED(.Lcleanup_table+4) # .Lsysc_do_svc + 0x80000000
852 br %r14 852 br %r14
853cleanup_system_call_insn: 853.Lcleanup_system_call_insn:
854 .long system_call + 0x80000000 854 .long system_call + 0x80000000
855 .long sysc_stm + 0x80000000 855 .long .Lsysc_stm + 0x80000000
856 .long sysc_vtime + 0x80000000 + 36 856 .long .Lsysc_vtime + 0x80000000 + 36
857 .long sysc_vtime + 0x80000000 + 76 857 .long .Lsysc_vtime + 0x80000000 + 76
858 858
859cleanup_sysc_tif: 859.Lcleanup_sysc_tif:
860 l %r9,BASED(cleanup_table+8) # sysc_tif + 0x80000000 860 l %r9,BASED(.Lcleanup_table+8) # .Lsysc_tif + 0x80000000
861 br %r14 861 br %r14
862 862
863cleanup_sysc_restore: 863.Lcleanup_sysc_restore:
864 cl %r9,BASED(cleanup_sysc_restore_insn) 864 cl %r9,BASED(.Lcleanup_sysc_restore_insn)
865 jhe 0f 865 jhe 0f
866 l %r9,12(%r11) # get saved pointer to pt_regs 866 l %r9,12(%r11) # get saved pointer to pt_regs
867 mvc __LC_RETURN_PSW(8),__PT_PSW(%r9) 867 mvc __LC_RETURN_PSW(8),__PT_PSW(%r9)
@@ -869,15 +869,15 @@ cleanup_sysc_restore:
869 lm %r0,%r7,__PT_R0(%r9) 869 lm %r0,%r7,__PT_R0(%r9)
8700: lm %r8,%r9,__LC_RETURN_PSW 8700: lm %r8,%r9,__LC_RETURN_PSW
871 br %r14 871 br %r14
872cleanup_sysc_restore_insn: 872.Lcleanup_sysc_restore_insn:
873 .long sysc_done - 4 + 0x80000000 873 .long .Lsysc_done - 4 + 0x80000000
874 874
875cleanup_io_tif: 875.Lcleanup_io_tif:
876 l %r9,BASED(cleanup_table+20) # io_tif + 0x80000000 876 l %r9,BASED(.Lcleanup_table+20) # .Lio_tif + 0x80000000
877 br %r14 877 br %r14
878 878
879cleanup_io_restore: 879.Lcleanup_io_restore:
880 cl %r9,BASED(cleanup_io_restore_insn) 880 cl %r9,BASED(.Lcleanup_io_restore_insn)
881 jhe 0f 881 jhe 0f
882 l %r9,12(%r11) # get saved r11 pointer to pt_regs 882 l %r9,12(%r11) # get saved r11 pointer to pt_regs
883 mvc __LC_RETURN_PSW(8),__PT_PSW(%r9) 883 mvc __LC_RETURN_PSW(8),__PT_PSW(%r9)
@@ -885,10 +885,10 @@ cleanup_io_restore:
885 lm %r0,%r7,__PT_R0(%r9) 885 lm %r0,%r7,__PT_R0(%r9)
8860: lm %r8,%r9,__LC_RETURN_PSW 8860: lm %r8,%r9,__LC_RETURN_PSW
887 br %r14 887 br %r14
888cleanup_io_restore_insn: 888.Lcleanup_io_restore_insn:
889 .long io_done - 4 + 0x80000000 889 .long .Lio_done - 4 + 0x80000000
890 890
891cleanup_idle: 891.Lcleanup_idle:
892 # copy interrupt clock & cpu timer 892 # copy interrupt clock & cpu timer
893 mvc __CLOCK_IDLE_EXIT(8,%r2),__LC_INT_CLOCK 893 mvc __CLOCK_IDLE_EXIT(8,%r2),__LC_INT_CLOCK
894 mvc __TIMER_IDLE_EXIT(8,%r2),__LC_ASYNC_ENTER_TIMER 894 mvc __TIMER_IDLE_EXIT(8,%r2),__LC_ASYNC_ENTER_TIMER
@@ -897,7 +897,7 @@ cleanup_idle:
897 mvc __CLOCK_IDLE_EXIT(8,%r2),__LC_MCCK_CLOCK 897 mvc __CLOCK_IDLE_EXIT(8,%r2),__LC_MCCK_CLOCK
898 mvc __TIMER_IDLE_EXIT(8,%r2),__LC_MCCK_ENTER_TIMER 898 mvc __TIMER_IDLE_EXIT(8,%r2),__LC_MCCK_ENTER_TIMER
8990: # check if stck has been executed 8990: # check if stck has been executed
900 cl %r9,BASED(cleanup_idle_insn) 900 cl %r9,BASED(.Lcleanup_idle_insn)
901 jhe 1f 901 jhe 1f
902 mvc __CLOCK_IDLE_ENTER(8,%r2),__CLOCK_IDLE_EXIT(%r2) 902 mvc __CLOCK_IDLE_ENTER(8,%r2),__CLOCK_IDLE_EXIT(%r2)
903 mvc __TIMER_IDLE_ENTER(8,%r2),__TIMER_IDLE_EXIT(%r3) 903 mvc __TIMER_IDLE_ENTER(8,%r2),__TIMER_IDLE_EXIT(%r3)
@@ -913,12 +913,12 @@ cleanup_idle:
913 stm %r9,%r10,__LC_SYSTEM_TIMER 913 stm %r9,%r10,__LC_SYSTEM_TIMER
914 mvc __LC_LAST_UPDATE_TIMER(8),__TIMER_IDLE_EXIT(%r2) 914 mvc __LC_LAST_UPDATE_TIMER(8),__TIMER_IDLE_EXIT(%r2)
915 # prepare return psw 915 # prepare return psw
916 n %r8,BASED(cleanup_idle_wait) # clear irq & wait state bits 916 n %r8,BASED(.Lcleanup_idle_wait) # clear irq & wait state bits
917 l %r9,24(%r11) # return from psw_idle 917 l %r9,24(%r11) # return from psw_idle
918 br %r14 918 br %r14
919cleanup_idle_insn: 919.Lcleanup_idle_insn:
920 .long psw_idle_lpsw + 0x80000000 920 .long .Lpsw_idle_lpsw + 0x80000000
921cleanup_idle_wait: 921.Lcleanup_idle_wait:
922 .long 0xfcfdffff 922 .long 0xfcfdffff
923 923
924/* 924/*
@@ -933,30 +933,30 @@ cleanup_idle_wait:
933/* 933/*
934 * Symbol constants 934 * Symbol constants
935 */ 935 */
936.Ldo_machine_check: .long s390_do_machine_check 936.Lc_do_machine_check: .long s390_do_machine_check
937.Lhandle_mcck: .long s390_handle_mcck 937.Lc_handle_mcck: .long s390_handle_mcck
938.Ldo_IRQ: .long do_IRQ 938.Lc_do_IRQ: .long do_IRQ
939.Ldo_signal: .long do_signal 939.Lc_do_signal: .long do_signal
940.Ldo_notify_resume: .long do_notify_resume 940.Lc_do_notify_resume: .long do_notify_resume
941.Ldo_per_trap: .long do_per_trap 941.Lc_do_per_trap: .long do_per_trap
942.Ljump_table: .long pgm_check_table 942.Lc_jump_table: .long pgm_check_table
943.Lschedule: .long schedule 943.Lc_schedule: .long schedule
944#ifdef CONFIG_PREEMPT 944#ifdef CONFIG_PREEMPT
945.Lpreempt_irq: .long preempt_schedule_irq 945.Lc_preempt_irq: .long preempt_schedule_irq
946#endif 946#endif
947.Ltrace_enter: .long do_syscall_trace_enter 947.Lc_trace_enter: .long do_syscall_trace_enter
948.Ltrace_exit: .long do_syscall_trace_exit 948.Lc_trace_exit: .long do_syscall_trace_exit
949.Lschedule_tail: .long schedule_tail 949.Lc_schedule_tail: .long schedule_tail
950.Lsysc_per: .long sysc_per + 0x80000000 950.Lc_sysc_per: .long .Lsysc_per + 0x80000000
951#ifdef CONFIG_TRACE_IRQFLAGS 951#ifdef CONFIG_TRACE_IRQFLAGS
952.Lhardirqs_on: .long trace_hardirqs_on_caller 952.Lc_hardirqs_on: .long trace_hardirqs_on_caller
953.Lhardirqs_off: .long trace_hardirqs_off_caller 953.Lc_hardirqs_off: .long trace_hardirqs_off_caller
954#endif 954#endif
955#ifdef CONFIG_LOCKDEP 955#ifdef CONFIG_LOCKDEP
956.Llockdep_sys_exit: .long lockdep_sys_exit 956.Lc_lockdep_sys_exit: .long lockdep_sys_exit
957#endif 957#endif
958.Lcritical_start: .long __critical_start + 0x80000000 958.Lc_critical_start: .long .L__critical_start + 0x80000000
959.Lcritical_length: .long __critical_end - __critical_start 959.Lc_critical_length: .long .L__critical_end - .L__critical_start
960 960
961 .section .rodata, "a" 961 .section .rodata, "a"
962#define SYSCALL(esa,esame,emu) .long esa 962#define SYSCALL(esa,esame,emu) .long esa