2 * arch/ppc/kernel/misc.S
6 * This file contains miscellaneous low-level functions.
7 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
9 * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
11 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
12 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version
17 * 2 of the License, or (at your option) any later version.
21 #include <linux/config.h>
22 #include <linux/sys.h>
23 #include <asm/unistd.h>
24 #include <asm/errno.h>
25 #include <asm/processor.h>
27 #include <asm/cache.h>
28 #include <asm/ppc_asm.h>
29 #include <asm/asm-offsets.h>
30 #include <asm/cputable.h>
35 * Returns (address we were linked at) - (address we are running at)
36 * for use before the text and data are mapped to KERNELBASE.
68 #ifdef CONFIG_IRQSTACKS
69 _GLOBAL(call_do_softirq)
72 stdu r1,THREAD_SIZE-112(r3)
80 _GLOBAL(call_handle_IRQ_event)
83 stdu r1,THREAD_SIZE-112(r6)
90 #endif /* CONFIG_IRQSTACKS */
93 * To be called by C code which needs to do some operations with MMU
94 * disabled. Note that interrupts have to be disabled by the caller
95 * prior to calling us. The code called _MUST_ be in the RMO of course
96 * and part of the linear mapping as we don't attempt to translate the
97 * stack pointer at all. The function is called with the stack switched
98 * to this CPU emergency stack
100 * prototype is void *call_with_mmu_off(void *func, void *data);
102 * the called function is expected to be of the form
104 * void *called(void *data);
106 _GLOBAL(call_with_mmu_off)
107 mflr r0 /* get link, save it on stackframe */
109 mr r1,r5 /* save old stack ptr */
110 ld r1,PACAEMERGSP(r13) /* get emerg. stack */
111 subi r1,r1,STACK_FRAME_OVERHEAD
112 std r0,16(r1) /* save link on emerg. stack */
113 std r5,0(r1) /* save old stack ptr in backchain */
114 ld r3,0(r3) /* get to real function ptr (assume same TOC) */
115 bl 2f /* we need LR to return, continue at label 2 */
117 ld r0,16(r1) /* we return here from the call, get LR and */
118 ld r1,0(r1) /* .. old stack ptr */
119 mtspr SPRN_SRR0,r0 /* and get back to virtual mode with these */
121 ori r4,r4,MSR_IR|MSR_DR
125 2: mtspr SPRN_SRR0,r3 /* coming from above, enter real mode */
126 mr r3,r4 /* get parameter */
128 ori r0,r0,MSR_IR|MSR_DR
129 xori r0,r0,MSR_IR|MSR_DR
136 .tc ppc64_caches[TC],ppc64_caches
140 * Write any modified data cache blocks out to memory
141 * and invalidate the corresponding instruction cache blocks.
143 * flush_icache_range(unsigned long start, unsigned long stop)
145 * flush all bytes from start through stop-1 inclusive
148 _KPROBE(__flush_icache_range)
151 * Flush the data cache to memory
153 * Different systems have different cache line sizes
154 * and in some cases i-cache and d-cache line sizes differ from
157 ld r10,PPC64_CACHES@toc(r2)
158 lwz r7,DCACHEL1LINESIZE(r10)/* Get cache line size */
160 andc r6,r3,r5 /* round low to line bdy */
161 subf r8,r6,r4 /* compute length */
162 add r8,r8,r5 /* ensure we get enough */
163 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of cache line size */
164 srw. r8,r8,r9 /* compute line count */
165 beqlr /* nothing to do? */
172 /* Now invalidate the instruction cache */
174 lwz r7,ICACHEL1LINESIZE(r10) /* Get Icache line size */
176 andc r6,r3,r5 /* round low to line bdy */
177 subf r8,r6,r4 /* compute length */
179 lwz r9,ICACHEL1LOGLINESIZE(r10) /* Get log-2 of Icache line size */
180 srw. r8,r8,r9 /* compute line count */
181 beqlr /* nothing to do? */
190 * Like above, but only do the D-cache.
192 * flush_dcache_range(unsigned long start, unsigned long stop)
194 * flush all bytes from start to stop-1 inclusive
196 _GLOBAL(flush_dcache_range)
199 * Flush the data cache to memory
201 * Different systems have different cache line sizes
203 ld r10,PPC64_CACHES@toc(r2)
204 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
206 andc r6,r3,r5 /* round low to line bdy */
207 subf r8,r6,r4 /* compute length */
208 add r8,r8,r5 /* ensure we get enough */
209 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
210 srw. r8,r8,r9 /* compute line count */
211 beqlr /* nothing to do? */
220 * Like above, but works on non-mapped physical addresses.
221 * Use only for non-LPAR setups ! It also assumes real mode
222 * is cacheable. Used for flushing out the DART before using
223 * it as uncacheable memory
225 * flush_dcache_phys_range(unsigned long start, unsigned long stop)
227 * flush all bytes from start to stop-1 inclusive
229 _GLOBAL(flush_dcache_phys_range)
230 ld r10,PPC64_CACHES@toc(r2)
231 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
233 andc r6,r3,r5 /* round low to line bdy */
234 subf r8,r6,r4 /* compute length */
235 add r8,r8,r5 /* ensure we get enough */
236 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
237 srw. r8,r8,r9 /* compute line count */
238 beqlr /* nothing to do? */
239 mfmsr r5 /* Disable MMU Data Relocation */
252 mtmsr r5 /* Re-enable MMU Data Relocation */
257 _GLOBAL(flush_inval_dcache_range)
258 ld r10,PPC64_CACHES@toc(r2)
259 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
261 andc r6,r3,r5 /* round low to line bdy */
262 subf r8,r6,r4 /* compute length */
263 add r8,r8,r5 /* ensure we get enough */
264 lwz r9,DCACHEL1LOGLINESIZE(r10)/* Get log-2 of dcache line size */
265 srw. r8,r8,r9 /* compute line count */
266 beqlr /* nothing to do? */
279 * Flush a particular page from the data cache to RAM.
280 * Note: this is necessary because the instruction cache does *not*
281 * snoop from the data cache.
283 * void __flush_dcache_icache(void *page)
285 _GLOBAL(__flush_dcache_icache)
287 * Flush the data cache to memory
289 * Different systems have different cache line sizes
292 /* Flush the dcache */
293 ld r7,PPC64_CACHES@toc(r2)
294 clrrdi r3,r3,PAGE_SHIFT /* Page align */
295 lwz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */
296 lwz r5,DCACHEL1LINESIZE(r7) /* Get dcache line size */
304 /* Now invalidate the icache */
306 lwz r4,ICACHEL1LINESPERPAGE(r7) /* Get # icache lines per page */
307 lwz r5,ICACHEL1LINESIZE(r7) /* Get icache line size */
316 * I/O string operations
318 * insb(port, buf, len)
319 * outsb(port, buf, len)
320 * insw(port, buf, len)
321 * outsw(port, buf, len)
322 * insl(port, buf, len)
323 * outsl(port, buf, len)
324 * insw_ns(port, buf, len)
325 * outsw_ns(port, buf, len)
326 * insl_ns(port, buf, len)
327 * outsl_ns(port, buf, len)
329 * The *_ns versions don't do byte-swapping.
403 /* _GLOBAL(ide_insw) now in drivers/ide/ide-iops.c */
417 /* _GLOBAL(ide_outsw) now in drivers/ide/ide-iops.c */
455 lfd 0,0(r5) /* load up fpscr value */
459 mffs 0 /* save new fpscr value */
464 lfd 0,0(r5) /* load up fpscr value */
468 mffs 0 /* save new fpscr value */
473 * identify_cpu and calls setup_cpu
474 * In: r3 = base of the cpu_specs array
475 * r4 = address of cur_cpu_spec
476 * r5 = relocation offset
478 _GLOBAL(identify_cpu)
481 lwz r8,CPU_SPEC_PVR_MASK(r3)
483 lwz r9,CPU_SPEC_PVR_VALUE(r3)
486 addi r3,r3,CPU_SPEC_ENTRY_SIZE
491 ld r4,CPU_SPEC_SETUP(r3)
496 /* Calling convention for cpu setup is r3=offset, r4=cur_cpu_spec */
502 * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
503 * and writes nop's over sections of code that don't apply for this cpu.
504 * r3 = data offset (not changed)
506 _GLOBAL(do_cpu_ftr_fixups)
507 /* Get CPU 0 features */
508 LOADADDR(r6,cur_cpu_spec)
512 ld r4,CPU_SPEC_FEATURES(r4)
513 /* Get the fixup table */
514 LOADADDR(r6,__start___ftr_fixup)
516 LOADADDR(r7,__stop___ftr_fixup)
522 ld r8,-32(r6) /* mask */
524 ld r9,-24(r6) /* value */
527 ld r8,-16(r6) /* section begin */
528 ld r9,-8(r6) /* section end */
531 /* write nops over the section of code */
532 /* todo: if large section, add a branch at the start of it */
536 lis r0,0x60000000@h /* nop */
538 andi. r10,r4,CPU_FTR_SPLIT_ID_CACHE@l
540 dcbst 0,r8 /* suboptimal, but simpler */
545 sync /* additional sync needed on g4 */
549 #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE)
551 * Do an IO access in real mode
582 * Do an IO access in real mode
611 #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */
614 * Create a kernel thread
615 * kernel_thread(fn, arg, flags)
617 _GLOBAL(kernel_thread)
620 stdu r1,-STACK_FRAME_OVERHEAD(r1)
623 ori r3,r5,CLONE_VM /* flags */
624 oris r3,r3,(CLONE_UNTRACED>>16)
625 li r4,0 /* new sp (unused) */
628 cmpdi 0,r3,0 /* parent or child? */
629 bne 1f /* return if parent */
631 stdu r0,-STACK_FRAME_OVERHEAD(r1)
634 mtlr r29 /* fn addr in lr */
635 mr r3,r30 /* load arg and call fn */
637 li r0,__NR_exit /* exit after child exits */
640 1: addi r1,r1,STACK_FRAME_OVERHEAD
646 * disable_kernel_fp()
649 _GLOBAL(disable_kernel_fp)
651 rldicl r0,r3,(63-MSR_FP_LG),1
652 rldicl r3,r0,(MSR_FP_LG+1),0
653 mtmsrd r3 /* disable use of fpu now */
659 * Disable FP for the task given as the argument,
660 * and save the floating-point registers in its thread_struct.
661 * Enables the FPU for use in the kernel on return.
666 mtmsrd r5 /* enable use of fpu now */
669 beqlr- /* if no previous owner, done */
670 addi r3,r3,THREAD /* want THREAD of task */
675 stfd fr0,THREAD_FPSCR(r3)
677 ld r4,_MSR-STACK_FRAME_OVERHEAD(r5)
678 li r3,MSR_FP|MSR_FE0|MSR_FE1
679 andc r4,r4,r3 /* disable FP for previous task */
680 std r4,_MSR-STACK_FRAME_OVERHEAD(r5)
684 ld r4,last_task_used_math@got(r2)
686 #endif /* CONFIG_SMP */
689 #ifdef CONFIG_ALTIVEC
691 #if 0 /* this has no callers for now */
693 * disable_kernel_altivec()
696 _GLOBAL(disable_kernel_altivec)
698 rldicl r0,r3,(63-MSR_VEC_LG),1
699 rldicl r3,r0,(MSR_VEC_LG+1),0
700 mtmsrd r3 /* disable use of VMX now */
706 * giveup_altivec(tsk)
707 * Disable VMX for the task given as the argument,
708 * and save the vector registers in its thread_struct.
709 * Enables the VMX for use in the kernel on return.
711 _GLOBAL(giveup_altivec)
714 mtmsrd r5 /* enable use of VMX now */
717 beqlr- /* if no previous owner, done */
718 addi r3,r3,THREAD /* want THREAD of task */
726 ld r4,_MSR-STACK_FRAME_OVERHEAD(r5)
728 andc r4,r4,r3 /* disable FP for previous task */
729 std r4,_MSR-STACK_FRAME_OVERHEAD(r5)
733 ld r4,last_task_used_altivec@got(r2)
735 #endif /* CONFIG_SMP */
738 #endif /* CONFIG_ALTIVEC */
740 _GLOBAL(__setup_cpu_power3)
743 /* kexec_wait(phys_cpu)
745 * wait for the flag to change, indicating this kernel is going away but
746 * the slave code for the next one is at addresses 0 to 100.
748 * This is used by all slaves.
750 * Physical (hardware) cpu id should be in r3.
755 addi r5,r5,kexec_flag-1b
758 #ifdef CONFIG_KEXEC /* use no memory without kexec */
765 /* this can be in text because we won't change it until we are
766 * running in real anyways
774 /* kexec_smp_wait(void)
776 * call with interrupts off
777 * note: this is a terminal routine, it does not save lr
779 * get phys id from paca
780 * set paca id to -1 to say we got here
781 * switch to real mode
782 * join other cpus in kexec_wait(phys_id)
784 _GLOBAL(kexec_smp_wait)
785 lhz r3,PACAHWCPUID(r13)
787 sth r4,PACAHWCPUID(r13) /* let others know we left */
792 * switch to real mode (turn mmu off)
793 * we use the early kernel trick that the hardware ignores bits
794 * 0 and 1 (big endian) of the effective address in real mode
796 * don't overwrite r3 here, it is live for kexec_wait above.
798 real_mode: /* assume normal blr return */
801 mflr r11 /* return address to SRR0 */
813 * kexec_sequence(newstack, start, image, control, clear_all())
815 * does the grungy work with stack switching and real mode switches
816 * also does simple calls to other code
819 _GLOBAL(kexec_sequence)
823 /* switch stacks to newstack -- &kexec_stack.stack */
824 stdu r1,THREAD_SIZE-112(r3)
830 /* save regs for local vars on new stack.
831 * yes, we won't go back, but ...
843 /* save args into preserved regs */
844 mr r31,r3 /* newstack (both) */
845 mr r30,r4 /* start (real) */
846 mr r29,r5 /* image (virt) */
847 mr r28,r6 /* control, unused */
848 mr r27,r7 /* clear_all() fn desc */
849 mr r26,r8 /* spare */
850 lhz r25,PACAHWCPUID(r13) /* get our phys cpu from paca */
852 /* disable interrupts, we are overwriting kernel data next */
857 /* copy dest pages, flush whole dest image */
859 bl .kexec_copy_flush /* (image) */
864 /* clear out hardware hash page table and tlb */
865 ld r5,0(r27) /* deref function descriptor */
867 bctrl /* ppc_md.hash_clear_all(void); */
870 * kexec image calling is:
871 * the first 0x100 bytes of the entry point are copied to 0
873 * all slaves branch to slave = 0x60 (absolute)
874 * slave(phys_cpu_id);
876 * master goes to start = entry point
877 * start(phys_cpu_id, start, 0);
880 * a wrapper is needed to call existing kernels, here is an approximate
881 * description of one method:
884 * start will be near the boot_block (maybe 0x100 bytes before it?)
885 * it will have a 0x60, which will b to boot_block, where it will wait
886 * and 0 will store phys into struct boot-block and load r3 from there,
887 * copy kernel 0-0x100 and tell slaves to back down to 0x60 again
890 * boot block will have all cpus scanning device tree to see if they
891 * are the boot cpu ?????
892 * other device tree differences (prop sizes, va vs pa, etc)...
895 /* copy 0x100 bytes starting at start to 0 */
900 bl .copy_and_flush /* (dest, src, copy limit, start offset) */
901 1: /* assume normal blr return */
903 /* release other cpus to the new kernel secondary start at 0x60 */
906 stw r6,kexec_flag-1b(5)
907 mr r3,r25 # my phys cpu
908 mr r4,r30 # start, aka phys mem offset
911 blr /* image->start(physid, image->start, 0); */
912 #endif /* CONFIG_KEXEC */
914 /* Why isn't this a) automatic, b) written in 'C'? */
916 _GLOBAL(sys_call_table32)
917 .llong .sys_restart_syscall /* 0 */
922 .llong .compat_sys_open /* 5 */
924 .llong .sys32_waitpid
927 .llong .sys_unlink /* 10 */
930 .llong .compat_sys_time
932 .llong .sys_chmod /* 15 */
934 .llong .sys_ni_syscall /* old break syscall */
935 .llong .sys_ni_syscall /* old stat syscall */
937 .llong .sys_getpid /* 20 */
938 .llong .compat_sys_mount
939 .llong .sys_oldumount
942 .llong .compat_sys_stime /* 25 */
945 .llong .sys_ni_syscall /* old fstat syscall */
947 .llong .compat_sys_utime /* 30 */
948 .llong .sys_ni_syscall /* old stty syscall */
949 .llong .sys_ni_syscall /* old gtty syscall */
952 .llong .sys_ni_syscall /* 35 - old ftime syscall */
957 .llong .sys_rmdir /* 40 */
960 .llong .compat_sys_times
961 .llong .sys_ni_syscall /* old prof syscall */
962 .llong .sys_brk /* 45 */
967 .llong .sys_getegid /* 50 */
970 .llong .sys_ni_syscall /* old lock syscall */
971 .llong .compat_sys_ioctl
972 .llong .compat_sys_fcntl /* 55 */
973 .llong .sys_ni_syscall /* old mpx syscall */
974 .llong .sys32_setpgid
975 .llong .sys_ni_syscall /* old ulimit syscall */
976 .llong .sys32_olduname
977 .llong .sys32_umask /* 60 */
982 .llong .sys_getpgrp /* 65 */
984 .llong .sys32_sigaction
986 .llong .sys32_ssetmask
987 .llong .sys_setreuid /* 70 */
989 .llong .ppc32_sigsuspend
990 .llong .compat_sys_sigpending
991 .llong .sys32_sethostname
992 .llong .compat_sys_setrlimit /* 75 */
993 .llong .compat_sys_old_getrlimit
994 .llong .compat_sys_getrusage
995 .llong .sys32_gettimeofday
996 .llong .sys32_settimeofday
997 .llong .sys32_getgroups /* 80 */
998 .llong .sys32_setgroups
999 .llong .sys_ni_syscall /* old select syscall */
1001 .llong .sys_ni_syscall /* old lstat syscall */
1002 .llong .sys32_readlink /* 85 */
1006 .llong .old32_readdir
1007 .llong .sys_mmap /* 90 */
1009 .llong .sys_truncate
1010 .llong .sys_ftruncate
1012 .llong .sys_fchown /* 95 */
1013 .llong .sys32_getpriority
1014 .llong .sys32_setpriority
1015 .llong .sys_ni_syscall /* old profil syscall */
1016 .llong .compat_sys_statfs
1017 .llong .compat_sys_fstatfs /* 100 */
1018 .llong .sys_ni_syscall /* old ioperm syscall */
1019 .llong .compat_sys_socketcall
1020 .llong .sys32_syslog
1021 .llong .compat_sys_setitimer
1022 .llong .compat_sys_getitimer /* 105 */
1023 .llong .compat_sys_newstat
1024 .llong .compat_sys_newlstat
1025 .llong .compat_sys_newfstat
1027 .llong .sys_ni_syscall /* 110 old iopl syscall */
1029 .llong .sys_ni_syscall /* old idle syscall */
1030 .llong .sys_ni_syscall /* old vm86 syscall */
1031 .llong .compat_sys_wait4
1032 .llong .sys_swapoff /* 115 */
1033 .llong .sys32_sysinfo
1036 .llong .ppc32_sigreturn
1037 .llong .ppc_clone /* 120 */
1038 .llong .sys32_setdomainname
1039 .llong .ppc64_newuname
1040 .llong .sys_ni_syscall /* old modify_ldt syscall */
1041 .llong .sys32_adjtimex
1042 .llong .sys_mprotect /* 125 */
1043 .llong .compat_sys_sigprocmask
1044 .llong .sys_ni_syscall /* old create_module syscall */
1045 .llong .sys_init_module
1046 .llong .sys_delete_module
1047 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */
1048 .llong .sys_quotactl
1049 .llong .sys32_getpgid
1052 .llong .sys32_sysfs /* 135 */
1053 .llong .ppc64_personality
1054 .llong .sys_ni_syscall /* for afs_syscall */
1055 .llong .sys_setfsuid
1056 .llong .sys_setfsgid
1057 .llong .sys_llseek /* 140 */
1058 .llong .sys32_getdents
1059 .llong .ppc32_select
1062 .llong .compat_sys_readv /* 145 */
1063 .llong .compat_sys_writev
1064 .llong .sys32_getsid
1065 .llong .sys_fdatasync
1066 .llong .sys32_sysctl
1067 .llong .sys_mlock /* 150 */
1069 .llong .sys_mlockall
1070 .llong .sys_munlockall
1071 .llong .sys32_sched_setparam
1072 .llong .sys32_sched_getparam /* 155 */
1073 .llong .sys32_sched_setscheduler
1074 .llong .sys32_sched_getscheduler
1075 .llong .sys_sched_yield
1076 .llong .sys32_sched_get_priority_max
1077 .llong .sys32_sched_get_priority_min /* 160 */
1078 .llong .sys32_sched_rr_get_interval
1079 .llong .compat_sys_nanosleep
1081 .llong .sys_setresuid
1082 .llong .sys_getresuid /* 165 */
1083 .llong .sys_ni_syscall /* old query_module syscall */
1085 .llong .compat_sys_nfsservctl
1086 .llong .sys_setresgid
1087 .llong .sys_getresgid /* 170 */
1089 .llong .ppc32_rt_sigreturn
1090 .llong .sys32_rt_sigaction
1091 .llong .sys32_rt_sigprocmask
1092 .llong .sys32_rt_sigpending /* 175 */
1093 .llong .compat_sys_rt_sigtimedwait
1094 .llong .sys32_rt_sigqueueinfo
1095 .llong .ppc32_rt_sigsuspend
1096 .llong .sys32_pread64
1097 .llong .sys32_pwrite64 /* 180 */
1102 .llong .sys32_sigaltstack /* 185 */
1103 .llong .sys32_sendfile
1104 .llong .sys_ni_syscall /* reserved for streams1 */
1105 .llong .sys_ni_syscall /* reserved for streams2 */
1107 .llong .compat_sys_getrlimit /* 190 */
1108 .llong .sys32_readahead
1110 .llong .sys32_truncate64
1111 .llong .sys32_ftruncate64
1112 .llong .sys_stat64 /* 195 */
1115 .llong .sys32_pciconfig_read
1116 .llong .sys32_pciconfig_write
1117 .llong .sys32_pciconfig_iobase /* 200 - pciconfig_iobase */
1118 .llong .sys_ni_syscall /* reserved for MacOnLinux */
1119 .llong .sys_getdents64
1120 .llong .sys_pivot_root
1121 .llong .compat_sys_fcntl64
1122 .llong .sys_madvise /* 205 */
1126 .llong .sys_setxattr
1127 .llong .sys_lsetxattr /* 210 */
1128 .llong .sys_fsetxattr
1129 .llong .sys_getxattr
1130 .llong .sys_lgetxattr
1131 .llong .sys_fgetxattr
1132 .llong .sys_listxattr /* 215 */
1133 .llong .sys_llistxattr
1134 .llong .sys_flistxattr
1135 .llong .sys_removexattr
1136 .llong .sys_lremovexattr
1137 .llong .sys_fremovexattr /* 220 */
1138 .llong .compat_sys_futex
1139 .llong .compat_sys_sched_setaffinity
1140 .llong .compat_sys_sched_getaffinity
1141 .llong .sys_ni_syscall
1142 .llong .sys_ni_syscall /* 225 - reserved for tux */
1143 .llong .sys32_sendfile64
1144 .llong .compat_sys_io_setup
1145 .llong .sys_io_destroy
1146 .llong .compat_sys_io_getevents
1147 .llong .compat_sys_io_submit
1148 .llong .sys_io_cancel
1149 .llong .sys_set_tid_address
1150 .llong .ppc32_fadvise64
1151 .llong .sys_exit_group
1152 .llong .ppc32_lookup_dcookie /* 235 */
1153 .llong .sys_epoll_create
1154 .llong .sys_epoll_ctl
1155 .llong .sys_epoll_wait
1156 .llong .sys_remap_file_pages
1157 .llong .ppc32_timer_create /* 240 */
1158 .llong .compat_sys_timer_settime
1159 .llong .compat_sys_timer_gettime
1160 .llong .sys_timer_getoverrun
1161 .llong .sys_timer_delete
1162 .llong .compat_sys_clock_settime /* 245 */
1163 .llong .compat_sys_clock_gettime
1164 .llong .compat_sys_clock_getres
1165 .llong .compat_sys_clock_nanosleep
1166 .llong .ppc32_swapcontext
1167 .llong .sys32_tgkill /* 250 */
1168 .llong .sys32_utimes
1169 .llong .compat_sys_statfs64
1170 .llong .compat_sys_fstatfs64
1171 .llong .ppc32_fadvise64_64 /* 32bit only fadvise64_64 */
1172 .llong .ppc_rtas /* 255 */
1173 .llong .sys_ni_syscall /* 256 reserved for sys_debug_setcontext */
1174 .llong .sys_ni_syscall /* 257 reserved for vserver */
1175 .llong .sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */
1176 .llong .compat_sys_mbind
1177 .llong .compat_sys_get_mempolicy /* 260 */
1178 .llong .compat_sys_set_mempolicy
1179 .llong .compat_sys_mq_open
1180 .llong .sys_mq_unlink
1181 .llong .compat_sys_mq_timedsend
1182 .llong .compat_sys_mq_timedreceive /* 265 */
1183 .llong .compat_sys_mq_notify
1184 .llong .compat_sys_mq_getsetattr
1185 .llong .compat_sys_kexec_load
1186 .llong .sys32_add_key
1187 .llong .sys32_request_key /* 270 */
1188 .llong .compat_sys_keyctl
1189 .llong .compat_sys_waitid
1190 .llong .sys32_ioprio_set
1191 .llong .sys32_ioprio_get
1192 .llong .sys_inotify_init /* 275 */
1193 .llong .sys_inotify_add_watch
1194 .llong .sys_inotify_rm_watch
1197 _GLOBAL(sys_call_table)
1198 .llong .sys_restart_syscall /* 0 */
1203 .llong .sys_open /* 5 */
1208 .llong .sys_unlink /* 10 */
1213 .llong .sys_chmod /* 15 */
1215 .llong .sys_ni_syscall /* old break syscall */
1216 .llong .sys_ni_syscall /* old stat syscall */
1218 .llong .sys_getpid /* 20 */
1220 .llong .sys_ni_syscall /* old umount syscall */
1223 .llong .sys_stime /* 25 */
1226 .llong .sys_ni_syscall /* old fstat syscall */
1228 .llong .sys_utime /* 30 */
1229 .llong .sys_ni_syscall /* old stty syscall */
1230 .llong .sys_ni_syscall /* old gtty syscall */
1233 .llong .sys_ni_syscall /* 35 - old ftime syscall */
1238 .llong .sys_rmdir /* 40 */
1242 .llong .sys_ni_syscall /* old prof syscall */
1243 .llong .sys_brk /* 45 */
1248 .llong .sys_getegid /* 50 */
1251 .llong .sys_ni_syscall /* old lock syscall */
1253 .llong .sys_fcntl /* 55 */
1254 .llong .sys_ni_syscall /* old mpx syscall */
1256 .llong .sys_ni_syscall /* old ulimit syscall */
1257 .llong .sys_ni_syscall /* old uname syscall */
1258 .llong .sys_umask /* 60 */
1263 .llong .sys_getpgrp /* 65 */
1265 .llong .sys_ni_syscall
1266 .llong .sys_sgetmask
1267 .llong .sys_ssetmask
1268 .llong .sys_setreuid /* 70 */
1269 .llong .sys_setregid
1270 .llong .sys_ni_syscall
1271 .llong .sys_ni_syscall
1272 .llong .sys_sethostname
1273 .llong .sys_setrlimit /* 75 */
1274 .llong .sys_ni_syscall /* old getrlimit syscall */
1275 .llong .sys_getrusage
1276 .llong .sys_gettimeofday
1277 .llong .sys_settimeofday
1278 .llong .sys_getgroups /* 80 */
1279 .llong .sys_setgroups
1280 .llong .sys_ni_syscall /* old select syscall */
1282 .llong .sys_ni_syscall /* old lstat syscall */
1283 .llong .sys_readlink /* 85 */
1287 .llong .sys_ni_syscall /* old readdir syscall */
1288 .llong .sys_mmap /* 90 */
1290 .llong .sys_truncate
1291 .llong .sys_ftruncate
1293 .llong .sys_fchown /* 95 */
1294 .llong .sys_getpriority
1295 .llong .sys_setpriority
1296 .llong .sys_ni_syscall /* old profil syscall holder */
1298 .llong .sys_fstatfs /* 100 */
1299 .llong .sys_ni_syscall /* old ioperm syscall */
1300 .llong .sys_socketcall
1302 .llong .sys_setitimer
1303 .llong .sys_getitimer /* 105 */
1305 .llong .sys_newlstat
1306 .llong .sys_newfstat
1307 .llong .sys_ni_syscall /* old uname syscall */
1308 .llong .sys_ni_syscall /* 110 old iopl syscall */
1310 .llong .sys_ni_syscall /* old idle syscall */
1311 .llong .sys_ni_syscall /* old vm86 syscall */
1313 .llong .sys_swapoff /* 115 */
1317 .llong .sys_ni_syscall
1318 .llong .ppc_clone /* 120 */
1319 .llong .sys_setdomainname
1320 .llong .ppc64_newuname
1321 .llong .sys_ni_syscall /* old modify_ldt syscall */
1322 .llong .sys_adjtimex
1323 .llong .sys_mprotect /* 125 */
1324 .llong .sys_ni_syscall
1325 .llong .sys_ni_syscall /* old create_module syscall */
1326 .llong .sys_init_module
1327 .llong .sys_delete_module
1328 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */
1329 .llong .sys_quotactl
1333 .llong .sys_sysfs /* 135 */
1334 .llong .ppc64_personality
1335 .llong .sys_ni_syscall /* for afs_syscall */
1336 .llong .sys_setfsuid
1337 .llong .sys_setfsgid
1338 .llong .sys_llseek /* 140 */
1339 .llong .sys_getdents
1343 .llong .sys_readv /* 145 */
1346 .llong .sys_fdatasync
1348 .llong .sys_mlock /* 150 */
1350 .llong .sys_mlockall
1351 .llong .sys_munlockall
1352 .llong .sys_sched_setparam
1353 .llong .sys_sched_getparam /* 155 */
1354 .llong .sys_sched_setscheduler
1355 .llong .sys_sched_getscheduler
1356 .llong .sys_sched_yield
1357 .llong .sys_sched_get_priority_max
1358 .llong .sys_sched_get_priority_min /* 160 */
1359 .llong .sys_sched_rr_get_interval
1360 .llong .sys_nanosleep
1362 .llong .sys_setresuid
1363 .llong .sys_getresuid /* 165 */
1364 .llong .sys_ni_syscall /* old query_module syscall */
1366 .llong .sys_nfsservctl
1367 .llong .sys_setresgid
1368 .llong .sys_getresgid /* 170 */
1370 .llong .ppc64_rt_sigreturn
1371 .llong .sys_rt_sigaction
1372 .llong .sys_rt_sigprocmask
1373 .llong .sys_rt_sigpending /* 175 */
1374 .llong .sys_rt_sigtimedwait
1375 .llong .sys_rt_sigqueueinfo
1376 .llong .ppc64_rt_sigsuspend
1378 .llong .sys_pwrite64 /* 180 */
1383 .llong .sys_sigaltstack /* 185 */
1384 .llong .sys_sendfile64
1385 .llong .sys_ni_syscall /* reserved for streams1 */
1386 .llong .sys_ni_syscall /* reserved for streams2 */
1388 .llong .sys_getrlimit /* 190 */
1389 .llong .sys_readahead
1390 .llong .sys_ni_syscall /* 32bit only mmap2 */
1391 .llong .sys_ni_syscall /* 32bit only truncate64 */
1392 .llong .sys_ni_syscall /* 32bit only ftruncate64 */
1393 .llong .sys_ni_syscall /* 195 - 32bit only stat64 */
1394 .llong .sys_ni_syscall /* 32bit only lstat64 */
1395 .llong .sys_ni_syscall /* 32bit only fstat64 */
1396 .llong .sys_pciconfig_read
1397 .llong .sys_pciconfig_write
1398 .llong .sys_pciconfig_iobase /* 200 - pciconfig_iobase */
1399 .llong .sys_ni_syscall /* reserved for MacOnLinux */
1400 .llong .sys_getdents64
1401 .llong .sys_pivot_root
1402 .llong .sys_ni_syscall /* 32bit only fcntl64 */
1403 .llong .sys_madvise /* 205 */
1407 .llong .sys_setxattr
1408 .llong .sys_lsetxattr /* 210 */
1409 .llong .sys_fsetxattr
1410 .llong .sys_getxattr
1411 .llong .sys_lgetxattr
1412 .llong .sys_fgetxattr
1413 .llong .sys_listxattr /* 215 */
1414 .llong .sys_llistxattr
1415 .llong .sys_flistxattr
1416 .llong .sys_removexattr
1417 .llong .sys_lremovexattr
1418 .llong .sys_fremovexattr /* 220 */
1420 .llong .sys_sched_setaffinity
1421 .llong .sys_sched_getaffinity
1422 .llong .sys_ni_syscall
1423 .llong .sys_ni_syscall /* 225 - reserved for tux */
1424 .llong .sys_ni_syscall /* 32bit only sendfile64 */
1425 .llong .sys_io_setup
1426 .llong .sys_io_destroy
1427 .llong .sys_io_getevents
1428 .llong .sys_io_submit /* 230 */
1429 .llong .sys_io_cancel
1430 .llong .sys_set_tid_address
1431 .llong .sys_fadvise64
1432 .llong .sys_exit_group
1433 .llong .sys_lookup_dcookie /* 235 */
1434 .llong .sys_epoll_create
1435 .llong .sys_epoll_ctl
1436 .llong .sys_epoll_wait
1437 .llong .sys_remap_file_pages
1438 .llong .sys_timer_create /* 240 */
1439 .llong .sys_timer_settime
1440 .llong .sys_timer_gettime
1441 .llong .sys_timer_getoverrun
1442 .llong .sys_timer_delete
1443 .llong .sys_clock_settime /* 245 */
1444 .llong .sys_clock_gettime
1445 .llong .sys_clock_getres
1446 .llong .sys_clock_nanosleep
1447 .llong .ppc64_swapcontext
1448 .llong .sys_tgkill /* 250 */
1450 .llong .sys_statfs64
1451 .llong .sys_fstatfs64
1452 .llong .sys_ni_syscall /* 32bit only fadvise64_64 */
1453 .llong .ppc_rtas /* 255 */
1454 .llong .sys_ni_syscall /* 256 reserved for sys_debug_setcontext */
1455 .llong .sys_ni_syscall /* 257 reserved for vserver */
1456 .llong .sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */
1458 .llong .sys_get_mempolicy /* 260 */
1459 .llong .sys_set_mempolicy
1461 .llong .sys_mq_unlink
1462 .llong .sys_mq_timedsend
1463 .llong .sys_mq_timedreceive /* 265 */
1464 .llong .sys_mq_notify
1465 .llong .sys_mq_getsetattr
1466 .llong .sys_kexec_load
1468 .llong .sys_request_key /* 270 */
1471 .llong .sys_ioprio_set
1472 .llong .sys_ioprio_get
1473 .llong .sys_inotify_init /* 275 */
1474 .llong .sys_inotify_add_watch
1475 .llong .sys_inotify_rm_watch