2 * This file contains the light-weight system call handlers (fsyscall-handlers).
4 * Copyright (C) 2003 Hewlett-Packard Co
5 * David Mosberger-Tang <davidm@hpl.hp.com>
7 * 25-Sep-03 davidm Implement fsys_rt_sigprocmask().
8 * 18-Feb-03 louisk Implement fsys_gettimeofday().
9 * 28-Feb-03 davidm Fixed several bugs in fsys_gettimeofday(). Tuned it some more,
10 * probably broke it along the way... ;-)
11 * 13-Jul-04 clameter Implement fsys_clock_gettime and revise fsys_gettimeofday to make
12 * it capable of using memory based clocks without falling back to C code.
13 * 08-Feb-07 Fenghua Yu Implement fsys_getcpu.
17 #include <asm/asmmacro.h>
18 #include <asm/errno.h>
19 #include <asm/asm-offsets.h>
20 #include <asm/percpu.h>
21 #include <asm/thread_info.h>
23 #include <asm/signal.h>
24 #include <asm/system.h>
25 #include <asm/unistd.h>
30 * See Documentation/ia64/fsys.txt for details on fsyscalls.
32 * On entry to an fsyscall handler:
33 * r10 = 0 (i.e., defaults to "successful syscall return")
34 * r11 = saved ar.pfs (a user-level value)
35 * r15 = system call number
36 * r16 = "current" task pointer (in normal kernel-mode, this is in r13)
37 * r32-r39 = system call arguments
38 * b6 = return address (a user-level value)
39 * ar.pfs = previous frame-state (a user-level value)
40 * PSR.be = cleared to zero (i.e., little-endian byte order is in effect)
41 * all other registers may contain values passed in from user-mode
43 * On return from an fsyscall handler:
44 * r11 = saved ar.pfs (as passed into the fsyscall handler)
45 * r15 = system call number (as passed into the fsyscall handler)
46 * r32-r39 = system call arguments (as passed into the fsyscall handler)
47 * b6 = return address (as passed into the fsyscall handler)
48 * ar.pfs = previous frame-state (as passed into the fsyscall handler)
51 ENTRY(fsys_ni_syscall)
64 add r9=TI_FLAGS+IA64_TASK_SIZE,r16
67 add r8=IA64_TASK_TGID_OFFSET,r16
69 and r9=TIF_ALLWORK_MASK,r9
70 ld4 r8=[r8] // r8 = current->tgid
73 (p8) br.spnt.many fsys_fallback_syscall
81 add r17=IA64_TASK_GROUP_LEADER_OFFSET,r16
83 ld8 r17=[r17] // r17 = current->group_leader
84 add r9=TI_FLAGS+IA64_TASK_SIZE,r16
88 add r17=IA64_TASK_REAL_PARENT_OFFSET,r17 // r17 = ¤t->group_leader->real_parent
90 and r9=TIF_ALLWORK_MASK,r9
92 1: ld8 r18=[r17] // r18 = current->group_leader->real_parent
95 add r8=IA64_TASK_TGID_OFFSET,r18 // r8 = ¤t->group_leader->real_parent->tgid
99 * The .acq is needed to ensure that the read of tgid has returned its data before
100 * we re-check "real_parent".
102 ld4.acq r8=[r8] // r8 = current->group_leader->real_parent->tgid
105 * Re-read current->group_leader->real_parent.
107 ld8 r19=[r17] // r19 = current->group_leader->real_parent
108 (p8) br.spnt.many fsys_fallback_syscall
110 cmp.ne p6,p0=r18,r19 // did real_parent change?
111 mov r19=0 // i must not leak kernel bits...
112 (p6) br.cond.spnt.few 1b // yes -> redo the read of tgid and the check
114 mov r17=0 // i must not leak kernel bits...
115 mov r18=0 // i must not leak kernel bits...
117 mov r17=0 // i must not leak kernel bits...
118 mov r18=0 // i must not leak kernel bits...
119 mov r19=0 // i must not leak kernel bits...
124 ENTRY(fsys_set_tid_address)
128 add r9=TI_FLAGS+IA64_TASK_SIZE,r16
131 tnat.z p6,p7=r32 // check argument register for being NaT
133 and r9=TIF_ALLWORK_MASK,r9
134 add r8=IA64_TASK_PID_OFFSET,r16
135 add r18=IA64_TASK_CLEAR_CHILD_TID_OFFSET,r16
143 (p8) br.spnt.many fsys_fallback_syscall
145 mov r17=0 // i must not leak kernel bits...
146 mov r18=0 // i must not leak kernel bits...
148 END(fsys_set_tid_address)
150 #if IA64_GTOD_LOCK_OFFSET !=0
151 #error fsys_gettimeofday incompatible with changes to struct fsyscall_gtod_data_t
153 #if IA64_ITC_JITTER_OFFSET !=0
154 #error fsys_gettimeofday incompatible with changes to struct itc_jitter_data_t
156 #define CLOCK_REALTIME 0
157 #define CLOCK_MONOTONIC 1
158 #define CLOCK_DIVIDE_BY_1000 0x4000
159 #define CLOCK_ADD_MONOTONIC 0x8000
161 ENTRY(fsys_gettimeofday)
166 tnat.nz p6,p0 = r33 // guard against NaT argument
167 (p6) br.cond.spnt.few .fail_einval
168 mov r30 = CLOCK_DIVIDE_BY_1000
172 // Incoming r31 = pointer to address where to place result
173 // r30 = flags determining how time is processed
174 // r2,r3 = temp r4-r7 preserved
175 // r8 = result nanoseconds
176 // r9 = result seconds
177 // r10 = temporary storage for clock difference
178 // r11 = preserved: saved ar.pfs
179 // r12 = preserved: memory stack
180 // r13 = preserved: thread pointer
181 // r14 = address of mask / mask value
182 // r15 = preserved: system call number
183 // r16 = preserved: current task pointer
186 // r19 = address of itc_lastcycle
187 // r20 = struct fsyscall_gtod_data (= address of gtod_lock.sequence)
188 // r21 = address of mmio_ptr
189 // r22 = address of wall_time or monotonic_time
190 // r23 = address of shift / value
191 // r24 = address mult factor / cycle_last value
192 // r25 = itc_lastcycle value
193 // r26 = address clocksource cycle_last
195 // r28 = sequence number at the beginning of critcal section
196 // r29 = address of itc_jitter
197 // r30 = time processing flags / memory address
198 // r31 = pointer to result
200 // p6,p7 short term use
201 // p8 = timesource ar.itc
202 // p9 = timesource mmio64
203 // p10 = timesource mmio32 - not used
204 // p11 = timesource not to be handled by asm code
205 // p12 = memory time source ( = p9 | p10) - not used
206 // p13 = do cmpxchg with itc_lastcycle
207 // p14 = Divide by 1000
208 // p15 = Add monotonic
210 // Note that instructions are optimized for McKinley. McKinley can
211 // process two bundles simultaneously and therefore we continuously
212 // try to feed the CPU two bundles and then a stop.
214 add r2 = TI_FLAGS+IA64_TASK_SIZE,r16
215 tnat.nz p6,p0 = r31 // guard against Nat argument
216 (p6) br.cond.spnt.few .fail_einval
217 movl r20 = fsyscall_gtod_data // load fsyscall gettimeofday data address
219 ld4 r2 = [r2] // process work pending flags
220 movl r29 = itc_jitter_data // itc_jitter
221 add r22 = IA64_GTOD_WALL_TIME_OFFSET,r20 // wall_time
222 add r21 = IA64_CLKSRC_MMIO_OFFSET,r20
223 mov pr = r30,0xc000 // Set predicates according to function
225 and r2 = TIF_ALLWORK_MASK,r2
226 add r19 = IA64_ITC_LASTCYCLE_OFFSET,r29
227 (p15) add r22 = IA64_GTOD_MONO_TIME_OFFSET,r20 // monotonic_time
229 add r26 = IA64_CLKSRC_CYCLE_LAST_OFFSET,r20 // clksrc_cycle_last
230 cmp.ne p6, p0 = 0, r2 // Fallback if work is scheduled
231 (p6) br.cond.spnt.many fsys_fallback_syscall
233 // Begin critical section
235 ld4.acq r28 = [r20] // gtod_lock.sequence, Must take first
237 and r28 = ~1,r28 // And make sequence even to force retry if odd
239 ld8 r30 = [r21] // clocksource->mmio_ptr
240 add r24 = IA64_CLKSRC_MULT_OFFSET,r20
241 ld4 r2 = [r29] // itc_jitter value
242 add r23 = IA64_CLKSRC_SHIFT_OFFSET,r20
243 add r14 = IA64_CLKSRC_MASK_OFFSET,r20
245 ld4 r3 = [r24] // clocksource mult value
246 ld8 r14 = [r14] // clocksource mask value
247 cmp.eq p8,p9 = 0,r30 // use cpu timer if no mmio_ptr
249 setf.sig f7 = r3 // Setup for mult scaling of counter
250 (p8) cmp.ne p13,p0 = r2,r0 // need itc_jitter compensation, set p13
251 ld4 r23 = [r23] // clocksource shift value
252 ld8 r24 = [r26] // get clksrc_cycle_last value
253 (p9) cmp.eq p13,p0 = 0,r30 // if mmio_ptr, clear p13 jitter control
255 .pred.rel.mutex p8,p9
256 (p8) mov r2 = ar.itc // CPU_TIMER. 36 clocks latency!!!
257 (p9) ld8 r2 = [r30] // MMIO_TIMER. Could also have latency issues..
258 (p13) ld8 r25 = [r19] // get itc_lastcycle value
259 ld8 r9 = [r22],IA64_TIMESPEC_TV_NSEC_OFFSET // tv_sec
261 ld8 r8 = [r22],-IA64_TIMESPEC_TV_NSEC_OFFSET // tv_nsec
262 (p13) sub r3 = r25,r2 // Diff needed before comparison (thanks davidm)
264 (p13) cmp.gt.unc p6,p7 = r3,r0 // check if it is less than last. p6,p7 cleared
265 sub r10 = r2,r24 // current_cycle - last_cycle
267 (p6) sub r10 = r25,r24 // time we got was less than last_cycle
268 (p7) mov ar.ccv = r25 // more than last_cycle. Prep for cmpxchg
270 (p7) cmpxchg8.rel r3 = [r19],r2,ar.ccv
272 (p7) cmp.ne p7,p0 = r25,r3 // if cmpxchg not successful
274 (p7) sub r10 = r3,r24 // then use new last_cycle instead
276 and r10 = r10,r14 // Apply mask
281 // fault check takes 5 cycles and we have spare time
282 EX(.fail_efault, probe.w.fault r31, 3)
283 xmpy.l f8 = f8,f7 // nsec_per_cyc*(counter-last_counter)
288 ld4 r10 = [r20] // gtod_lock.sequence
289 shr.u r2 = r2,r23 // shift by factor
291 add r8 = r8,r2 // Add xtime.nsecs
292 cmp4.ne p7,p0 = r28,r10
293 (p7) br.cond.dpnt.few .time_redo // sequence number changed, redo
294 // End critical section.
295 // Now r8=tv->tv_nsec and r9=tv->tv_sec
298 add r23 = IA64_TIMESPEC_TV_NSEC_OFFSET, r31
299 (p14) movl r3 = 2361183241434822607 // Prep for / 1000 hack
304 (p14) shr.u r20 = r8, 3 // We can repeat this if necessary just wasting time
306 (p14) setf.sig f8 = r20
308 (p6) add r9 = 1,r9 // two nops before the branch.
309 (p14) setf.sig f7 = r3 // Chances for repeats are 1 in 10000 for gettod
310 (p6) br.cond.dpnt.few .time_normalize
312 // Divided by 8 though shift. Now divide by 125
313 // The compiler was able to do that with a multiply
314 // and a shift and we do the same
315 EX(.fail_efault, probe.w.fault r23, 3) // This also costs 5 cycles
316 (p14) xmpy.hu f8 = f8, f7 // xmpy has 5 cycles latency so use it
318 (p14) getf.sig r2 = f8
321 (p14) shr.u r21 = r2, 4
323 EX(.fail_efault, st8 [r31] = r9)
324 EX(.fail_efault, st8 [r23] = r21)
334 END(fsys_gettimeofday)
336 ENTRY(fsys_clock_gettime)
340 cmp4.ltu p6, p0 = CLOCK_MONOTONIC, r32
341 // Fallback if this is not CLOCK_REALTIME or CLOCK_MONOTONIC
342 (p6) br.spnt.few fsys_fallback_syscall
346 END(fsys_clock_gettime)
349 * long fsys_rt_sigprocmask (int how, sigset_t *set, sigset_t *oset, size_t sigsetsize).
352 # error Sorry, fsys_rt_sigprocmask() needs to be updated for _NSIG_WORDS != 1.
354 ENTRY(fsys_rt_sigprocmask)
359 add r2=IA64_TASK_BLOCKED_OFFSET,r16
360 add r9=TI_FLAGS+IA64_TASK_SIZE,r16
361 cmp4.ltu p6,p0=SIG_SETMASK,r32
363 cmp.ne p15,p0=r0,r34 // oset != NULL?
365 add r31=IA64_TASK_SIGHAND_OFFSET,r16
367 ld8 r3=[r2] // read/prefetch current->blocked
371 cmp.ne.or p6,p0=_NSIG_WORDS*8,r35
373 (p6) br.spnt.few .fail_einval // fail with EINVAL
376 ld8 r31=[r31] // r31 <- current->sighand
378 and r9=TIF_ALLWORK_MASK,r9
382 cmp.eq p6,p0=r0,r33 // set == NULL?
383 add r31=IA64_SIGHAND_SIGLOCK_OFFSET,r31 // r31 <- current->sighand->siglock
384 (p8) br.spnt.few .fail_efault // fail with EFAULT
385 (p7) br.spnt.many fsys_fallback_syscall // got pending kernel work...
386 (p6) br.dpnt.many .store_mask // -> short-circuit to just reading the signal mask
388 /* Argh, we actually have to do some work and _update_ the signal mask: */
390 EX(.fail_efault, probe.r.fault r33, 3) // verify user has read-access to *set
391 EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set
392 mov r17=(1 << (SIGKILL - 1)) | (1 << (SIGSTOP - 1))
395 rsm psr.i // mask interrupt delivery
397 andcm r14=r14,r17 // filter out SIGKILL & SIGSTOP
402 cmpxchg4.acq r18=[r31],r17,ar.ccv // try to acquire the lock
403 mov r8=EINVAL // default to EINVAL
405 ld8 r3=[r2] // re-read current->blocked now that we hold the lock
407 (p6) br.cond.spnt.many .lock_contention
410 ld8 r3=[r2] // re-read current->blocked now that we hold the lock
411 mov r8=EINVAL // default to EINVAL
413 add r18=IA64_TASK_PENDING_OFFSET+IA64_SIGPENDING_SIGNAL_OFFSET,r16
414 add r19=IA64_TASK_SIGNAL_OFFSET,r16
415 cmp4.eq p6,p0=SIG_BLOCK,r32
417 ld8 r19=[r19] // r19 <- current->signal
418 cmp4.eq p7,p0=SIG_UNBLOCK,r32
419 cmp4.eq p8,p0=SIG_SETMASK,r32
421 ld8 r18=[r18] // r18 <- current->pending.signal
422 .pred.rel.mutex p6,p7,p8
423 (p6) or r14=r3,r14 // SIG_BLOCK
424 (p7) andcm r14=r3,r14 // SIG_UNBLOCK
426 (p8) mov r14=r14 // SIG_SETMASK
427 (p6) mov r8=0 // clear error code
428 // recalc_sigpending()
429 add r17=IA64_SIGNAL_GROUP_STOP_COUNT_OFFSET,r19
431 add r19=IA64_SIGNAL_SHARED_PENDING_OFFSET+IA64_SIGPENDING_SIGNAL_OFFSET,r19
433 ld4 r17=[r17] // r17 <- current->signal->group_stop_count
434 (p7) mov r8=0 // clear error code
436 ld8 r19=[r19] // r19 <- current->signal->shared_pending
438 cmp4.gt p6,p7=r17,r0 // p6/p7 <- (current->signal->group_stop_count > 0)?
439 (p8) mov r8=0 // clear error code
441 or r18=r18,r19 // r18 <- current->pending | current->signal->shared_pending
443 // r18 <- (current->pending | current->signal->shared_pending) & ~current->blocked:
445 add r9=TI_FLAGS+IA64_TASK_SIZE,r16
448 (p7) cmp.ne.or.andcm p6,p7=r18,r0 // p6/p7 <- signal pending
449 mov r19=0 // i must not leak kernel bits...
450 (p6) br.cond.dpnt.many .sig_pending
453 1: ld4 r17=[r9] // r17 <- current->thread_info->flags
456 and r18=~_TIF_SIGPENDING,r17 // r18 <- r17 & ~(1 << TIF_SIGPENDING)
459 st8 [r2]=r14 // update current->blocked with new mask
460 cmpxchg4.acq r8=[r9],r18,ar.ccv // current->thread_info->flags <- r18
462 cmp.ne p6,p0=r17,r8 // update failed?
463 (p6) br.cond.spnt.few 1b // yes -> retry
466 st4.rel [r31]=r0 // release the lock
471 srlz.d // ensure psr.i is set again
472 mov r18=0 // i must not leak kernel bits...
475 EX(.fail_efault, (p15) probe.w.fault r34, 3) // verify user has write-access to *oset
476 EX(.fail_efault, (p15) st8 [r34]=r3)
477 mov r2=0 // i must not leak kernel bits...
478 mov r3=0 // i must not leak kernel bits...
480 mov r9=0 // i must not leak kernel bits...
481 mov r14=0 // i must not leak kernel bits...
482 mov r17=0 // i must not leak kernel bits...
483 mov r31=0 // i must not leak kernel bits...
488 st4.rel [r31]=r0 // release the lock
493 br.sptk.many fsys_fallback_syscall // with signal pending, do the heavy-weight syscall
497 /* Rather than spinning here, fall back on doing a heavy-weight syscall. */
501 br.sptk.many fsys_fallback_syscall
503 END(fsys_rt_sigprocmask)
506 * fsys_getcpu doesn't use the third parameter in this implementation. It reads
507 * current_thread_info()->cpu and corresponding node in cpu_to_node_map.
514 add r2=TI_FLAGS+IA64_TASK_SIZE,r16
515 tnat.nz p6,p0 = r32 // guard against NaT argument
516 add r3=TI_CPU+IA64_TASK_SIZE,r16
518 ld4 r3=[r3] // M r3 = thread_info->cpu
519 ld4 r2=[r2] // M r2 = thread_info->flags
520 (p6) br.cond.spnt.few .fail_einval // B
522 tnat.nz p7,p0 = r33 // I guard against NaT argument
523 (p7) br.cond.spnt.few .fail_einval // B
525 movl r17=cpu_to_node_map
527 EX(.fail_efault, probe.w.fault r32, 3) // M This takes 5 cycles
528 EX(.fail_efault, probe.w.fault r33, 3) // M This takes 5 cycles
531 ld2 r20=[r18] // r20 = cpu_to_node_map[cpu]
532 and r2 = TIF_ALLWORK_MASK,r2
535 (p8) br.spnt.many fsys_fallback_syscall
538 EX(.fail_efault, st4 [r32] = r3)
539 EX(.fail_efault, st2 [r33] = r20)
543 EX(.fail_efault, probe.w.fault r32, 3) // M This takes 5 cycles
544 EX(.fail_efault, probe.w.fault r33, 3) // M This takes 5 cycles
545 and r2 = TIF_ALLWORK_MASK,r2
548 (p8) br.spnt.many fsys_fallback_syscall
550 EX(.fail_efault, st4 [r32] = r3)
551 EX(.fail_efault, st2 [r33] = r0)
558 ENTRY(fsys_fallback_syscall)
563 * We only get here from light-weight syscall handlers. Thus, we already
564 * know that r15 contains a valid syscall number. No need to re-check.
567 movl r14=sys_call_table
572 ld8 r18=[r18] // load normal (heavy-weight) syscall entry-point
573 mov r29=psr // read psr (12 cyc load latency)
577 END(fsys_fallback_syscall)
579 GLOBAL_ENTRY(fsys_bubble_down)
584 * We get here for syscalls that don't have a lightweight
585 * handler. For those, we need to bubble down into the kernel
586 * and that requires setting up a minimal pt_regs structure,
587 * and initializing the CPU state more or less as if an
588 * interruption had occurred. To make syscall-restarts work,
589 * we setup pt_regs such that cr_iip points to the second
590 * instruction in syscall_via_break. Decrementing the IP
591 * hence will restart the syscall via break and not
592 * decrementing IP will return us to the caller, as usual.
593 * Note that we preserve the value of psr.pp rather than
594 * initializing it from dcr.pp. This makes it possible to
595 * distinguish fsyscall execution from other privileged
599 * - normal fsyscall handler register usage, except
601 * - r18: address of syscall entry point
607 * We used to clear some PSR bits here but that requires slow
608 * serialization. Fortuntely, that isn't really necessary.
609 * The rationale is as follows: we used to clear bits
610 * ~PSR_PRESERVED_BITS in PSR.L. Since
611 * PSR_PRESERVED_BITS==PSR.{UP,MFL,MFH,PK,DT,PP,SP,RT,IC}, we
612 * ended up clearing PSR.{BE,AC,I,DFL,DFH,DI,DB,SI,TB}.
615 * PSR.BE : already is turned off in __kernel_syscall_via_epc()
616 * PSR.AC : don't care (kernel normally turns PSR.AC on)
617 * PSR.I : already turned off by the time fsys_bubble_down gets
619 * PSR.DFL: always 0 (kernel never turns it on)
620 * PSR.DFH: don't care --- kernel never touches f32-f127 on its own
622 * PSR.DI : always 0 (kernel never turns it on)
623 * PSR.SI : always 0 (kernel never turns it on)
624 * PSR.DB : don't care --- kernel never enables kernel-level
626 * PSR.TB : must be 0 already; if it wasn't zero on entry to
627 * __kernel_syscall_via_epc, the branch to fsys_bubble_down
628 * will trigger a taken branch; the taken-trap-handler then
629 * converts the syscall into a break-based system-call.
632 * Reading psr.l gives us only bits 0-31, psr.it, and psr.mc.
633 * The rest we have to synthesize.
635 # define PSR_ONE_BITS ((3 << IA64_PSR_CPL0_BIT) \
636 | (0x1 << IA64_PSR_RI_BIT) \
637 | IA64_PSR_BN | IA64_PSR_I)
640 movl r14=ia64_ret_from_syscall // X
643 movl r28=__kernel_syscall_via_break // X create cr.iip
646 mov r2=r16 // A get task addr to addl-addressable register
647 adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16 // A
648 mov r31=pr // I0 save pr (2 cyc)
650 st1 [r16]=r0 // M2|3 clear current->thread.on_ustack flag
651 addl r22=IA64_RBS_OFFSET,r2 // A compute base of RBS
652 add r3=TI_FLAGS+IA64_TASK_SIZE,r2 // A
654 ld4 r3=[r3] // M0|1 r3 = current_thread_info()->flags
655 lfetch.fault.excl.nt1 [r22] // M0|1 prefetch register backing-store
658 mov ar.rsc=0 // M2 set enforced lazy mode, pl 0, LE, loadrs=0
662 mov r23=ar.bspstore // M2 (12 cyc) save ar.bspstore
663 mov.m r24=ar.rnat // M2 (5 cyc) read ar.rnat (dual-issues!)
666 mov ar.bspstore=r22 // M2 (6 cyc) switch to kernel RBS
667 movl r8=PSR_ONE_BITS // X
669 mov r25=ar.unat // M2 (5 cyc) save ar.unat
670 mov r19=b6 // I0 save b6 (2 cyc)
671 mov r20=r1 // A save caller's gp in r20
673 or r29=r8,r29 // A construct cr.ipsr value to save
674 mov b6=r18 // I0 copy syscall entry-point to b6 (7 cyc)
675 addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2 // A compute base of memory stack
677 mov r18=ar.bsp // M2 save (kernel) ar.bsp (12 cyc)
678 cmp.ne pKStk,pUStk=r0,r0 // A set pKStk <- 0, pUStk <- 1
679 br.call.sptk.many b7=ia64_syscall_setup // B
681 mov ar.rsc=0x3 // M2 set eager mode, pl 0, LE, loadrs=0
682 mov rp=r14 // I0 set the real return addr
683 and r3=_TIF_SYSCALL_TRACEAUDIT,r3 // A
685 ssm psr.i // M2 we're on kernel stacks now, reenable irqs
686 cmp.eq p8,p0=r3,r0 // A
687 (p10) br.cond.spnt.many ia64_ret_from_syscall // B return if bad call-frame or r15 is a NaT
690 (p8) br.call.sptk.many b6=b6 // B (ignore return address)
691 br.cond.spnt ia64_trace_syscall // B
692 END(fsys_bubble_down)
696 .globl fsyscall_table
698 data8 fsys_bubble_down
700 data8 fsys_ni_syscall
701 data8 0 // exit // 1025
706 data8 0 // creat // 1030
711 data8 0 // fchdir // 1035
716 data8 0 // lseek // 1040
717 data8 fsys_getpid // getpid
718 data8 fsys_getppid // getppid
721 data8 0 // setuid // 1045
726 data8 0 // sync // 1050
731 data8 0 // mkdir // 1055
736 data8 0 // brk // 1060
741 data8 0 // ioctl // 1065
746 data8 0 // dup2 // 1070
751 data8 0 // getresgid // 1075
756 data8 0 // setpgid // 1080
759 data8 0 // sethostname
761 data8 0 // getrlimit // 1085
763 data8 fsys_gettimeofday // gettimeofday
764 data8 0 // settimeofday
766 data8 0 // poll // 1090
771 data8 0 // swapoff // 1095
776 data8 0 // fchown // 1100
777 data8 0 // getpriority
778 data8 0 // setpriority
781 data8 0 // gettid // 1105
786 data8 0 // msgsnd // 1110
791 data8 0 // shmdt // 1115
801 data8 0 // remap_file_pages // 1125
805 data8 0 // setdomainname
806 data8 0 // newuname // 1130
809 data8 0 // init_module
810 data8 0 // delete_module
816 data8 0 // personality // 1140
817 data8 0 // afs_syscall
821 data8 0 // flock // 1145
826 data8 0 // sysctl // 1150
831 data8 0 // mprotect // 1155
835 data8 0 // munlockall
836 data8 0 // sched_getparam // 1160
837 data8 0 // sched_setparam
838 data8 0 // sched_getscheduler
839 data8 0 // sched_setscheduler
840 data8 0 // sched_yield
841 data8 0 // sched_get_priority_max // 1165
842 data8 0 // sched_get_priority_min
843 data8 0 // sched_rr_get_interval
845 data8 0 // nfsservctl
846 data8 0 // prctl // 1170
847 data8 0 // getpagesize
849 data8 0 // pciconfig_read
850 data8 0 // pciconfig_write
851 data8 0 // perfmonctl // 1175
852 data8 0 // sigaltstack
853 data8 0 // rt_sigaction
854 data8 0 // rt_sigpending
855 data8 fsys_rt_sigprocmask // rt_sigprocmask
856 data8 0 // rt_sigqueueinfo // 1180
857 data8 0 // rt_sigreturn
858 data8 0 // rt_sigsuspend
859 data8 0 // rt_sigtimedwait
861 data8 0 // capget // 1185
866 data8 0 // socket // 1190
871 data8 0 // getsockname // 1195
872 data8 0 // getpeername
873 data8 0 // socketpair
876 data8 0 // recv // 1200
879 data8 0 // setsockopt
880 data8 0 // getsockopt
881 data8 0 // sendmsg // 1205
883 data8 0 // pivot_root
886 data8 0 // newstat // 1210
890 data8 0 // getdents64
891 data8 0 // getunwind // 1215
896 data8 0 // getxattr // 1220
900 data8 0 // llistxattr
901 data8 0 // flistxattr // 1225
902 data8 0 // removexattr
903 data8 0 // lremovexattr
904 data8 0 // fremovexattr
906 data8 0 // futex // 1230
907 data8 0 // sched_setaffinity
908 data8 0 // sched_getaffinity
909 data8 fsys_set_tid_address // set_tid_address
910 data8 0 // fadvise64_64
911 data8 0 // tgkill // 1235
912 data8 0 // exit_group
913 data8 0 // lookup_dcookie
915 data8 0 // io_destroy
916 data8 0 // io_getevents // 1240
919 data8 0 // epoll_create
921 data8 0 // epoll_wait // 1245
922 data8 0 // restart_syscall
923 data8 0 // semtimedop
924 data8 0 // timer_create
925 data8 0 // timer_settime
926 data8 0 // timer_gettime // 1250
927 data8 0 // timer_getoverrun
928 data8 0 // timer_delete
929 data8 0 // clock_settime
930 data8 fsys_clock_gettime // clock_gettime
931 data8 0 // clock_getres // 1255
932 data8 0 // clock_nanosleep
936 data8 0 // get_mempolicy // 1260
937 data8 0 // set_mempolicy
940 data8 0 // mq_timedsend
941 data8 0 // mq_timedreceive // 1265
943 data8 0 // mq_getsetattr
944 data8 0 // kexec_load
946 data8 0 // waitid // 1270
948 data8 0 // request_key
950 data8 0 // ioprio_set
951 data8 0 // ioprio_get // 1275
952 data8 0 // move_pages
953 data8 0 // inotify_init
954 data8 0 // inotify_add_watch
955 data8 0 // inotify_rm_watch
956 data8 0 // migrate_pages // 1280
961 data8 0 // futimesat // 1285
962 data8 0 // newfstatat
966 data8 0 // symlinkat // 1290
967 data8 0 // readlinkat
974 data8 0 // set_robust_list
975 data8 0 // get_robust_list
976 data8 0 // sync_file_range // 1300
980 data8 fsys_getcpu // getcpu // 1304
982 // fill in zeros for the remaining entries
984 .space fsyscall_table + 8*NR_syscalls - .zero, 0