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/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_PPC_ISERIES
69 /* unsigned long local_save_flags(void) */
70 _GLOBAL(local_get_flags)
71 lbz r3,PACAPROCENABLED(r13)
74 /* unsigned long local_irq_disable(void) */
75 _GLOBAL(local_irq_disable)
76 lbz r3,PACAPROCENABLED(r13)
78 stb r4,PACAPROCENABLED(r13)
81 /* void local_irq_restore(unsigned long flags) */
82 _GLOBAL(local_irq_restore)
83 lbz r5,PACAPROCENABLED(r13)
84 /* Check if things are setup the way we want _already_. */
87 /* are we enabling interrupts? */
89 stb r3,PACAPROCENABLED(r13)
91 /* Check pending interrupts */
92 /* A decrementer, IPI or PMC interrupt may have occurred
93 * while we were in the hypervisor (which enables) */
94 ld r4,PACALPPACA+LPPACAANYINT(r13)
99 * Handle pending interrupts in interrupt context
104 #endif /* CONFIG_PPC_ISERIES */
106 #ifdef CONFIG_IRQSTACKS
107 _GLOBAL(call_do_softirq)
110 stdu r1,THREAD_SIZE-112(r3)
118 _GLOBAL(call_handle_IRQ_event)
121 stdu r1,THREAD_SIZE-112(r6)
128 #endif /* CONFIG_IRQSTACKS */
131 * To be called by C code which needs to do some operations with MMU
132 * disabled. Note that interrupts have to be disabled by the caller
133 * prior to calling us. The code called _MUST_ be in the RMO of course
134 * and part of the linear mapping as we don't attempt to translate the
135 * stack pointer at all. The function is called with the stack switched
136 * to this CPU emergency stack
138 * prototype is void *call_with_mmu_off(void *func, void *data);
140 * the called function is expected to be of the form
142 * void *called(void *data);
144 _GLOBAL(call_with_mmu_off)
145 mflr r0 /* get link, save it on stackframe */
147 mr r1,r5 /* save old stack ptr */
148 ld r1,PACAEMERGSP(r13) /* get emerg. stack */
149 subi r1,r1,STACK_FRAME_OVERHEAD
150 std r0,16(r1) /* save link on emerg. stack */
151 std r5,0(r1) /* save old stack ptr in backchain */
152 ld r3,0(r3) /* get to real function ptr (assume same TOC) */
153 bl 2f /* we need LR to return, continue at label 2 */
155 ld r0,16(r1) /* we return here from the call, get LR and */
156 ld r1,0(r1) /* .. old stack ptr */
157 mtspr SPRN_SRR0,r0 /* and get back to virtual mode with these */
159 ori r4,r4,MSR_IR|MSR_DR
163 2: mtspr SPRN_SRR0,r3 /* coming from above, enter real mode */
164 mr r3,r4 /* get parameter */
166 ori r0,r0,MSR_IR|MSR_DR
167 xori r0,r0,MSR_IR|MSR_DR
174 .tc ppc64_caches[TC],ppc64_caches
178 * Write any modified data cache blocks out to memory
179 * and invalidate the corresponding instruction cache blocks.
181 * flush_icache_range(unsigned long start, unsigned long stop)
183 * flush all bytes from start through stop-1 inclusive
186 _GLOBAL(__flush_icache_range)
189 * Flush the data cache to memory
191 * Different systems have different cache line sizes
192 * and in some cases i-cache and d-cache line sizes differ from
195 ld r10,PPC64_CACHES@toc(r2)
196 lwz r7,DCACHEL1LINESIZE(r10)/* Get cache line size */
198 andc r6,r3,r5 /* round low to line bdy */
199 subf r8,r6,r4 /* compute length */
200 add r8,r8,r5 /* ensure we get enough */
201 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of cache line size */
202 srw. r8,r8,r9 /* compute line count */
203 beqlr /* nothing to do? */
210 /* Now invalidate the instruction cache */
212 lwz r7,ICACHEL1LINESIZE(r10) /* Get Icache line size */
214 andc r6,r3,r5 /* round low to line bdy */
215 subf r8,r6,r4 /* compute length */
217 lwz r9,ICACHEL1LOGLINESIZE(r10) /* Get log-2 of Icache line size */
218 srw. r8,r8,r9 /* compute line count */
219 beqlr /* nothing to do? */
228 * Like above, but only do the D-cache.
230 * flush_dcache_range(unsigned long start, unsigned long stop)
232 * flush all bytes from start to stop-1 inclusive
234 _GLOBAL(flush_dcache_range)
237 * Flush the data cache to memory
239 * Different systems have different cache line sizes
241 ld r10,PPC64_CACHES@toc(r2)
242 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
244 andc r6,r3,r5 /* round low to line bdy */
245 subf r8,r6,r4 /* compute length */
246 add r8,r8,r5 /* ensure we get enough */
247 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
248 srw. r8,r8,r9 /* compute line count */
249 beqlr /* nothing to do? */
258 * Like above, but works on non-mapped physical addresses.
259 * Use only for non-LPAR setups ! It also assumes real mode
260 * is cacheable. Used for flushing out the DART before using
261 * it as uncacheable memory
263 * flush_dcache_phys_range(unsigned long start, unsigned long stop)
265 * flush all bytes from start to stop-1 inclusive
267 _GLOBAL(flush_dcache_phys_range)
268 ld r10,PPC64_CACHES@toc(r2)
269 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
271 andc r6,r3,r5 /* round low to line bdy */
272 subf r8,r6,r4 /* compute length */
273 add r8,r8,r5 /* ensure we get enough */
274 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
275 srw. r8,r8,r9 /* compute line count */
276 beqlr /* nothing to do? */
277 mfmsr r5 /* Disable MMU Data Relocation */
290 mtmsr r5 /* Re-enable MMU Data Relocation */
295 _GLOBAL(flush_inval_dcache_range)
296 ld r10,PPC64_CACHES@toc(r2)
297 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
299 andc r6,r3,r5 /* round low to line bdy */
300 subf r8,r6,r4 /* compute length */
301 add r8,r8,r5 /* ensure we get enough */
302 lwz r9,DCACHEL1LOGLINESIZE(r10)/* Get log-2 of dcache line size */
303 srw. r8,r8,r9 /* compute line count */
304 beqlr /* nothing to do? */
317 * Flush a particular page from the data cache to RAM.
318 * Note: this is necessary because the instruction cache does *not*
319 * snoop from the data cache.
321 * void __flush_dcache_icache(void *page)
323 _GLOBAL(__flush_dcache_icache)
325 * Flush the data cache to memory
327 * Different systems have different cache line sizes
330 /* Flush the dcache */
331 ld r7,PPC64_CACHES@toc(r2)
332 clrrdi r3,r3,12 /* Page align */
333 lwz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */
334 lwz r5,DCACHEL1LINESIZE(r7) /* Get dcache line size */
342 /* Now invalidate the icache */
344 lwz r4,ICACHEL1LINESPERPAGE(r7) /* Get # icache lines per page */
345 lwz r5,ICACHEL1LINESIZE(r7) /* Get icache line size */
354 * I/O string operations
356 * insb(port, buf, len)
357 * outsb(port, buf, len)
358 * insw(port, buf, len)
359 * outsw(port, buf, len)
360 * insl(port, buf, len)
361 * outsl(port, buf, len)
362 * insw_ns(port, buf, len)
363 * outsw_ns(port, buf, len)
364 * insl_ns(port, buf, len)
365 * outsl_ns(port, buf, len)
367 * The *_ns versions don't do byte-swapping.
441 /* _GLOBAL(ide_insw) now in drivers/ide/ide-iops.c */
455 /* _GLOBAL(ide_outsw) now in drivers/ide/ide-iops.c */
493 lfd 0,0(r5) /* load up fpscr value */
497 mffs 0 /* save new fpscr value */
502 lfd 0,0(r5) /* load up fpscr value */
506 mffs 0 /* save new fpscr value */
511 * identify_cpu and calls setup_cpu
512 * In: r3 = base of the cpu_specs array
513 * r4 = address of cur_cpu_spec
514 * r5 = relocation offset
516 _GLOBAL(identify_cpu)
519 lwz r8,CPU_SPEC_PVR_MASK(r3)
521 lwz r9,CPU_SPEC_PVR_VALUE(r3)
524 addi r3,r3,CPU_SPEC_ENTRY_SIZE
529 ld r4,CPU_SPEC_SETUP(r3)
534 /* Calling convention for cpu setup is r3=offset, r4=cur_cpu_spec */
540 * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
541 * and writes nop's over sections of code that don't apply for this cpu.
542 * r3 = data offset (not changed)
544 _GLOBAL(do_cpu_ftr_fixups)
545 /* Get CPU 0 features */
546 LOADADDR(r6,cur_cpu_spec)
550 ld r4,CPU_SPEC_FEATURES(r4)
551 /* Get the fixup table */
552 LOADADDR(r6,__start___ftr_fixup)
554 LOADADDR(r7,__stop___ftr_fixup)
560 ld r8,-32(r6) /* mask */
562 ld r9,-24(r6) /* value */
565 ld r8,-16(r6) /* section begin */
566 ld r9,-8(r6) /* section end */
569 /* write nops over the section of code */
570 /* todo: if large section, add a branch at the start of it */
574 lis r0,0x60000000@h /* nop */
576 andi. r10,r4,CPU_FTR_SPLIT_ID_CACHE@l
578 dcbst 0,r8 /* suboptimal, but simpler */
583 sync /* additional sync needed on g4 */
587 #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE)
589 * Do an IO access in real mode
620 * Do an IO access in real mode
649 #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */
652 * Create a kernel thread
653 * kernel_thread(fn, arg, flags)
655 _GLOBAL(kernel_thread)
658 stdu r1,-STACK_FRAME_OVERHEAD(r1)
661 ori r3,r5,CLONE_VM /* flags */
662 oris r3,r3,(CLONE_UNTRACED>>16)
663 li r4,0 /* new sp (unused) */
666 cmpdi 0,r3,0 /* parent or child? */
667 bne 1f /* return if parent */
669 stdu r0,-STACK_FRAME_OVERHEAD(r1)
672 mtlr r29 /* fn addr in lr */
673 mr r3,r30 /* load arg and call fn */
675 li r0,__NR_exit /* exit after child exits */
678 1: addi r1,r1,STACK_FRAME_OVERHEAD
683 /* kexec_wait(phys_cpu)
685 * wait for the flag to change, indicating this kernel is going away but
686 * the slave code for the next one is at addresses 0 to 100.
688 * This is used by all slaves.
690 * Physical (hardware) cpu id should be in r3.
695 addi r5,r5,kexec_flag-1b
698 #ifdef CONFIG_KEXEC /* use no memory without kexec */
705 /* this can be in text because we won't change it until we are
706 * running in real anyways
714 /* kexec_smp_wait(void)
716 * call with interrupts off
717 * note: this is a terminal routine, it does not save lr
719 * get phys id from paca
720 * set paca id to -1 to say we got here
721 * switch to real mode
722 * join other cpus in kexec_wait(phys_id)
724 _GLOBAL(kexec_smp_wait)
725 lhz r3,PACAHWCPUID(r13)
727 sth r4,PACAHWCPUID(r13) /* let others know we left */
732 * switch to real mode (turn mmu off)
733 * we use the early kernel trick that the hardware ignores bits
734 * 0 and 1 (big endian) of the effective address in real mode
736 * don't overwrite r3 here, it is live for kexec_wait above.
738 real_mode: /* assume normal blr return */
741 mflr r11 /* return address to SRR0 */
753 * kexec_sequence(newstack, start, image, control, clear_all())
755 * does the grungy work with stack switching and real mode switches
756 * also does simple calls to other code
759 _GLOBAL(kexec_sequence)
763 /* switch stacks to newstack -- &kexec_stack.stack */
764 stdu r1,THREAD_SIZE-112(r3)
770 /* save regs for local vars on new stack.
771 * yes, we won't go back, but ...
783 /* save args into preserved regs */
784 mr r31,r3 /* newstack (both) */
785 mr r30,r4 /* start (real) */
786 mr r29,r5 /* image (virt) */
787 mr r28,r6 /* control, unused */
788 mr r27,r7 /* clear_all() fn desc */
789 mr r26,r8 /* spare */
790 lhz r25,PACAHWCPUID(r13) /* get our phys cpu from paca */
792 /* disable interrupts, we are overwriting kernel data next */
797 /* copy dest pages, flush whole dest image */
799 bl .kexec_copy_flush /* (image) */
804 /* clear out hardware hash page table and tlb */
805 ld r5,0(r27) /* deref function descriptor */
807 bctrl /* ppc_md.hash_clear_all(void); */
810 * kexec image calling is:
811 * the first 0x100 bytes of the entry point are copied to 0
813 * all slaves branch to slave = 0x60 (absolute)
814 * slave(phys_cpu_id);
816 * master goes to start = entry point
817 * start(phys_cpu_id, start, 0);
820 * a wrapper is needed to call existing kernels, here is an approximate
821 * description of one method:
824 * start will be near the boot_block (maybe 0x100 bytes before it?)
825 * it will have a 0x60, which will b to boot_block, where it will wait
826 * and 0 will store phys into struct boot-block and load r3 from there,
827 * copy kernel 0-0x100 and tell slaves to back down to 0x60 again
830 * boot block will have all cpus scanning device tree to see if they
831 * are the boot cpu ?????
832 * other device tree differences (prop sizes, va vs pa, etc)...
835 /* copy 0x100 bytes starting at start to 0 */
840 bl .copy_and_flush /* (dest, src, copy limit, start offset) */
841 1: /* assume normal blr return */
843 /* release other cpus to the new kernel secondary start at 0x60 */
846 stw r6,kexec_flag-1b(5)
847 mr r3,r25 # my phys cpu
848 mr r4,r30 # start, aka phys mem offset
851 blr /* image->start(physid, image->start, 0); */
852 #endif /* CONFIG_KEXEC */
854 /* Why isn't this a) automatic, b) written in 'C'? */
856 _GLOBAL(sys_call_table32)
857 .llong .sys_restart_syscall /* 0 */
862 .llong .sys32_open /* 5 */
864 .llong .sys32_waitpid
867 .llong .sys_unlink /* 10 */
870 .llong .compat_sys_time
872 .llong .sys_chmod /* 15 */
874 .llong .sys_ni_syscall /* old break syscall */
875 .llong .sys_ni_syscall /* old stat syscall */
877 .llong .sys_getpid /* 20 */
878 .llong .compat_sys_mount
879 .llong .sys_oldumount
882 .llong .compat_sys_stime /* 25 */
885 .llong .sys_ni_syscall /* old fstat syscall */
887 .llong .compat_sys_utime /* 30 */
888 .llong .sys_ni_syscall /* old stty syscall */
889 .llong .sys_ni_syscall /* old gtty syscall */
892 .llong .sys_ni_syscall /* 35 - old ftime syscall */
897 .llong .sys_rmdir /* 40 */
900 .llong .compat_sys_times
901 .llong .sys_ni_syscall /* old prof syscall */
902 .llong .sys_brk /* 45 */
907 .llong .sys_getegid /* 50 */
910 .llong .sys_ni_syscall /* old lock syscall */
911 .llong .compat_sys_ioctl
912 .llong .compat_sys_fcntl /* 55 */
913 .llong .sys_ni_syscall /* old mpx syscall */
914 .llong .sys32_setpgid
915 .llong .sys_ni_syscall /* old ulimit syscall */
916 .llong .sys32_olduname
917 .llong .sys32_umask /* 60 */
922 .llong .sys_getpgrp /* 65 */
924 .llong .sys32_sigaction
926 .llong .sys32_ssetmask
927 .llong .sys_setreuid /* 70 */
929 .llong .ppc32_sigsuspend
930 .llong .compat_sys_sigpending
931 .llong .sys32_sethostname
932 .llong .compat_sys_setrlimit /* 75 */
933 .llong .compat_sys_old_getrlimit
934 .llong .compat_sys_getrusage
935 .llong .sys32_gettimeofday
936 .llong .sys32_settimeofday
937 .llong .sys32_getgroups /* 80 */
938 .llong .sys32_setgroups
939 .llong .sys_ni_syscall /* old select syscall */
941 .llong .sys_ni_syscall /* old lstat syscall */
942 .llong .sys32_readlink /* 85 */
946 .llong .old32_readdir
947 .llong .sys_mmap /* 90 */
950 .llong .sys_ftruncate
952 .llong .sys_fchown /* 95 */
953 .llong .sys32_getpriority
954 .llong .sys32_setpriority
955 .llong .sys_ni_syscall /* old profil syscall */
956 .llong .compat_sys_statfs
957 .llong .compat_sys_fstatfs /* 100 */
958 .llong .sys_ni_syscall /* old ioperm syscall */
959 .llong .compat_sys_socketcall
961 .llong .compat_sys_setitimer
962 .llong .compat_sys_getitimer /* 105 */
963 .llong .compat_sys_newstat
964 .llong .compat_sys_newlstat
965 .llong .compat_sys_newfstat
967 .llong .sys_ni_syscall /* 110 old iopl syscall */
969 .llong .sys_ni_syscall /* old idle syscall */
970 .llong .sys_ni_syscall /* old vm86 syscall */
971 .llong .compat_sys_wait4
972 .llong .sys_swapoff /* 115 */
973 .llong .sys32_sysinfo
976 .llong .ppc32_sigreturn
977 .llong .ppc_clone /* 120 */
978 .llong .sys32_setdomainname
979 .llong .ppc64_newuname
980 .llong .sys_ni_syscall /* old modify_ldt syscall */
981 .llong .sys32_adjtimex
982 .llong .sys_mprotect /* 125 */
983 .llong .compat_sys_sigprocmask
984 .llong .sys_ni_syscall /* old create_module syscall */
985 .llong .sys_init_module
986 .llong .sys_delete_module
987 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */
989 .llong .sys32_getpgid
992 .llong .sys32_sysfs /* 135 */
993 .llong .ppc64_personality
994 .llong .sys_ni_syscall /* for afs_syscall */
997 .llong .sys_llseek /* 140 */
998 .llong .sys32_getdents
1002 .llong .compat_sys_readv /* 145 */
1003 .llong .compat_sys_writev
1004 .llong .sys32_getsid
1005 .llong .sys_fdatasync
1006 .llong .sys32_sysctl
1007 .llong .sys_mlock /* 150 */
1009 .llong .sys_mlockall
1010 .llong .sys_munlockall
1011 .llong .sys32_sched_setparam
1012 .llong .sys32_sched_getparam /* 155 */
1013 .llong .sys32_sched_setscheduler
1014 .llong .sys32_sched_getscheduler
1015 .llong .sys_sched_yield
1016 .llong .sys32_sched_get_priority_max
1017 .llong .sys32_sched_get_priority_min /* 160 */
1018 .llong .sys32_sched_rr_get_interval
1019 .llong .compat_sys_nanosleep
1021 .llong .sys_setresuid
1022 .llong .sys_getresuid /* 165 */
1023 .llong .sys_ni_syscall /* old query_module syscall */
1025 .llong .compat_sys_nfsservctl
1026 .llong .sys_setresgid
1027 .llong .sys_getresgid /* 170 */
1029 .llong .ppc32_rt_sigreturn
1030 .llong .sys32_rt_sigaction
1031 .llong .sys32_rt_sigprocmask
1032 .llong .sys32_rt_sigpending /* 175 */
1033 .llong .compat_sys_rt_sigtimedwait
1034 .llong .sys32_rt_sigqueueinfo
1035 .llong .ppc32_rt_sigsuspend
1036 .llong .sys32_pread64
1037 .llong .sys32_pwrite64 /* 180 */
1042 .llong .sys32_sigaltstack /* 185 */
1043 .llong .sys32_sendfile
1044 .llong .sys_ni_syscall /* reserved for streams1 */
1045 .llong .sys_ni_syscall /* reserved for streams2 */
1047 .llong .compat_sys_getrlimit /* 190 */
1048 .llong .sys32_readahead
1050 .llong .sys32_truncate64
1051 .llong .sys32_ftruncate64
1052 .llong .sys_stat64 /* 195 */
1055 .llong .sys32_pciconfig_read
1056 .llong .sys32_pciconfig_write
1057 .llong .sys32_pciconfig_iobase /* 200 - pciconfig_iobase */
1058 .llong .sys_ni_syscall /* reserved for MacOnLinux */
1059 .llong .sys_getdents64
1060 .llong .sys_pivot_root
1061 .llong .compat_sys_fcntl64
1062 .llong .sys_madvise /* 205 */
1066 .llong .sys_setxattr
1067 .llong .sys_lsetxattr /* 210 */
1068 .llong .sys_fsetxattr
1069 .llong .sys_getxattr
1070 .llong .sys_lgetxattr
1071 .llong .sys_fgetxattr
1072 .llong .sys_listxattr /* 215 */
1073 .llong .sys_llistxattr
1074 .llong .sys_flistxattr
1075 .llong .sys_removexattr
1076 .llong .sys_lremovexattr
1077 .llong .sys_fremovexattr /* 220 */
1078 .llong .compat_sys_futex
1079 .llong .compat_sys_sched_setaffinity
1080 .llong .compat_sys_sched_getaffinity
1081 .llong .sys_ni_syscall
1082 .llong .sys_ni_syscall /* 225 - reserved for tux */
1083 .llong .sys32_sendfile64
1084 .llong .compat_sys_io_setup
1085 .llong .sys_io_destroy
1086 .llong .compat_sys_io_getevents
1087 .llong .compat_sys_io_submit
1088 .llong .sys_io_cancel
1089 .llong .sys_set_tid_address
1090 .llong .ppc32_fadvise64
1091 .llong .sys_exit_group
1092 .llong .ppc32_lookup_dcookie /* 235 */
1093 .llong .sys_epoll_create
1094 .llong .sys_epoll_ctl
1095 .llong .sys_epoll_wait
1096 .llong .sys_remap_file_pages
1097 .llong .ppc32_timer_create /* 240 */
1098 .llong .compat_sys_timer_settime
1099 .llong .compat_sys_timer_gettime
1100 .llong .sys_timer_getoverrun
1101 .llong .sys_timer_delete
1102 .llong .compat_sys_clock_settime /* 245 */
1103 .llong .compat_sys_clock_gettime
1104 .llong .compat_sys_clock_getres
1105 .llong .compat_sys_clock_nanosleep
1106 .llong .ppc32_swapcontext
1107 .llong .sys32_tgkill /* 250 */
1108 .llong .sys32_utimes
1109 .llong .compat_sys_statfs64
1110 .llong .compat_sys_fstatfs64
1111 .llong .ppc32_fadvise64_64 /* 32bit only fadvise64_64 */
1112 .llong .ppc_rtas /* 255 */
1113 .llong .sys_ni_syscall /* 256 reserved for sys_debug_setcontext */
1114 .llong .sys_ni_syscall /* 257 reserved for vserver */
1115 .llong .sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */
1116 .llong .compat_sys_mbind
1117 .llong .compat_sys_get_mempolicy /* 260 */
1118 .llong .compat_sys_set_mempolicy
1119 .llong .compat_sys_mq_open
1120 .llong .sys_mq_unlink
1121 .llong .compat_sys_mq_timedsend
1122 .llong .compat_sys_mq_timedreceive /* 265 */
1123 .llong .compat_sys_mq_notify
1124 .llong .compat_sys_mq_getsetattr
1125 .llong .compat_sys_kexec_load
1126 .llong .sys32_add_key
1127 .llong .sys32_request_key /* 270 */
1128 .llong .compat_sys_keyctl
1129 .llong .compat_sys_waitid
1130 .llong .sys32_ioprio_set
1131 .llong .sys32_ioprio_get
1134 _GLOBAL(sys_call_table)
1135 .llong .sys_restart_syscall /* 0 */
1140 .llong .sys_open /* 5 */
1145 .llong .sys_unlink /* 10 */
1150 .llong .sys_chmod /* 15 */
1152 .llong .sys_ni_syscall /* old break syscall */
1153 .llong .sys_ni_syscall /* old stat syscall */
1155 .llong .sys_getpid /* 20 */
1157 .llong .sys_ni_syscall /* old umount syscall */
1160 .llong .sys_stime /* 25 */
1163 .llong .sys_ni_syscall /* old fstat syscall */
1165 .llong .sys_utime /* 30 */
1166 .llong .sys_ni_syscall /* old stty syscall */
1167 .llong .sys_ni_syscall /* old gtty syscall */
1170 .llong .sys_ni_syscall /* 35 - old ftime syscall */
1175 .llong .sys_rmdir /* 40 */
1179 .llong .sys_ni_syscall /* old prof syscall */
1180 .llong .sys_brk /* 45 */
1185 .llong .sys_getegid /* 50 */
1188 .llong .sys_ni_syscall /* old lock syscall */
1190 .llong .sys_fcntl /* 55 */
1191 .llong .sys_ni_syscall /* old mpx syscall */
1193 .llong .sys_ni_syscall /* old ulimit syscall */
1194 .llong .sys_ni_syscall /* old uname syscall */
1195 .llong .sys_umask /* 60 */
1200 .llong .sys_getpgrp /* 65 */
1202 .llong .sys_ni_syscall
1203 .llong .sys_sgetmask
1204 .llong .sys_ssetmask
1205 .llong .sys_setreuid /* 70 */
1206 .llong .sys_setregid
1207 .llong .sys_ni_syscall
1208 .llong .sys_ni_syscall
1209 .llong .sys_sethostname
1210 .llong .sys_setrlimit /* 75 */
1211 .llong .sys_ni_syscall /* old getrlimit syscall */
1212 .llong .sys_getrusage
1213 .llong .sys_gettimeofday
1214 .llong .sys_settimeofday
1215 .llong .sys_getgroups /* 80 */
1216 .llong .sys_setgroups
1217 .llong .sys_ni_syscall /* old select syscall */
1219 .llong .sys_ni_syscall /* old lstat syscall */
1220 .llong .sys_readlink /* 85 */
1224 .llong .sys_ni_syscall /* old readdir syscall */
1225 .llong .sys_mmap /* 90 */
1227 .llong .sys_truncate
1228 .llong .sys_ftruncate
1230 .llong .sys_fchown /* 95 */
1231 .llong .sys_getpriority
1232 .llong .sys_setpriority
1233 .llong .sys_ni_syscall /* old profil syscall holder */
1235 .llong .sys_fstatfs /* 100 */
1236 .llong .sys_ni_syscall /* old ioperm syscall */
1237 .llong .sys_socketcall
1239 .llong .sys_setitimer
1240 .llong .sys_getitimer /* 105 */
1242 .llong .sys_newlstat
1243 .llong .sys_newfstat
1244 .llong .sys_ni_syscall /* old uname syscall */
1245 .llong .sys_ni_syscall /* 110 old iopl syscall */
1247 .llong .sys_ni_syscall /* old idle syscall */
1248 .llong .sys_ni_syscall /* old vm86 syscall */
1250 .llong .sys_swapoff /* 115 */
1254 .llong .sys_ni_syscall
1255 .llong .ppc_clone /* 120 */
1256 .llong .sys_setdomainname
1257 .llong .ppc64_newuname
1258 .llong .sys_ni_syscall /* old modify_ldt syscall */
1259 .llong .sys_adjtimex
1260 .llong .sys_mprotect /* 125 */
1261 .llong .sys_ni_syscall
1262 .llong .sys_ni_syscall /* old create_module syscall */
1263 .llong .sys_init_module
1264 .llong .sys_delete_module
1265 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */
1266 .llong .sys_quotactl
1270 .llong .sys_sysfs /* 135 */
1271 .llong .ppc64_personality
1272 .llong .sys_ni_syscall /* for afs_syscall */
1273 .llong .sys_setfsuid
1274 .llong .sys_setfsgid
1275 .llong .sys_llseek /* 140 */
1276 .llong .sys_getdents
1280 .llong .sys_readv /* 145 */
1283 .llong .sys_fdatasync
1285 .llong .sys_mlock /* 150 */
1287 .llong .sys_mlockall
1288 .llong .sys_munlockall
1289 .llong .sys_sched_setparam
1290 .llong .sys_sched_getparam /* 155 */
1291 .llong .sys_sched_setscheduler
1292 .llong .sys_sched_getscheduler
1293 .llong .sys_sched_yield
1294 .llong .sys_sched_get_priority_max
1295 .llong .sys_sched_get_priority_min /* 160 */
1296 .llong .sys_sched_rr_get_interval
1297 .llong .sys_nanosleep
1299 .llong .sys_setresuid
1300 .llong .sys_getresuid /* 165 */
1301 .llong .sys_ni_syscall /* old query_module syscall */
1303 .llong .sys_nfsservctl
1304 .llong .sys_setresgid
1305 .llong .sys_getresgid /* 170 */
1307 .llong .ppc64_rt_sigreturn
1308 .llong .sys_rt_sigaction
1309 .llong .sys_rt_sigprocmask
1310 .llong .sys_rt_sigpending /* 175 */
1311 .llong .sys_rt_sigtimedwait
1312 .llong .sys_rt_sigqueueinfo
1313 .llong .ppc64_rt_sigsuspend
1315 .llong .sys_pwrite64 /* 180 */
1320 .llong .sys_sigaltstack /* 185 */
1321 .llong .sys_sendfile64
1322 .llong .sys_ni_syscall /* reserved for streams1 */
1323 .llong .sys_ni_syscall /* reserved for streams2 */
1325 .llong .sys_getrlimit /* 190 */
1326 .llong .sys_readahead
1327 .llong .sys_ni_syscall /* 32bit only mmap2 */
1328 .llong .sys_ni_syscall /* 32bit only truncate64 */
1329 .llong .sys_ni_syscall /* 32bit only ftruncate64 */
1330 .llong .sys_ni_syscall /* 195 - 32bit only stat64 */
1331 .llong .sys_ni_syscall /* 32bit only lstat64 */
1332 .llong .sys_ni_syscall /* 32bit only fstat64 */
1333 .llong .sys_ni_syscall /* 32bit only pciconfig_read */
1334 .llong .sys_ni_syscall /* 32bit only pciconfig_write */
1335 .llong .sys_ni_syscall /* 32bit only pciconfig_iobase */
1336 .llong .sys_ni_syscall /* reserved for MacOnLinux */
1337 .llong .sys_getdents64
1338 .llong .sys_pivot_root
1339 .llong .sys_ni_syscall /* 32bit only fcntl64 */
1340 .llong .sys_madvise /* 205 */
1344 .llong .sys_setxattr
1345 .llong .sys_lsetxattr /* 210 */
1346 .llong .sys_fsetxattr
1347 .llong .sys_getxattr
1348 .llong .sys_lgetxattr
1349 .llong .sys_fgetxattr
1350 .llong .sys_listxattr /* 215 */
1351 .llong .sys_llistxattr
1352 .llong .sys_flistxattr
1353 .llong .sys_removexattr
1354 .llong .sys_lremovexattr
1355 .llong .sys_fremovexattr /* 220 */
1357 .llong .sys_sched_setaffinity
1358 .llong .sys_sched_getaffinity
1359 .llong .sys_ni_syscall
1360 .llong .sys_ni_syscall /* 225 - reserved for tux */
1361 .llong .sys_ni_syscall /* 32bit only sendfile64 */
1362 .llong .sys_io_setup
1363 .llong .sys_io_destroy
1364 .llong .sys_io_getevents
1365 .llong .sys_io_submit /* 230 */
1366 .llong .sys_io_cancel
1367 .llong .sys_set_tid_address
1368 .llong .sys_fadvise64
1369 .llong .sys_exit_group
1370 .llong .sys_lookup_dcookie /* 235 */
1371 .llong .sys_epoll_create
1372 .llong .sys_epoll_ctl
1373 .llong .sys_epoll_wait
1374 .llong .sys_remap_file_pages
1375 .llong .sys_timer_create /* 240 */
1376 .llong .sys_timer_settime
1377 .llong .sys_timer_gettime
1378 .llong .sys_timer_getoverrun
1379 .llong .sys_timer_delete
1380 .llong .sys_clock_settime /* 245 */
1381 .llong .sys_clock_gettime
1382 .llong .sys_clock_getres
1383 .llong .sys_clock_nanosleep
1384 .llong .ppc64_swapcontext
1385 .llong .sys_tgkill /* 250 */
1387 .llong .sys_statfs64
1388 .llong .sys_fstatfs64
1389 .llong .sys_ni_syscall /* 32bit only fadvise64_64 */
1390 .llong .ppc_rtas /* 255 */
1391 .llong .sys_ni_syscall /* 256 reserved for sys_debug_setcontext */
1392 .llong .sys_ni_syscall /* 257 reserved for vserver */
1393 .llong .sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */
1395 .llong .sys_get_mempolicy /* 260 */
1396 .llong .sys_set_mempolicy
1398 .llong .sys_mq_unlink
1399 .llong .sys_mq_timedsend
1400 .llong .sys_mq_timedreceive /* 265 */
1401 .llong .sys_mq_notify
1402 .llong .sys_mq_getsetattr
1403 .llong .sys_kexec_load
1405 .llong .sys_request_key /* 270 */
1408 .llong .sys_ioprio_set
1409 .llong .sys_ioprio_get