1 /* SPDX-License-Identifier: GPL-2.0 */ !! 1 /* -*- mode: asm -*- >> 2 * >> 3 * linux/arch/m68k/kernel/entry.S >> 4 * >> 5 * Copyright (C) 1991, 1992 Linus Torvalds >> 6 * >> 7 * This file is subject to the terms and conditions of the GNU General Public >> 8 * License. See the file README.legal in the main directory of this archive >> 9 * for more details. >> 10 * >> 11 * Linux/m68k support by Hamish Macdonald >> 12 * >> 13 * 68060 fixes by Jesper Skov >> 14 * >> 15 */ >> 16 2 /* 17 /* 3 * S390 low-level entry points. !! 18 * entry.S contains the system-call and fault low-level handling routines. >> 19 * This also contains the timer-interrupt handler, as well as all interrupts >> 20 * and faults that can result in a task-switch. >> 21 * >> 22 * NOTE: This code handles signal-recognition, which happens every time >> 23 * after a timer-interrupt and after each system call. 4 * 24 * 5 * Copyright IBM Corp. 1999, 2012 << 6 * Author(s): Martin Schwidefsky (schwidefs << 7 * Hartmut Penner (hp@de.ibm.com << 8 * Denis Joseph Barrow (djbarrow << 9 */ 25 */ 10 26 11 #include <linux/export.h> !! 27 /* 12 #include <linux/init.h> !! 28 * 12/03/96 Jes: Currently we only support m68k single-cpu systems, so >> 29 * all pointers that used to be 'current' are now entry >> 30 * number 0 in the 'current_set' list. >> 31 * >> 32 * 6/05/00 RZ: addedd writeback completion after return from sighandler >> 33 * for 68040 >> 34 */ >> 35 >> 36 #include <linux/sys.h> >> 37 #include <linux/config.h> 13 #include <linux/linkage.h> 38 #include <linux/linkage.h> 14 #include <asm/asm-extable.h> !! 39 #include <asm/entry.h> 15 #include <asm/alternative.h> << 16 #include <asm/processor.h> << 17 #include <asm/cache.h> << 18 #include <asm/dwarf.h> << 19 #include <asm/errno.h> 40 #include <asm/errno.h> 20 #include <asm/ptrace.h> << 21 #include <asm/thread_info.h> << 22 #include <asm/asm-offsets.h> << 23 #include <asm/unistd.h> << 24 #include <asm/page.h> << 25 #include <asm/sigp.h> << 26 #include <asm/irq.h> << 27 #include <asm/fpu-insn.h> << 28 #include <asm/setup.h> 41 #include <asm/setup.h> 29 #include <asm/nmi.h> !! 42 #include <asm/segment.h> 30 #include <asm/nospec-insn.h> !! 43 #include <asm/traps.h> 31 #include <asm/lowcore.h> << 32 << 33 _LPP_OFFSET = __LC_LPP << 34 << 35 .macro STBEAR address << 36 ALTERNATIVE "nop", ".insn s,0xb2010000 << 37 .endm << 38 << 39 .macro LBEAR address << 40 ALTERNATIVE "nop", ".insn s,0xb2000000 << 41 .endm << 42 << 43 .macro LPSWEY address, lpswe << 44 ALTERNATIVE_2 "b \lpswe;nopr", \ << 45 ".insn siy,0xeb0000000071,\add << 46 __stringify(.insn siy,0xeb0000 << 47 ALT_LOWCORE << 48 .endm << 49 << 50 .macro MBEAR reg, lowcore << 51 ALTERNATIVE "brcl 0,0", __stringify(mv << 52 ALT_FACILITY(193) << 53 .endm << 54 << 55 .macro CHECK_STACK savearea, lowcore << 56 #ifdef CONFIG_CHECK_STACK << 57 tml %r15,THREAD_SIZE - CONFIG_STAC << 58 la %r14,\savearea(\lowcore) << 59 jz stack_overflow << 60 #endif << 61 .endm << 62 44 63 .macro CHECK_VMAP_STACK savearea, low !! 45 #include "m68k_defs.h" 64 #ifdef CONFIG_VMAP_STACK << 65 lgr %r14,%r15 << 66 nill %r14,0x10000 - THREAD_SIZE << 67 oill %r14,STACK_INIT_OFFSET << 68 clg %r14,__LC_KERNEL_STACK(\lowcor << 69 je \oklabel << 70 clg %r14,__LC_ASYNC_STACK(\lowcore << 71 je \oklabel << 72 clg %r14,__LC_MCCK_STACK(\lowcore) << 73 je \oklabel << 74 clg %r14,__LC_NODAT_STACK(\lowcore << 75 je \oklabel << 76 clg %r14,__LC_RESTART_STACK(\lowco << 77 je \oklabel << 78 la %r14,\savearea(\lowcore) << 79 j stack_overflow << 80 #else << 81 j \oklabel << 82 #endif << 83 .endm << 84 46 85 /* !! 47 .globl SYMBOL_NAME(system_call), SYMBOL_NAME(buserr), SYMBOL_NAME(trap) 86 * The TSTMSK macro generates a test-u !! 48 .globl SYMBOL_NAME(resume), SYMBOL_NAME(ret_from_exception) 87 * calculating the memory offset for t !! 49 .globl SYMBOL_NAME(ret_from_signal) 88 * Mask value can be any constant. Th !! 50 .globl SYMBOL_NAME(inthandler), SYMBOL_NAME(sys_call_table) 89 * value to calculate the memory offse !! 51 .globl SYMBOL_NAME(sys_fork), SYMBOL_NAME(sys_clone), SYMBOL_NAME(sys_vfork) 90 * instruction. !! 52 .globl SYMBOL_NAME(ret_from_interrupt), SYMBOL_NAME(bad_interrupt) 91 */ !! 53 92 .macro TSTMSK addr, mask, size=8, byte !! 54 .text 93 .if (\bytepos < \size) && (\ma !! 55 ENTRY(buserr) 94 .if (\mask & 0xff) !! 56 SAVE_ALL_INT 95 .error "Mask e !! 57 GET_CURRENT(%d0) 96 .endif !! 58 movel %sp,%sp@- | stack frame pointer argument 97 TSTMSK \addr, "(\mask !! 59 bsrl SYMBOL_NAME(buserr_c) 98 .exitm !! 60 addql #4,%sp 99 .endif !! 61 jra SYMBOL_NAME(ret_from_exception) 100 .ifeq \mask !! 62 101 .error "Mask must not !! 63 ENTRY(trap) 102 .endif !! 64 SAVE_ALL_INT 103 off = \size - \bytepos - 1 !! 65 GET_CURRENT(%d0) 104 tm off+\addr, \mask !! 66 movel %sp,%sp@- | stack frame pointer argument 105 .endm !! 67 bsrl SYMBOL_NAME(trap_c) 106 !! 68 addql #4,%sp 107 .macro BPOFF !! 69 jra SYMBOL_NAME(ret_from_exception) 108 ALTERNATIVE "nop", ".insn rrf,0xb2e800 !! 70 109 .endm !! 71 ENTRY(reschedule) 110 !! 72 | save top of frame 111 .macro BPON !! 73 movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0) 112 ALTERNATIVE "nop", ".insn rrf,0xb2e800 !! 74 113 .endm !! 75 pea SYMBOL_NAME(ret_from_exception) 114 !! 76 jmp SYMBOL_NAME(schedule) 115 .macro BPENTER tif_ptr,tif_mask !! 77 116 ALTERNATIVE "TSTMSK \tif_ptr,\tif_mask !! 78 | After a fork we jump here directly from resume, 117 "j .+12; nop; nop", ALT_SP !! 79 | so that %d1 contains the previous task 118 .endm !! 80 | Theoretically only needed on SMP, but let's watch 119 !! 81 | what happens in schedule_tail() in future... 120 .macro BPEXIT tif_ptr,tif_mask !! 82 ENTRY(ret_from_fork) 121 TSTMSK \tif_ptr,\tif_mask !! 83 movel %d1,%sp@- 122 ALTERNATIVE "jz .+8; .insn rrf,0xb2e8 !! 84 jsr SYMBOL_NAME(schedule_tail) 123 "jnz .+8; .insn rrf,0xb2e8 !! 85 addql #4,%sp 124 .endm !! 86 jra SYMBOL_NAME(ret_from_exception) 125 !! 87 126 #if IS_ENABLED(CONFIG_KVM) !! 88 badsys: 127 .macro SIEEXIT sie_control,lowcore !! 89 movel #-ENOSYS,%sp@(PT_D0) 128 lg %r9,\sie_control !! 90 jra SYMBOL_NAME(ret_from_exception) 129 ni __SIE_PROG0C+3(%r9),0xfe !! 91 130 lctlg %c1,%c1,__LC_KERNEL_ASCE(\lowc !! 92 do_trace: 131 lg %r9,__LC_CURRENT(\lowcore) !! 93 movel #-ENOSYS,%sp@(PT_D0) | needed for strace 132 mvi __TI_sie(%r9),0 !! 94 subql #4,%sp 133 larl %r9,sie_exit !! 95 SAVE_SWITCH_STACK 134 .endm !! 96 jbsr SYMBOL_NAME(syscall_trace) >> 97 RESTORE_SWITCH_STACK >> 98 addql #4,%sp >> 99 movel %sp@(PT_ORIG_D0),%d1 >> 100 movel #-ENOSYS,%d0 >> 101 cmpl #NR_syscalls,%d1 >> 102 jcc 1f >> 103 jbsr @(SYMBOL_NAME(sys_call_table),%d1:l:4)@(0) >> 104 1: movel %d0,%sp@(PT_D0) | save the return value >> 105 subql #4,%sp | dummy return address >> 106 SAVE_SWITCH_STACK >> 107 jbsr SYMBOL_NAME(syscall_trace) >> 108 >> 109 SYMBOL_NAME_LABEL(ret_from_signal) >> 110 RESTORE_SWITCH_STACK >> 111 addql #4,%sp >> 112 /* on 68040 complete pending writebacks if any */ >> 113 #ifdef CONFIG_M68040 >> 114 bfextu %sp@(PT_VECTOR){#0,#4},%d0 >> 115 subql #7,%d0 | bus error frame ? >> 116 jbne 1f >> 117 movel %sp,%sp@- >> 118 jbsr SYMBOL_NAME(berr_040cleanup) >> 119 addql #4,%sp >> 120 1: >> 121 #endif >> 122 jra SYMBOL_NAME(ret_from_exception) >> 123 >> 124 ENTRY(system_call) >> 125 SAVE_ALL_SYS >> 126 >> 127 GET_CURRENT(%d1) >> 128 | save top of frame >> 129 movel %sp,%curptr@(TASK_THREAD+THREAD_ESP0) >> 130 >> 131 btst #PT_TRACESYS_BIT,%curptr@(TASK_PTRACE+PT_TRACESYS_OFF) >> 132 jne do_trace >> 133 cmpl #NR_syscalls,%d0 >> 134 jcc badsys >> 135 jbsr @(SYMBOL_NAME(sys_call_table),%d0:l:4)@(0) >> 136 movel %d0,%sp@(PT_D0) | save the return value >> 137 >> 138 SYMBOL_NAME_LABEL(ret_from_exception) >> 139 btst #5,%sp@(PT_SR) | check if returning to kernel >> 140 bnes 2f | if so, skip resched, signals >> 141 | only allow interrupts when we are really the last one on the >> 142 | kernel stack, otherwise stack overflow can occur during >> 143 | heavy interrupt load >> 144 andw #ALLOWINT,%sr >> 145 tstl %curptr@(TASK_NEEDRESCHED) >> 146 jne SYMBOL_NAME(reschedule) >> 147 #if 0 >> 148 cmpl #SYMBOL_NAME(task),%curptr | task[0] cannot have signals >> 149 jeq 2f 135 #endif 150 #endif >> 151 | check for delayed trace >> 152 bclr #PT_DTRACE_BIT,%curptr@(TASK_PTRACE+PT_DTRACE_OFF) >> 153 jne do_delayed_trace >> 154 5: >> 155 tstl %curptr@(TASK_STATE) | state >> 156 jne SYMBOL_NAME(reschedule) >> 157 >> 158 tstl %curptr@(TASK_SIGPENDING) >> 159 jne Lsignal_return >> 160 2: RESTORE_ALL >> 161 >> 162 Lsignal_return: >> 163 subql #4,%sp | dummy return address >> 164 SAVE_SWITCH_STACK >> 165 pea %sp@(SWITCH_STACK_SIZE) >> 166 clrl %sp@- >> 167 bsrl SYMBOL_NAME(do_signal) >> 168 addql #8,%sp >> 169 RESTORE_SWITCH_STACK >> 170 addql #4,%sp >> 171 RESTORE_ALL >> 172 >> 173 do_delayed_trace: >> 174 bclr #7,%sp@(PT_SR) | clear trace bit in SR >> 175 pea 1 | send SIGTRAP >> 176 movel %curptr,%sp@- >> 177 pea LSIGTRAP >> 178 jbsr SYMBOL_NAME(send_sig) >> 179 addql #8,%sp >> 180 addql #4,%sp >> 181 jra 5b >> 182 >> 183 >> 184 #if 0 >> 185 #if CONFIG_AMIGA >> 186 SYMBOL_NAME_LABEL(ami_inthandler) >> 187 addql #1,SYMBOL_NAME(irq_stat)+4 | local_irq_count >> 188 SAVE_ALL_INT >> 189 GET_CURRENT(%d0) >> 190 >> 191 bfextu %sp@(PT_VECTOR){#4,#12},%d0 >> 192 movel %d0,%a0 >> 193 addql #1,%a0@(SYMBOL_NAME(kstat)+STAT_IRQ-VECOFF(VEC_SPUR)) >> 194 movel %a0@(SYMBOL_NAME(autoirq_list)-VECOFF(VEC_SPUR)),%a0 >> 195 >> 196 | amiga vector int handler get the req mask instead of irq vector >> 197 lea CUSTOMBASE,%a1 >> 198 movew %a1@(C_INTREQR),%d0 >> 199 andw %a1@(C_INTENAR),%d0 >> 200 >> 201 | prepare stack (push frame pointer, dev_id & req mask) >> 202 pea %sp@ >> 203 movel %a0@(IRQ_DEVID),%sp@- >> 204 movel %d0,%sp@- >> 205 pea %pc@(SYMBOL_NAME(ret_from_interrupt):w) >> 206 jbra @(IRQ_HANDLER,%a0)@(0) 136 207 137 .macro STACKLEAK_ERASE !! 208 ENTRY(nmi_handler) 138 #ifdef CONFIG_GCC_PLUGIN_STACKLEAK !! 209 rte 139 brasl %r14,stackleak_erase_on_task_s !! 210 #endif 140 #endif 211 #endif 141 .endm << 142 212 143 GEN_BR_THUNK %r14 !! 213 /* >> 214 ** This is the main interrupt handler, responsible for calling process_int() >> 215 */ >> 216 SYMBOL_NAME_LABEL(inthandler) >> 217 SAVE_ALL_INT >> 218 GET_CURRENT(%d0) >> 219 addql #1,SYMBOL_NAME(irq_stat)+4 | local_irq_count >> 220 | put exception # in d0 >> 221 bfextu %sp@(PT_VECTOR){#4,#10},%d0 >> 222 >> 223 movel %sp,%sp@- >> 224 movel %d0,%sp@- | put vector # on stack >> 225 #if defined(MACH_Q40_ONLY) && defined(CONFIG_BLK_DEV_FD) >> 226 btstb #4,0xff000000 | Q40 floppy needs very special treatment ... >> 227 jbeq 1f >> 228 btstb #3,0xff000004 >> 229 jbeq 1f >> 230 jbsr SYMBOL_NAME(floppy_hardint) >> 231 jbra 3f >> 232 1: >> 233 #endif >> 234 jbsr SYMBOL_NAME(process_int)| process the IRQ >> 235 3: addql #8,%sp | pop parameters off stack >> 236 >> 237 SYMBOL_NAME_LABEL(ret_from_interrupt) >> 238 subql #1,SYMBOL_NAME(irq_stat)+4 | local_irq_count >> 239 jeq 1f >> 240 2: >> 241 RESTORE_ALL >> 242 1: >> 243 moveq #(~ALLOWINT>>8)&0xff,%d0 >> 244 andb %sp@(PT_SR),%d0 >> 245 jne 2b >> 246 >> 247 /* check if we need to do software interrupts */ >> 248 tstl SYMBOL_NAME(irq_stat) | softirq_pending ? >> 249 jeq SYMBOL_NAME(ret_from_exception) >> 250 pea SYMBOL_NAME(ret_from_exception) >> 251 jra SYMBOL_NAME(do_softirq) >> 252 >> 253 >> 254 /* Handler for uninitialized and spurious interrupts */ >> 255 >> 256 SYMBOL_NAME_LABEL(bad_interrupt) >> 257 addql #1,SYMBOL_NAME(num_spurious) >> 258 rte >> 259 >> 260 ENTRY(sys_fork) >> 261 SAVE_SWITCH_STACK >> 262 pea %sp@(SWITCH_STACK_SIZE) >> 263 jbsr SYMBOL_NAME(m68k_fork) >> 264 addql #4,%sp >> 265 RESTORE_SWITCH_STACK >> 266 rts >> 267 >> 268 ENTRY(sys_clone) >> 269 SAVE_SWITCH_STACK >> 270 pea %sp@(SWITCH_STACK_SIZE) >> 271 jbsr SYMBOL_NAME(m68k_clone) >> 272 addql #4,%sp >> 273 RESTORE_SWITCH_STACK >> 274 rts >> 275 >> 276 ENTRY(sys_vfork) >> 277 SAVE_SWITCH_STACK >> 278 pea %sp@(SWITCH_STACK_SIZE) >> 279 jbsr SYMBOL_NAME(m68k_vfork) >> 280 addql #4,%sp >> 281 RESTORE_SWITCH_STACK >> 282 rts >> 283 >> 284 ENTRY(sys_sigsuspend) >> 285 SAVE_SWITCH_STACK >> 286 pea %sp@(SWITCH_STACK_SIZE) >> 287 jbsr SYMBOL_NAME(do_sigsuspend) >> 288 addql #4,%sp >> 289 RESTORE_SWITCH_STACK >> 290 rts >> 291 >> 292 ENTRY(sys_rt_sigsuspend) >> 293 SAVE_SWITCH_STACK >> 294 pea %sp@(SWITCH_STACK_SIZE) >> 295 jbsr SYMBOL_NAME(do_rt_sigsuspend) >> 296 addql #4,%sp >> 297 RESTORE_SWITCH_STACK >> 298 rts >> 299 >> 300 ENTRY(sys_sigreturn) >> 301 SAVE_SWITCH_STACK >> 302 jbsr SYMBOL_NAME(do_sigreturn) >> 303 RESTORE_SWITCH_STACK >> 304 rts >> 305 >> 306 ENTRY(sys_rt_sigreturn) >> 307 SAVE_SWITCH_STACK >> 308 jbsr SYMBOL_NAME(do_rt_sigreturn) >> 309 RESTORE_SWITCH_STACK >> 310 rts 144 311 145 .section .kprobes.text, "ax" !! 312 SYMBOL_NAME_LABEL(resume) 146 .Ldummy: << 147 /* 313 /* 148 * The following nop exists only in or !! 314 * Beware - when entering resume, prev (the current task) is 149 * symbol starts at the beginning of t !! 315 * in a0, next (the new task) is in a1,so don't change these 150 * In that case there would be several !! 316 * registers until their contents are no longer needed. 151 * E.g. objdump would take an arbitrar << 152 * the code. << 153 * With the added nop in between this << 154 */ 317 */ 155 nop 0 << 156 318 157 /* !! 319 /* save sr */ 158 * Scheduler resume function, called by __swit !! 320 movew %sr,%a0@(TASK_THREAD+THREAD_SR) 159 * gpr2 = (task_struct *)prev << 160 * gpr3 = (task_struct *)next << 161 * Returns: << 162 * gpr2 = prev << 163 */ << 164 SYM_FUNC_START(__switch_to_asm) << 165 stmg %r6,%r15,__SF_GPRS(%r15) << 166 lghi %r4,__TASK_stack << 167 lghi %r1,__TASK_thread << 168 llill %r5,STACK_INIT_OFFSET << 169 stg %r15,__THREAD_ksp(%r1,%r2) << 170 lg %r15,0(%r4,%r3) << 171 agr %r15,%r5 << 172 GET_LC %r13 << 173 stg %r3,__LC_CURRENT(%r13) << 174 stg %r15,__LC_KERNEL_STACK(%r13) << 175 lg %r15,__THREAD_ksp(%r1,%r3) << 176 aghi %r3,__TASK_pid << 177 mvc __LC_CURRENT_PID(4,%r13),0(%r3 << 178 ALTERNATIVE "nop", "lpp _LPP_OFFSET(%r << 179 lmg %r6,%r15,__SF_GPRS(%r15) << 180 BR_EX %r14 << 181 SYM_FUNC_END(__switch_to_asm) << 182 321 183 #if IS_ENABLED(CONFIG_KVM) !! 322 /* save fs (sfc,%dfc) (may be pointing to kernel memory) */ 184 /* !! 323 movec %sfc,%d0 185 * __sie64a calling convention: !! 324 movew %d0,%a0@(TASK_THREAD+THREAD_FS) 186 * %r2 pointer to sie control block phys !! 325 187 * %r3 pointer to sie control block virt !! 326 /* save usp */ 188 * %r4 guest register save area !! 327 /* it is better to use a movel here instead of a movew 8*) */ 189 * %r5 guest asce !! 328 movec %usp,%d0 190 */ !! 329 movel %d0,%a0@(TASK_THREAD+THREAD_USP) 191 SYM_FUNC_START(__sie64a) !! 330 192 stmg %r6,%r14,__SF_GPRS(%r15) !! 331 /* save non-scratch registers on stack */ 193 GET_LC %r13 !! 332 SAVE_SWITCH_STACK 194 lg %r14,__LC_CURRENT(%r13) !! 333 195 stg %r2,__SF_SIE_CONTROL_PHYS(%r15 !! 334 /* save current kernel stack pointer */ 196 stg %r3,__SF_SIE_CONTROL(%r15) !! 335 movel %sp,%a0@(TASK_THREAD+THREAD_KSP) 197 stg %r4,__SF_SIE_SAVEAREA(%r15) !! 336 198 stg %r5,__SF_SIE_GUEST_ASCE(%r15) !! 337 /* save floating point context */ 199 xc __SF_SIE_REASON(8,%r15),__SF_S !! 338 #ifndef CONFIG_M68KFPU_EMU_ONLY 200 mvc __SF_SIE_FLAGS(8,%r15),__TI_fl !! 339 #ifdef CONFIG_M68KFPU_EMU 201 lmg %r0,%r13,0(%r4) !! 340 tstl SYMBOL_NAME(m68k_fputype) 202 mvi __TI_sie(%r14),1 !! 341 jeq 3f 203 lctlg %c1,%c1,__SF_SIE_GUEST_ASCE(%r << 204 lg %r14,__SF_SIE_CONTROL(%r15) << 205 oi __SIE_PROG0C+3(%r14),1 << 206 tm __SIE_PROG20+3(%r14),3 << 207 jnz .Lsie_skip << 208 lg %r14,__SF_SIE_CONTROL_PHYS(%r1 << 209 BPEXIT __SF_SIE_FLAGS(%r15),_TIF_ISOL << 210 .Lsie_entry: << 211 sie 0(%r14) << 212 # Let the next instruction be NOP to avoid tri << 213 # and handling it in a guest as result of the << 214 nopr 7 << 215 .Lsie_leave: << 216 BPOFF << 217 BPENTER __SF_SIE_FLAGS(%r15),_TIF_ISOL << 218 .Lsie_skip: << 219 lg %r14,__SF_SIE_CONTROL(%r15) << 220 ni __SIE_PROG0C+3(%r14),0xfe << 221 GET_LC %r14 << 222 lctlg %c1,%c1,__LC_KERNEL_ASCE(%r14) << 223 lg %r14,__LC_CURRENT(%r14) << 224 mvi __TI_sie(%r14),0 << 225 # some program checks are suppressing. C code << 226 # will rewind the PSW by the ILC, which is oft << 227 # are some corner cases (e.g. runtime instrume << 228 # Other instructions between __sie64a and .Lsi << 229 # interrupts. So lets use 3 nops as a landing << 230 .Lrewind_pad6: << 231 nopr 7 << 232 .Lrewind_pad4: << 233 nopr 7 << 234 .Lrewind_pad2: << 235 nopr 7 << 236 SYM_INNER_LABEL(sie_exit, SYM_L_GLOBAL) << 237 lg %r14,__SF_SIE_SAVEAREA(%r15) << 238 stmg %r0,%r13,0(%r14) << 239 xgr %r0,%r0 << 240 xgr %r1,%r1 << 241 xgr %r3,%r3 << 242 xgr %r4,%r4 << 243 xgr %r5,%r5 << 244 lmg %r6,%r14,__SF_GPRS(%r15) << 245 lg %r2,__SF_SIE_REASON(%r15) << 246 BR_EX %r14 << 247 .Lsie_fault: << 248 lghi %r14,-EFAULT << 249 stg %r14,__SF_SIE_REASON(%r15) << 250 j sie_exit << 251 << 252 EX_TABLE(.Lrewind_pad6,.Lsie_fault) << 253 EX_TABLE(.Lrewind_pad4,.Lsie_fault) << 254 EX_TABLE(.Lrewind_pad2,.Lsie_fault) << 255 EX_TABLE(sie_exit,.Lsie_fault) << 256 SYM_FUNC_END(__sie64a) << 257 EXPORT_SYMBOL(__sie64a) << 258 EXPORT_SYMBOL(sie_exit) << 259 #endif 342 #endif >> 343 fsave %a0@(TASK_THREAD+THREAD_FPSTATE) 260 344 261 /* !! 345 #if defined(CONFIG_M68060) 262 * SVC interrupt handler routine. System calls !! 346 #if !defined(CPU_M68060_ONLY) 263 * are entered with interrupts disabled. !! 347 btst #3,SYMBOL_NAME(m68k_cputype)+3 264 */ !! 348 beqs 1f 265 << 266 SYM_CODE_START(system_call) << 267 STMG_LC %r8,%r15,__LC_SAVE_AREA << 268 GET_LC %r13 << 269 stpt __LC_SYS_ENTER_TIMER(%r13) << 270 BPOFF << 271 lghi %r14,0 << 272 .Lsysc_per: << 273 STBEAR __LC_LAST_BREAK(%r13) << 274 lctlg %c1,%c1,__LC_KERNEL_ASCE(%r13) << 275 lg %r15,__LC_KERNEL_STACK(%r13) << 276 xc __SF_BACKCHAIN(8,%r15),__SF_BA << 277 stmg %r0,%r7,STACK_FRAME_OVERHEAD+_ << 278 # clear user controlled register to pr << 279 xgr %r0,%r0 << 280 xgr %r1,%r1 << 281 xgr %r4,%r4 << 282 xgr %r5,%r5 << 283 xgr %r6,%r6 << 284 xgr %r7,%r7 << 285 xgr %r8,%r8 << 286 xgr %r9,%r9 << 287 xgr %r10,%r10 << 288 xgr %r11,%r11 << 289 la %r2,STACK_FRAME_OVERHEAD(%r15) << 290 mvc __PT_R8(64,%r2),__LC_SAVE_AREA << 291 MBEAR %r2,%r13 << 292 lgr %r3,%r14 << 293 brasl %r14,__do_syscall << 294 STACKLEAK_ERASE << 295 lctlg %c1,%c1,__LC_USER_ASCE(%r13) << 296 mvc __LC_RETURN_PSW(16,%r13),STACK << 297 BPON << 298 LBEAR STACK_FRAME_OVERHEAD+__PT_LAST << 299 stpt __LC_EXIT_TIMER(%r13) << 300 lmg %r0,%r15,STACK_FRAME_OVERHEAD+ << 301 LPSWEY __LC_RETURN_PSW,__LC_RETURN_LP << 302 SYM_CODE_END(system_call) << 303 << 304 # << 305 # a new process exits the kernel with ret_from << 306 # << 307 SYM_CODE_START(ret_from_fork) << 308 lgr %r3,%r11 << 309 brasl %r14,__ret_from_fork << 310 STACKLEAK_ERASE << 311 GET_LC %r13 << 312 lctlg %c1,%c1,__LC_USER_ASCE(%r13) << 313 mvc __LC_RETURN_PSW(16,%r13),STACK << 314 BPON << 315 LBEAR STACK_FRAME_OVERHEAD+__PT_LAST << 316 stpt __LC_EXIT_TIMER(%r13) << 317 lmg %r0,%r15,STACK_FRAME_OVERHEAD+ << 318 LPSWEY __LC_RETURN_PSW,__LC_RETURN_LP << 319 SYM_CODE_END(ret_from_fork) << 320 << 321 /* << 322 * Program check handler routine << 323 */ << 324 << 325 SYM_CODE_START(pgm_check_handler) << 326 STMG_LC %r8,%r15,__LC_SAVE_AREA << 327 GET_LC %r13 << 328 stpt __LC_SYS_ENTER_TIMER(%r13) << 329 BPOFF << 330 lgr %r10,%r15 << 331 lmg %r8,%r9,__LC_PGM_OLD_PSW(%r13) << 332 tmhh %r8,0x0001 # comi << 333 jno .Lpgm_skip_asce << 334 lctlg %c1,%c1,__LC_KERNEL_ASCE(%r13) << 335 j 3f # -> f << 336 .Lpgm_skip_asce: << 337 1: tmhh %r8,0x4000 # PER << 338 jnz 2f # -> e << 339 tm __LC_PGM_ILC+3(%r13),0x80 << 340 jnz .Lpgm_svcper # -> s << 341 2: CHECK_STACK __LC_SAVE_AREA,%r13 << 342 aghi %r15,-(STACK_FRAME_OVERHEAD + << 343 # CHECK_VMAP_STACK branches to stack_o << 344 CHECK_VMAP_STACK __LC_SAVE_AREA,%r13,4 << 345 3: lg %r15,__LC_KERNEL_STACK(%r13) << 346 4: la %r11,STACK_FRAME_OVERHEAD(%r15 << 347 xc __PT_FLAGS(8,%r11),__PT_FLAGS( << 348 xc __SF_BACKCHAIN(8,%r15),__SF_BA << 349 stmg %r0,%r7,__PT_R0(%r11) << 350 mvc __PT_R8(64,%r11),__LC_SAVE_ARE << 351 mvc __PT_LAST_BREAK(8,%r11),__LC_P << 352 stctg %c1,%c1,__PT_CR1(%r11) << 353 #if IS_ENABLED(CONFIG_KVM) << 354 ltg %r12,__LC_GMAP(%r13) << 355 jz 5f << 356 clc __GMAP_ASCE(8,%r12), __PT_CR1( << 357 jne 5f << 358 BPENTER __SF_SIE_FLAGS(%r10),_TIF_ISOL << 359 SIEEXIT __SF_SIE_CONTROL(%r10),%r13 << 360 #endif 349 #endif 361 5: stmg %r8,%r9,__PT_PSW(%r11) !! 350 /* The 060 FPU keeps status in bits 15-8 of the first longword */ 362 # clear user controlled registers to p !! 351 tstb %a0@(TASK_THREAD+THREAD_FPSTATE+2) 363 xgr %r0,%r0 !! 352 jeq 3f 364 xgr %r1,%r1 !! 353 #if !defined(CPU_M68060_ONLY) 365 xgr %r3,%r3 !! 354 jra 2f 366 xgr %r4,%r4 << 367 xgr %r5,%r5 << 368 xgr %r6,%r6 << 369 xgr %r7,%r7 << 370 lgr %r2,%r11 << 371 brasl %r14,__do_pgm_check << 372 tmhh %r8,0x0001 # retu << 373 jno .Lpgm_exit_kernel << 374 STACKLEAK_ERASE << 375 lctlg %c1,%c1,__LC_USER_ASCE(%r13) << 376 BPON << 377 stpt __LC_EXIT_TIMER(%r13) << 378 .Lpgm_exit_kernel: << 379 mvc __LC_RETURN_PSW(16,%r13),STACK << 380 LBEAR STACK_FRAME_OVERHEAD+__PT_LAST << 381 lmg %r0,%r15,STACK_FRAME_OVERHEAD+ << 382 LPSWEY __LC_RETURN_PSW,__LC_RETURN_LP << 383 << 384 # << 385 # single stepped system call << 386 # << 387 .Lpgm_svcper: << 388 mvc __LC_RETURN_PSW(8,%r13),__LC_S << 389 larl %r14,.Lsysc_per << 390 stg %r14,__LC_RETURN_PSW+8(%r13) << 391 lghi %r14,1 << 392 LBEAR __LC_PGM_LAST_BREAK(%r13) << 393 LPSWEY __LC_RETURN_PSW,__LC_RETURN_LP << 394 SYM_CODE_END(pgm_check_handler) << 395 << 396 /* << 397 * Interrupt handler macro used for external a << 398 */ << 399 .macro INT_HANDLER name,lc_old_psw,handler << 400 SYM_CODE_START(\name) << 401 STMG_LC %r8,%r15,__LC_SAVE_AREA << 402 GET_LC %r13 << 403 stckf __LC_INT_CLOCK(%r13) << 404 stpt __LC_SYS_ENTER_TIMER(%r13) << 405 STBEAR __LC_LAST_BREAK(%r13) << 406 BPOFF << 407 lmg %r8,%r9,\lc_old_psw(%r13) << 408 tmhh %r8,0x0001 << 409 jnz 1f << 410 #if IS_ENABLED(CONFIG_KVM) << 411 lg %r10,__LC_CURRENT(%r13) << 412 tm __TI_sie(%r10),0xff << 413 jz 0f << 414 BPENTER __SF_SIE_FLAGS(%r15),_TIF_ISOL << 415 SIEEXIT __SF_SIE_CONTROL(%r15),%r13 << 416 #endif 355 #endif 417 0: CHECK_STACK __LC_SAVE_AREA,%r13 !! 356 #endif /* CONFIG_M68060 */ 418 aghi %r15,-(STACK_FRAME_OVERHEAD + !! 357 #if !defined(CPU_M68060_ONLY) 419 j 2f !! 358 1: tstb %a0@(TASK_THREAD+THREAD_FPSTATE) 420 1: lctlg %c1,%c1,__LC_KERNEL_ASCE(%r13) !! 359 jeq 3f 421 lg %r15,__LC_KERNEL_STACK(%r13) << 422 2: xc __SF_BACKCHAIN(8,%r15),__SF_BA << 423 la %r11,STACK_FRAME_OVERHEAD(%r15 << 424 stmg %r0,%r7,__PT_R0(%r11) << 425 # clear user controlled registers to p << 426 xgr %r0,%r0 << 427 xgr %r1,%r1 << 428 xgr %r3,%r3 << 429 xgr %r4,%r4 << 430 xgr %r5,%r5 << 431 xgr %r6,%r6 << 432 xgr %r7,%r7 << 433 xgr %r10,%r10 << 434 xc __PT_FLAGS(8,%r11),__PT_FLAGS( << 435 mvc __PT_R8(64,%r11),__LC_SAVE_ARE << 436 MBEAR %r11,%r13 << 437 stmg %r8,%r9,__PT_PSW(%r11) << 438 lgr %r2,%r11 # pass << 439 brasl %r14,\handler << 440 mvc __LC_RETURN_PSW(16,%r13),__PT_ << 441 tmhh %r8,0x0001 # retu << 442 jno 2f << 443 STACKLEAK_ERASE << 444 lctlg %c1,%c1,__LC_USER_ASCE(%r13) << 445 BPON << 446 stpt __LC_EXIT_TIMER(%r13) << 447 2: LBEAR __PT_LAST_BREAK(%r11) << 448 lmg %r0,%r15,__PT_R0(%r11) << 449 LPSWEY __LC_RETURN_PSW,__LC_RETURN_LP << 450 SYM_CODE_END(\name) << 451 .endm << 452 << 453 INT_HANDLER ext_int_handler,__LC_EXT_OLD_PSW,d << 454 INT_HANDLER io_int_handler,__LC_IO_OLD_PSW,do_ << 455 << 456 /* << 457 * Machine check handler routines << 458 */ << 459 SYM_CODE_START(mcck_int_handler) << 460 BPOFF << 461 GET_LC %r13 << 462 lmg %r8,%r9,__LC_MCK_OLD_PSW(%r13) << 463 TSTMSK __LC_MCCK_CODE(%r13),MCCK_CODE << 464 jo .Lmcck_panic # yes << 465 TSTMSK __LC_MCCK_CODE(%r13),MCCK_CODE << 466 jno .Lmcck_panic # cont << 467 ptlb << 468 lay %r14,__LC_CPU_TIMER_SAVE_AREA( << 469 mvc __LC_MCCK_ENTER_TIMER(8,%r13), << 470 TSTMSK __LC_MCCK_CODE(%r13),MCCK_CODE << 471 jo 3f << 472 la %r14,__LC_SYS_ENTER_TIMER(%r13 << 473 clc 0(8,%r14),__LC_EXIT_TIMER(%r13 << 474 jl 1f << 475 la %r14,__LC_EXIT_TIMER(%r13) << 476 1: clc 0(8,%r14),__LC_LAST_UPDATE_TIM << 477 jl 2f << 478 la %r14,__LC_LAST_UPDATE_TIMER(%r << 479 2: spt 0(%r14) << 480 mvc __LC_MCCK_ENTER_TIMER(8,%r13), << 481 3: TSTMSK __LC_MCCK_CODE(%r13),MCCK_CODE << 482 jno .Lmcck_panic << 483 tmhh %r8,0x0001 # inte << 484 jnz .Lmcck_user << 485 TSTMSK __LC_MCCK_CODE(%r13),MCCK_CODE << 486 jno .Lmcck_panic << 487 #if IS_ENABLED(CONFIG_KVM) << 488 lg %r10,__LC_CURRENT(%r13) << 489 tm __TI_sie(%r10),0xff << 490 jz .Lmcck_user << 491 # Need to compare the address instead << 492 # Otherwise there would be a race betw << 493 # and entering SIE (or leaving and cle << 494 # would cause machine checks targeted << 495 # handled by the host. << 496 larl %r14,.Lsie_entry << 497 clgrjl %r9,%r14, 4f << 498 larl %r14,.Lsie_leave << 499 clgrjhe %r9,%r14, 4f << 500 lg %r10,__LC_PCPU << 501 oi __PCPU_FLAGS+7(%r10), _CIF_MCC << 502 4: BPENTER __SF_SIE_FLAGS(%r15),_TIF_ISOL << 503 SIEEXIT __SF_SIE_CONTROL(%r15),%r13 << 504 #endif 360 #endif 505 .Lmcck_user: !! 361 2: fmovemx %fp0-%fp7,%a0@(TASK_THREAD+THREAD_FPREG) 506 lg %r15,__LC_MCCK_STACK(%r13) !! 362 fmoveml %fpcr/%fpsr/%fpiar,%a0@(TASK_THREAD+THREAD_FPCNTL) 507 la %r11,STACK_FRAME_OVERHEAD(%r15 !! 363 3: 508 stctg %c1,%c1,__PT_CR1(%r11) !! 364 #endif /* CONFIG_M68KFPU_EMU_ONLY */ 509 lctlg %c1,%c1,__LC_KERNEL_ASCE(%r13) !! 365 /* Return previous task in %d1 */ 510 xc __SF_BACKCHAIN(8,%r15),__SF_BA !! 366 movel %curptr,%d1 511 lay %r14,__LC_GPREGS_SAVE_AREA(%r1 !! 367 512 mvc __PT_R0(128,%r11),0(%r14) !! 368 /* switch to new task (a1 contains new task) */ 513 # clear user controlled registers to p !! 369 movel %a1,%curptr 514 xgr %r0,%r0 !! 370 515 xgr %r1,%r1 !! 371 /* restore floating point context */ 516 xgr %r3,%r3 !! 372 #ifndef CONFIG_M68KFPU_EMU_ONLY 517 xgr %r4,%r4 !! 373 #ifdef CONFIG_M68KFPU_EMU 518 xgr %r5,%r5 !! 374 tstl SYMBOL_NAME(m68k_fputype) 519 xgr %r6,%r6 !! 375 jeq 4f 520 xgr %r7,%r7 << 521 xgr %r10,%r10 << 522 stmg %r8,%r9,__PT_PSW(%r11) << 523 xc __PT_FLAGS(8,%r11),__PT_FLAGS( << 524 xc __SF_BACKCHAIN(8,%r15),__SF_BA << 525 lgr %r2,%r11 # pass << 526 brasl %r14,s390_do_machine_check << 527 lctlg %c1,%c1,__PT_CR1(%r11) << 528 lmg %r0,%r10,__PT_R0(%r11) << 529 mvc __LC_RETURN_MCCK_PSW(16,%r13), << 530 tm __LC_RETURN_MCCK_PSW+1(%r13),0 << 531 jno 0f << 532 BPON << 533 stpt __LC_EXIT_TIMER(%r13) << 534 0: ALTERNATIVE "brcl 0,0", __stringify(la << 535 ALT_FACILITY(193) << 536 LBEAR 0(%r12) << 537 lmg %r11,%r15,__PT_R11(%r11) << 538 LPSWEY __LC_RETURN_MCCK_PSW,__LC_RETU << 539 << 540 .Lmcck_panic: << 541 /* << 542 * Iterate over all possible CPU addre << 543 * and stop each CPU using signal proc << 544 * to allow just one CPU-stopper and p << 545 * stopping each other while leaving t << 546 */ << 547 lhi %r5,0 << 548 lhi %r6,1 << 549 larl %r7,stop_lock << 550 cs %r5,%r6,0(%r7) # sing << 551 jnz 4f << 552 larl %r7,this_cpu << 553 stap 0(%r7) # this << 554 lh %r4,0(%r7) << 555 nilh %r4,0 << 556 lhi %r0,1 << 557 sll %r0,16 # CPU << 558 lhi %r3,0 # next << 559 0: cr %r3,%r4 << 560 je 2f << 561 1: sigp %r1,%r3,SIGP_STOP # stop << 562 brc SIGP_CC_BUSY,1b << 563 2: ahi %r3,1 << 564 brct %r0,0b << 565 3: sigp %r1,%r4,SIGP_STOP # stop << 566 brc SIGP_CC_BUSY,3b << 567 4: j 4b << 568 SYM_CODE_END(mcck_int_handler) << 569 << 570 SYM_CODE_START(restart_int_handler) << 571 ALTERNATIVE "nop", "lpp _LPP_OFFSET", << 572 stg %r15,__LC_SAVE_AREA_RESTART << 573 TSTMSK __LC_RESTART_FLAGS,RESTART_FLA << 574 jz 0f << 575 lctlg %c0,%c15,__LC_CREGS_SAVE_AREA << 576 0: larl %r15,daton_psw << 577 lpswe 0(%r15) << 578 .Ldaton: << 579 GET_LC %r15 << 580 lg %r15,__LC_RESTART_STACK(%r15) << 581 xc STACK_FRAME_OVERHEAD(__PT_SIZE << 582 stmg %r0,%r14,STACK_FRAME_OVERHEAD+ << 583 GET_LC %r13 << 584 mvc STACK_FRAME_OVERHEAD+__PT_R15( << 585 mvc STACK_FRAME_OVERHEAD+__PT_PSW( << 586 xc 0(STACK_FRAME_OVERHEAD,%r15),0 << 587 lg %r1,__LC_RESTART_FN(%r13) << 588 lg %r2,__LC_RESTART_DATA(%r13) << 589 lgf %r3,__LC_RESTART_SOURCE(%r13) << 590 ltgr %r3,%r3 << 591 jm 1f << 592 0: sigp %r4,%r3,SIGP_SENSE << 593 brc 10,0b << 594 1: basr %r14,%r1 << 595 stap __SF_EMPTY(%r15) << 596 llgh %r3,__SF_EMPTY(%r15) << 597 2: sigp %r4,%r3,SIGP_STOP << 598 brc 2,2b << 599 3: j 3b << 600 SYM_CODE_END(restart_int_handler) << 601 << 602 __INIT << 603 SYM_CODE_START(early_pgm_check_handler) << 604 STMG_LC %r8,%r15,__LC_SAVE_AREA << 605 GET_LC %r13 << 606 aghi %r15,-(STACK_FRAME_OVERHEAD+__ << 607 la %r11,STACK_FRAME_OVERHEAD(%r15 << 608 xc __SF_BACKCHAIN(8,%r15),__SF_BA << 609 stmg %r0,%r7,__PT_R0(%r11) << 610 mvc __PT_PSW(16,%r11),__LC_PGM_OLD << 611 mvc __PT_R8(64,%r11),__LC_SAVE_ARE << 612 lgr %r2,%r11 << 613 brasl %r14,__do_early_pgm_check << 614 mvc __LC_RETURN_PSW(16,%r13),STACK << 615 lmg %r0,%r15,STACK_FRAME_OVERHEAD+ << 616 LPSWEY __LC_RETURN_PSW,__LC_RETURN_LP << 617 SYM_CODE_END(early_pgm_check_handler) << 618 __FINIT << 619 << 620 .section .kprobes.text, "ax" << 621 << 622 #if defined(CONFIG_CHECK_STACK) || defined(CON << 623 /* << 624 * The synchronous or the asynchronous stack o << 625 * No need to properly save the registers, we << 626 * Setup a pt_regs so that show_trace can prov << 627 */ << 628 SYM_CODE_START(stack_overflow) << 629 GET_LC %r15 << 630 lg %r15,__LC_NODAT_STACK(%r15) # << 631 la %r11,STACK_FRAME_OVERHEAD(%r15 << 632 stmg %r0,%r7,__PT_R0(%r11) << 633 stmg %r8,%r9,__PT_PSW(%r11) << 634 mvc __PT_R8(64,%r11),0(%r14) << 635 stg %r10,__PT_ORIG_GPR2(%r11) # st << 636 xc __SF_BACKCHAIN(8,%r15),__SF_BA << 637 lgr %r2,%r11 # pass << 638 jg kernel_stack_overflow << 639 SYM_CODE_END(stack_overflow) << 640 #endif 376 #endif 641 !! 377 #if defined(CONFIG_M68060) 642 .section .data, "aw" !! 378 #if !defined(CPU_M68060_ONLY) 643 .balign 4 !! 379 btst #3,SYMBOL_NAME(m68k_cputype)+3 644 SYM_DATA_LOCAL(stop_lock, .long 0) !! 380 beqs 1f 645 SYM_DATA_LOCAL(this_cpu, .short 0) !! 381 #endif 646 .balign 8 !! 382 /* The 060 FPU keeps status in bits 15-8 of the first longword */ 647 SYM_DATA_START_LOCAL(daton_psw) !! 383 tstb %a1@(TASK_THREAD+THREAD_FPSTATE+2) 648 .quad PSW_KERNEL_BITS !! 384 jeq 3f 649 .quad .Ldaton !! 385 #if !defined(CPU_M68060_ONLY) 650 SYM_DATA_END(daton_psw) !! 386 jra 2f 651 << 652 .section .rodata, "a" << 653 .balign 8 << 654 #define SYSCALL(esame,emu) .quad __s390x_ << 655 SYM_DATA_START(sys_call_table) << 656 #include "asm/syscall_table.h" << 657 SYM_DATA_END(sys_call_table) << 658 #undef SYSCALL << 659 << 660 #ifdef CONFIG_COMPAT << 661 << 662 #define SYSCALL(esame,emu) .quad __s390_ << 663 SYM_DATA_START(sys_call_table_emu) << 664 #include "asm/syscall_table.h" << 665 SYM_DATA_END(sys_call_table_emu) << 666 #undef SYSCALL << 667 #endif 387 #endif >> 388 #endif /* CONFIG_M68060 */ >> 389 #if !defined(CPU_M68060_ONLY) >> 390 1: tstb %a1@(TASK_THREAD+THREAD_FPSTATE) >> 391 jeq 3f >> 392 #endif >> 393 2: fmovemx %a1@(TASK_THREAD+THREAD_FPREG),%fp0-%fp7 >> 394 fmoveml %a1@(TASK_THREAD+THREAD_FPCNTL),%fpcr/%fpsr/%fpiar >> 395 3: frestore %a1@(TASK_THREAD+THREAD_FPSTATE) >> 396 4: >> 397 #endif /* CONFIG_M68KFPU_EMU_ONLY */ >> 398 >> 399 /* restore the kernel stack pointer */ >> 400 movel %a1@(TASK_THREAD+THREAD_KSP),%sp >> 401 >> 402 /* restore non-scratch registers */ >> 403 RESTORE_SWITCH_STACK >> 404 >> 405 /* restore user stack pointer */ >> 406 movel %a1@(TASK_THREAD+THREAD_USP),%a0 >> 407 movel %a0,%usp >> 408 >> 409 /* restore fs (sfc,%dfc) */ >> 410 movew %a1@(TASK_THREAD+THREAD_FS),%a0 >> 411 movec %a0,%sfc >> 412 movec %a0,%dfc >> 413 >> 414 /* restore status register */ >> 415 movew %a1@(TASK_THREAD+THREAD_SR),%sr >> 416 >> 417 rts >> 418 >> 419 .data >> 420 ALIGN >> 421 SYMBOL_NAME_LABEL(sys_call_table) >> 422 .long SYMBOL_NAME(sys_ni_syscall) /* 0 - old "setup()" system call*/ >> 423 .long SYMBOL_NAME(sys_exit) >> 424 .long SYMBOL_NAME(sys_fork) >> 425 .long SYMBOL_NAME(sys_read) >> 426 .long SYMBOL_NAME(sys_write) >> 427 .long SYMBOL_NAME(sys_open) /* 5 */ >> 428 .long SYMBOL_NAME(sys_close) >> 429 .long SYMBOL_NAME(sys_waitpid) >> 430 .long SYMBOL_NAME(sys_creat) >> 431 .long SYMBOL_NAME(sys_link) >> 432 .long SYMBOL_NAME(sys_unlink) /* 10 */ >> 433 .long SYMBOL_NAME(sys_execve) >> 434 .long SYMBOL_NAME(sys_chdir) >> 435 .long SYMBOL_NAME(sys_time) >> 436 .long SYMBOL_NAME(sys_mknod) >> 437 .long SYMBOL_NAME(sys_chmod) /* 15 */ >> 438 .long SYMBOL_NAME(sys_chown16) >> 439 .long SYMBOL_NAME(sys_ni_syscall) /* old break syscall holder */ >> 440 .long SYMBOL_NAME(sys_stat) >> 441 .long SYMBOL_NAME(sys_lseek) >> 442 .long SYMBOL_NAME(sys_getpid) /* 20 */ >> 443 .long SYMBOL_NAME(sys_mount) >> 444 .long SYMBOL_NAME(sys_oldumount) >> 445 .long SYMBOL_NAME(sys_setuid16) >> 446 .long SYMBOL_NAME(sys_getuid16) >> 447 .long SYMBOL_NAME(sys_stime) /* 25 */ >> 448 .long SYMBOL_NAME(sys_ptrace) >> 449 .long SYMBOL_NAME(sys_alarm) >> 450 .long SYMBOL_NAME(sys_fstat) >> 451 .long SYMBOL_NAME(sys_pause) >> 452 .long SYMBOL_NAME(sys_utime) /* 30 */ >> 453 .long SYMBOL_NAME(sys_ni_syscall) /* old stty syscall holder */ >> 454 .long SYMBOL_NAME(sys_ni_syscall) /* old gtty syscall holder */ >> 455 .long SYMBOL_NAME(sys_access) >> 456 .long SYMBOL_NAME(sys_nice) >> 457 .long SYMBOL_NAME(sys_ni_syscall) /* 35 */ /* old ftime syscall holder */ >> 458 .long SYMBOL_NAME(sys_sync) >> 459 .long SYMBOL_NAME(sys_kill) >> 460 .long SYMBOL_NAME(sys_rename) >> 461 .long SYMBOL_NAME(sys_mkdir) >> 462 .long SYMBOL_NAME(sys_rmdir) /* 40 */ >> 463 .long SYMBOL_NAME(sys_dup) >> 464 .long SYMBOL_NAME(sys_pipe) >> 465 .long SYMBOL_NAME(sys_times) >> 466 .long SYMBOL_NAME(sys_ni_syscall) /* old prof syscall holder */ >> 467 .long SYMBOL_NAME(sys_brk) /* 45 */ >> 468 .long SYMBOL_NAME(sys_setgid16) >> 469 .long SYMBOL_NAME(sys_getgid16) >> 470 .long SYMBOL_NAME(sys_signal) >> 471 .long SYMBOL_NAME(sys_geteuid16) >> 472 .long SYMBOL_NAME(sys_getegid16) /* 50 */ >> 473 .long SYMBOL_NAME(sys_acct) >> 474 .long SYMBOL_NAME(sys_umount) /* recycled never used phys() */ >> 475 .long SYMBOL_NAME(sys_ni_syscall) /* old lock syscall holder */ >> 476 .long SYMBOL_NAME(sys_ioctl) >> 477 .long SYMBOL_NAME(sys_fcntl) /* 55 */ >> 478 .long SYMBOL_NAME(sys_ni_syscall) /* old mpx syscall holder */ >> 479 .long SYMBOL_NAME(sys_setpgid) >> 480 .long SYMBOL_NAME(sys_ni_syscall) /* old ulimit syscall holder */ >> 481 .long SYMBOL_NAME(sys_ni_syscall) >> 482 .long SYMBOL_NAME(sys_umask) /* 60 */ >> 483 .long SYMBOL_NAME(sys_chroot) >> 484 .long SYMBOL_NAME(sys_ustat) >> 485 .long SYMBOL_NAME(sys_dup2) >> 486 .long SYMBOL_NAME(sys_getppid) >> 487 .long SYMBOL_NAME(sys_getpgrp) /* 65 */ >> 488 .long SYMBOL_NAME(sys_setsid) >> 489 .long SYMBOL_NAME(sys_sigaction) >> 490 .long SYMBOL_NAME(sys_sgetmask) >> 491 .long SYMBOL_NAME(sys_ssetmask) >> 492 .long SYMBOL_NAME(sys_setreuid16) /* 70 */ >> 493 .long SYMBOL_NAME(sys_setregid16) >> 494 .long SYMBOL_NAME(sys_sigsuspend) >> 495 .long SYMBOL_NAME(sys_sigpending) >> 496 .long SYMBOL_NAME(sys_sethostname) >> 497 .long SYMBOL_NAME(sys_setrlimit) /* 75 */ >> 498 .long SYMBOL_NAME(sys_old_getrlimit) >> 499 .long SYMBOL_NAME(sys_getrusage) >> 500 .long SYMBOL_NAME(sys_gettimeofday) >> 501 .long SYMBOL_NAME(sys_settimeofday) >> 502 .long SYMBOL_NAME(sys_getgroups16) /* 80 */ >> 503 .long SYMBOL_NAME(sys_setgroups16) >> 504 .long SYMBOL_NAME(old_select) >> 505 .long SYMBOL_NAME(sys_symlink) >> 506 .long SYMBOL_NAME(sys_lstat) >> 507 .long SYMBOL_NAME(sys_readlink) /* 85 */ >> 508 .long SYMBOL_NAME(sys_uselib) >> 509 .long SYMBOL_NAME(sys_swapon) >> 510 .long SYMBOL_NAME(sys_reboot) >> 511 .long SYMBOL_NAME(old_readdir) >> 512 .long SYMBOL_NAME(old_mmap) /* 90 */ >> 513 .long SYMBOL_NAME(sys_munmap) >> 514 .long SYMBOL_NAME(sys_truncate) >> 515 .long SYMBOL_NAME(sys_ftruncate) >> 516 .long SYMBOL_NAME(sys_fchmod) >> 517 .long SYMBOL_NAME(sys_fchown16) /* 95 */ >> 518 .long SYMBOL_NAME(sys_getpriority) >> 519 .long SYMBOL_NAME(sys_setpriority) >> 520 .long SYMBOL_NAME(sys_ni_syscall) /* old profil syscall holder */ >> 521 .long SYMBOL_NAME(sys_statfs) >> 522 .long SYMBOL_NAME(sys_fstatfs) /* 100 */ >> 523 .long SYMBOL_NAME(sys_ioperm) >> 524 .long SYMBOL_NAME(sys_socketcall) >> 525 .long SYMBOL_NAME(sys_syslog) >> 526 .long SYMBOL_NAME(sys_setitimer) >> 527 .long SYMBOL_NAME(sys_getitimer) /* 105 */ >> 528 .long SYMBOL_NAME(sys_newstat) >> 529 .long SYMBOL_NAME(sys_newlstat) >> 530 .long SYMBOL_NAME(sys_newfstat) >> 531 .long SYMBOL_NAME(sys_ni_syscall) >> 532 .long SYMBOL_NAME(sys_ni_syscall) /* iopl for i386 */ /* 110 */ >> 533 .long SYMBOL_NAME(sys_vhangup) >> 534 .long SYMBOL_NAME(sys_ni_syscall) /* obsolete idle() syscall */ >> 535 .long SYMBOL_NAME(sys_ni_syscall) /* vm86old for i386 */ >> 536 .long SYMBOL_NAME(sys_wait4) >> 537 .long SYMBOL_NAME(sys_swapoff) /* 115 */ >> 538 .long SYMBOL_NAME(sys_sysinfo) >> 539 .long SYMBOL_NAME(sys_ipc) >> 540 .long SYMBOL_NAME(sys_fsync) >> 541 .long SYMBOL_NAME(sys_sigreturn) >> 542 .long SYMBOL_NAME(sys_clone) /* 120 */ >> 543 .long SYMBOL_NAME(sys_setdomainname) >> 544 .long SYMBOL_NAME(sys_newuname) >> 545 .long SYMBOL_NAME(sys_cacheflush) /* modify_ldt for i386 */ >> 546 .long SYMBOL_NAME(sys_adjtimex) >> 547 .long SYMBOL_NAME(sys_mprotect) /* 125 */ >> 548 .long SYMBOL_NAME(sys_sigprocmask) >> 549 .long SYMBOL_NAME(sys_create_module) >> 550 .long SYMBOL_NAME(sys_init_module) >> 551 .long SYMBOL_NAME(sys_delete_module) >> 552 .long SYMBOL_NAME(sys_get_kernel_syms) /* 130 */ >> 553 .long SYMBOL_NAME(sys_quotactl) >> 554 .long SYMBOL_NAME(sys_getpgid) >> 555 .long SYMBOL_NAME(sys_fchdir) >> 556 .long SYMBOL_NAME(sys_bdflush) >> 557 .long SYMBOL_NAME(sys_sysfs) /* 135 */ >> 558 .long SYMBOL_NAME(sys_personality) >> 559 .long SYMBOL_NAME(sys_ni_syscall) /* for afs_syscall */ >> 560 .long SYMBOL_NAME(sys_setfsuid16) >> 561 .long SYMBOL_NAME(sys_setfsgid16) >> 562 .long SYMBOL_NAME(sys_llseek) /* 140 */ >> 563 .long SYMBOL_NAME(sys_getdents) >> 564 .long SYMBOL_NAME(sys_select) >> 565 .long SYMBOL_NAME(sys_flock) >> 566 .long SYMBOL_NAME(sys_msync) >> 567 .long SYMBOL_NAME(sys_readv) /* 145 */ >> 568 .long SYMBOL_NAME(sys_writev) >> 569 .long SYMBOL_NAME(sys_getsid) >> 570 .long SYMBOL_NAME(sys_fdatasync) >> 571 .long SYMBOL_NAME(sys_sysctl) >> 572 .long SYMBOL_NAME(sys_mlock) /* 150 */ >> 573 .long SYMBOL_NAME(sys_munlock) >> 574 .long SYMBOL_NAME(sys_mlockall) >> 575 .long SYMBOL_NAME(sys_munlockall) >> 576 .long SYMBOL_NAME(sys_sched_setparam) >> 577 .long SYMBOL_NAME(sys_sched_getparam) /* 155 */ >> 578 .long SYMBOL_NAME(sys_sched_setscheduler) >> 579 .long SYMBOL_NAME(sys_sched_getscheduler) >> 580 .long SYMBOL_NAME(sys_sched_yield) >> 581 .long SYMBOL_NAME(sys_sched_get_priority_max) >> 582 .long SYMBOL_NAME(sys_sched_get_priority_min) /* 160 */ >> 583 .long SYMBOL_NAME(sys_sched_rr_get_interval) >> 584 .long SYMBOL_NAME(sys_nanosleep) >> 585 .long SYMBOL_NAME(sys_mremap) >> 586 .long SYMBOL_NAME(sys_setresuid16) >> 587 .long SYMBOL_NAME(sys_getresuid16) /* 165 */ >> 588 .long SYMBOL_NAME(sys_getpagesize) >> 589 .long SYMBOL_NAME(sys_query_module) >> 590 .long SYMBOL_NAME(sys_poll) >> 591 .long SYMBOL_NAME(sys_nfsservctl) >> 592 .long SYMBOL_NAME(sys_setresgid16) /* 170 */ >> 593 .long SYMBOL_NAME(sys_getresgid16) >> 594 .long SYMBOL_NAME(sys_prctl) >> 595 .long SYMBOL_NAME(sys_rt_sigreturn) >> 596 .long SYMBOL_NAME(sys_rt_sigaction) >> 597 .long SYMBOL_NAME(sys_rt_sigprocmask) /* 175 */ >> 598 .long SYMBOL_NAME(sys_rt_sigpending) >> 599 .long SYMBOL_NAME(sys_rt_sigtimedwait) >> 600 .long SYMBOL_NAME(sys_rt_sigqueueinfo) >> 601 .long SYMBOL_NAME(sys_rt_sigsuspend) >> 602 .long SYMBOL_NAME(sys_pread) /* 180 */ >> 603 .long SYMBOL_NAME(sys_pwrite) >> 604 .long SYMBOL_NAME(sys_lchown16); >> 605 .long SYMBOL_NAME(sys_getcwd) >> 606 .long SYMBOL_NAME(sys_capget) >> 607 .long SYMBOL_NAME(sys_capset) /* 185 */ >> 608 .long SYMBOL_NAME(sys_sigaltstack) >> 609 .long SYMBOL_NAME(sys_sendfile) >> 610 .long SYMBOL_NAME(sys_ni_syscall) /* streams1 */ >> 611 .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */ >> 612 .long SYMBOL_NAME(sys_vfork) /* 190 */ >> 613 .long SYMBOL_NAME(sys_getrlimit) >> 614 .long SYMBOL_NAME(sys_mmap2) >> 615 .long SYMBOL_NAME(sys_truncate64) >> 616 .long SYMBOL_NAME(sys_ftruncate64) >> 617 .long SYMBOL_NAME(sys_stat64) /* 195 */ >> 618 .long SYMBOL_NAME(sys_lstat64) >> 619 .long SYMBOL_NAME(sys_fstat64) >> 620 .long SYMBOL_NAME(sys_chown) >> 621 .long SYMBOL_NAME(sys_getuid) >> 622 .long SYMBOL_NAME(sys_getgid) /* 200 */ >> 623 .long SYMBOL_NAME(sys_geteuid) >> 624 .long SYMBOL_NAME(sys_getegid) >> 625 .long SYMBOL_NAME(sys_setreuid) >> 626 .long SYMBOL_NAME(sys_setregid) >> 627 .long SYMBOL_NAME(sys_getgroups) /* 205 */ >> 628 .long SYMBOL_NAME(sys_setgroups) >> 629 .long SYMBOL_NAME(sys_fchown) >> 630 .long SYMBOL_NAME(sys_setresuid) >> 631 .long SYMBOL_NAME(sys_getresuid) >> 632 .long SYMBOL_NAME(sys_setresgid) /* 210 */ >> 633 .long SYMBOL_NAME(sys_getresgid) >> 634 .long SYMBOL_NAME(sys_lchown) >> 635 .long SYMBOL_NAME(sys_setuid) >> 636 .long SYMBOL_NAME(sys_setgid) >> 637 .long SYMBOL_NAME(sys_setfsuid) /* 215 */ >> 638 .long SYMBOL_NAME(sys_setfsgid) >> 639 .long SYMBOL_NAME(sys_pivot_root) >> 640 .long SYMBOL_NAME(sys_ni_syscall) >> 641 .long SYMBOL_NAME(sys_ni_syscall) >> 642 .long SYMBOL_NAME(sys_getdents64) /* 220 */ >> 643 .long SYMBOL_NAME(sys_gettid) >> 644 .long SYMBOL_NAME(sys_tkill) >> 645 .long SYMBOL_NAME(sys_setxattr) >> 646 .long SYMBOL_NAME(sys_lsetxattr) >> 647 .long SYMBOL_NAME(sys_fsetxattr) /* 225 */ >> 648 .long SYMBOL_NAME(sys_getxattr) >> 649 .long SYMBOL_NAME(sys_lgetxattr) >> 650 .long SYMBOL_NAME(sys_fgetxattr) >> 651 .long SYMBOL_NAME(sys_listxattr) >> 652 .long SYMBOL_NAME(sys_llistxattr) /* 230 */ >> 653 .long SYMBOL_NAME(sys_flistxattr) >> 654 .long SYMBOL_NAME(sys_removexattr) >> 655 .long SYMBOL_NAME(sys_lremovexattr) >> 656 .long SYMBOL_NAME(sys_fremovexattr) >> 657 >> 658 .rept NR_syscalls-(.-SYMBOL_NAME(sys_call_table))/4 >> 659 .long SYMBOL_NAME(sys_ni_syscall) >> 660 .endr
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.