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>
31 #include <asm/thread_info.h>
36 * Returns (address we were linked at) - (address we are running at)
37 * for use before the text and data are mapped to KERNELBASE.
69 #ifdef CONFIG_IRQSTACKS
70 _GLOBAL(call_do_softirq)
73 stdu r1,THREAD_SIZE-112(r3)
81 _GLOBAL(call_handle_IRQ_event)
84 stdu r1,THREAD_SIZE-112(r6)
91 #endif /* CONFIG_IRQSTACKS */
94 * To be called by C code which needs to do some operations with MMU
95 * disabled. Note that interrupts have to be disabled by the caller
96 * prior to calling us. The code called _MUST_ be in the RMO of course
97 * and part of the linear mapping as we don't attempt to translate the
98 * stack pointer at all. The function is called with the stack switched
99 * to this CPU emergency stack
101 * prototype is void *call_with_mmu_off(void *func, void *data);
103 * the called function is expected to be of the form
105 * void *called(void *data);
107 _GLOBAL(call_with_mmu_off)
108 mflr r0 /* get link, save it on stackframe */
110 mr r1,r5 /* save old stack ptr */
111 ld r1,PACAEMERGSP(r13) /* get emerg. stack */
112 subi r1,r1,STACK_FRAME_OVERHEAD
113 std r0,16(r1) /* save link on emerg. stack */
114 std r5,0(r1) /* save old stack ptr in backchain */
115 ld r3,0(r3) /* get to real function ptr (assume same TOC) */
116 bl 2f /* we need LR to return, continue at label 2 */
118 ld r0,16(r1) /* we return here from the call, get LR and */
119 ld r1,0(r1) /* .. old stack ptr */
120 mtspr SPRN_SRR0,r0 /* and get back to virtual mode with these */
122 ori r4,r4,MSR_IR|MSR_DR
126 2: mtspr SPRN_SRR0,r3 /* coming from above, enter real mode */
127 mr r3,r4 /* get parameter */
129 ori r0,r0,MSR_IR|MSR_DR
130 xori r0,r0,MSR_IR|MSR_DR
137 .tc ppc64_caches[TC],ppc64_caches
141 * Write any modified data cache blocks out to memory
142 * and invalidate the corresponding instruction cache blocks.
144 * flush_icache_range(unsigned long start, unsigned long stop)
146 * flush all bytes from start through stop-1 inclusive
149 _KPROBE(__flush_icache_range)
152 * Flush the data cache to memory
154 * Different systems have different cache line sizes
155 * and in some cases i-cache and d-cache line sizes differ from
158 ld r10,PPC64_CACHES@toc(r2)
159 lwz r7,DCACHEL1LINESIZE(r10)/* Get cache line size */
161 andc r6,r3,r5 /* round low to line bdy */
162 subf r8,r6,r4 /* compute length */
163 add r8,r8,r5 /* ensure we get enough */
164 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of cache line size */
165 srw. r8,r8,r9 /* compute line count */
166 beqlr /* nothing to do? */
173 /* Now invalidate the instruction cache */
175 lwz r7,ICACHEL1LINESIZE(r10) /* Get Icache line size */
177 andc r6,r3,r5 /* round low to line bdy */
178 subf r8,r6,r4 /* compute length */
180 lwz r9,ICACHEL1LOGLINESIZE(r10) /* Get log-2 of Icache line size */
181 srw. r8,r8,r9 /* compute line count */
182 beqlr /* nothing to do? */
191 * Like above, but only do the D-cache.
193 * flush_dcache_range(unsigned long start, unsigned long stop)
195 * flush all bytes from start to stop-1 inclusive
197 _GLOBAL(flush_dcache_range)
200 * Flush the data cache to memory
202 * Different systems have different cache line sizes
204 ld r10,PPC64_CACHES@toc(r2)
205 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
207 andc r6,r3,r5 /* round low to line bdy */
208 subf r8,r6,r4 /* compute length */
209 add r8,r8,r5 /* ensure we get enough */
210 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
211 srw. r8,r8,r9 /* compute line count */
212 beqlr /* nothing to do? */
221 * Like above, but works on non-mapped physical addresses.
222 * Use only for non-LPAR setups ! It also assumes real mode
223 * is cacheable. Used for flushing out the DART before using
224 * it as uncacheable memory
226 * flush_dcache_phys_range(unsigned long start, unsigned long stop)
228 * flush all bytes from start to stop-1 inclusive
230 _GLOBAL(flush_dcache_phys_range)
231 ld r10,PPC64_CACHES@toc(r2)
232 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
234 andc r6,r3,r5 /* round low to line bdy */
235 subf r8,r6,r4 /* compute length */
236 add r8,r8,r5 /* ensure we get enough */
237 lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
238 srw. r8,r8,r9 /* compute line count */
239 beqlr /* nothing to do? */
240 mfmsr r5 /* Disable MMU Data Relocation */
253 mtmsr r5 /* Re-enable MMU Data Relocation */
258 _GLOBAL(flush_inval_dcache_range)
259 ld r10,PPC64_CACHES@toc(r2)
260 lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
262 andc r6,r3,r5 /* round low to line bdy */
263 subf r8,r6,r4 /* compute length */
264 add r8,r8,r5 /* ensure we get enough */
265 lwz r9,DCACHEL1LOGLINESIZE(r10)/* Get log-2 of dcache line size */
266 srw. r8,r8,r9 /* compute line count */
267 beqlr /* nothing to do? */
280 * Flush a particular page from the data cache to RAM.
281 * Note: this is necessary because the instruction cache does *not*
282 * snoop from the data cache.
284 * void __flush_dcache_icache(void *page)
286 _GLOBAL(__flush_dcache_icache)
288 * Flush the data cache to memory
290 * Different systems have different cache line sizes
293 /* Flush the dcache */
294 ld r7,PPC64_CACHES@toc(r2)
295 clrrdi r3,r3,PAGE_SHIFT /* Page align */
296 lwz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */
297 lwz r5,DCACHEL1LINESIZE(r7) /* Get dcache line size */
305 /* Now invalidate the icache */
307 lwz r4,ICACHEL1LINESPERPAGE(r7) /* Get # icache lines per page */
308 lwz r5,ICACHEL1LINESIZE(r7) /* Get icache line size */
317 * I/O string operations
319 * insb(port, buf, len)
320 * outsb(port, buf, len)
321 * insw(port, buf, len)
322 * outsw(port, buf, len)
323 * insl(port, buf, len)
324 * outsl(port, buf, len)
325 * insw_ns(port, buf, len)
326 * outsw_ns(port, buf, len)
327 * insl_ns(port, buf, len)
328 * outsl_ns(port, buf, len)
330 * The *_ns versions don't do byte-swapping.
404 /* _GLOBAL(ide_insw) now in drivers/ide/ide-iops.c */
418 /* _GLOBAL(ide_outsw) now in drivers/ide/ide-iops.c */
455 * identify_cpu and calls setup_cpu
456 * In: r3 = base of the cpu_specs array
457 * r4 = address of cur_cpu_spec
458 * r5 = relocation offset
460 _GLOBAL(identify_cpu)
463 lwz r8,CPU_SPEC_PVR_MASK(r3)
465 lwz r9,CPU_SPEC_PVR_VALUE(r3)
468 addi r3,r3,CPU_SPEC_ENTRY_SIZE
473 ld r4,CPU_SPEC_SETUP(r3)
478 /* Calling convention for cpu setup is r3=offset, r4=cur_cpu_spec */
484 * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
485 * and writes nop's over sections of code that don't apply for this cpu.
486 * r3 = data offset (not changed)
488 _GLOBAL(do_cpu_ftr_fixups)
489 /* Get CPU 0 features */
490 LOADADDR(r6,cur_cpu_spec)
494 ld r4,CPU_SPEC_FEATURES(r4)
495 /* Get the fixup table */
496 LOADADDR(r6,__start___ftr_fixup)
498 LOADADDR(r7,__stop___ftr_fixup)
504 ld r8,-32(r6) /* mask */
506 ld r9,-24(r6) /* value */
509 ld r8,-16(r6) /* section begin */
510 ld r9,-8(r6) /* section end */
513 /* write nops over the section of code */
514 /* todo: if large section, add a branch at the start of it */
518 lis r0,0x60000000@h /* nop */
520 andi. r10,r4,CPU_FTR_SPLIT_ID_CACHE@l
522 dcbst 0,r8 /* suboptimal, but simpler */
527 sync /* additional sync needed on g4 */
531 #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE)
533 * Do an IO access in real mode
564 * Do an IO access in real mode
593 #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */
596 * Create a kernel thread
597 * kernel_thread(fn, arg, flags)
599 _GLOBAL(kernel_thread)
602 stdu r1,-STACK_FRAME_OVERHEAD(r1)
605 ori r3,r5,CLONE_VM /* flags */
606 oris r3,r3,(CLONE_UNTRACED>>16)
607 li r4,0 /* new sp (unused) */
610 cmpdi 0,r3,0 /* parent or child? */
611 bne 1f /* return if parent */
613 stdu r0,-STACK_FRAME_OVERHEAD(r1)
616 mtlr r29 /* fn addr in lr */
617 mr r3,r30 /* load arg and call fn */
619 li r0,__NR_exit /* exit after child exits */
622 1: addi r1,r1,STACK_FRAME_OVERHEAD
628 * disable_kernel_fp()
631 _GLOBAL(disable_kernel_fp)
633 rldicl r0,r3,(63-MSR_FP_LG),1
634 rldicl r3,r0,(MSR_FP_LG+1),0
635 mtmsrd r3 /* disable use of fpu now */
639 #ifdef CONFIG_ALTIVEC
641 #if 0 /* this has no callers for now */
643 * disable_kernel_altivec()
646 _GLOBAL(disable_kernel_altivec)
648 rldicl r0,r3,(63-MSR_VEC_LG),1
649 rldicl r3,r0,(MSR_VEC_LG+1),0
650 mtmsrd r3 /* disable use of VMX now */
656 * giveup_altivec(tsk)
657 * Disable VMX for the task given as the argument,
658 * and save the vector registers in its thread_struct.
659 * Enables the VMX for use in the kernel on return.
661 _GLOBAL(giveup_altivec)
664 mtmsrd r5 /* enable use of VMX now */
667 beqlr- /* if no previous owner, done */
668 addi r3,r3,THREAD /* want THREAD of task */
676 ld r4,_MSR-STACK_FRAME_OVERHEAD(r5)
678 andc r4,r4,r3 /* disable FP for previous task */
679 std r4,_MSR-STACK_FRAME_OVERHEAD(r5)
683 ld r4,last_task_used_altivec@got(r2)
685 #endif /* CONFIG_SMP */
688 #endif /* CONFIG_ALTIVEC */
690 _GLOBAL(__setup_cpu_power3)
700 /* kexec_wait(phys_cpu)
702 * wait for the flag to change, indicating this kernel is going away but
703 * the slave code for the next one is at addresses 0 to 100.
705 * This is used by all slaves.
707 * Physical (hardware) cpu id should be in r3.
712 addi r5,r5,kexec_flag-1b
715 #ifdef CONFIG_KEXEC /* use no memory without kexec */
722 /* this can be in text because we won't change it until we are
723 * running in real anyways
731 /* kexec_smp_wait(void)
733 * call with interrupts off
734 * note: this is a terminal routine, it does not save lr
736 * get phys id from paca
737 * set paca id to -1 to say we got here
738 * switch to real mode
739 * join other cpus in kexec_wait(phys_id)
741 _GLOBAL(kexec_smp_wait)
742 lhz r3,PACAHWCPUID(r13)
744 sth r4,PACAHWCPUID(r13) /* let others know we left */
749 * switch to real mode (turn mmu off)
750 * we use the early kernel trick that the hardware ignores bits
751 * 0 and 1 (big endian) of the effective address in real mode
753 * don't overwrite r3 here, it is live for kexec_wait above.
755 real_mode: /* assume normal blr return */
758 mflr r11 /* return address to SRR0 */
770 * kexec_sequence(newstack, start, image, control, clear_all())
772 * does the grungy work with stack switching and real mode switches
773 * also does simple calls to other code
776 _GLOBAL(kexec_sequence)
780 /* switch stacks to newstack -- &kexec_stack.stack */
781 stdu r1,THREAD_SIZE-112(r3)
787 /* save regs for local vars on new stack.
788 * yes, we won't go back, but ...
800 /* save args into preserved regs */
801 mr r31,r3 /* newstack (both) */
802 mr r30,r4 /* start (real) */
803 mr r29,r5 /* image (virt) */
804 mr r28,r6 /* control, unused */
805 mr r27,r7 /* clear_all() fn desc */
806 mr r26,r8 /* spare */
807 lhz r25,PACAHWCPUID(r13) /* get our phys cpu from paca */
809 /* disable interrupts, we are overwriting kernel data next */
814 /* copy dest pages, flush whole dest image */
816 bl .kexec_copy_flush /* (image) */
821 /* clear out hardware hash page table and tlb */
822 ld r5,0(r27) /* deref function descriptor */
824 bctrl /* ppc_md.hash_clear_all(void); */
827 * kexec image calling is:
828 * the first 0x100 bytes of the entry point are copied to 0
830 * all slaves branch to slave = 0x60 (absolute)
831 * slave(phys_cpu_id);
833 * master goes to start = entry point
834 * start(phys_cpu_id, start, 0);
837 * a wrapper is needed to call existing kernels, here is an approximate
838 * description of one method:
841 * start will be near the boot_block (maybe 0x100 bytes before it?)
842 * it will have a 0x60, which will b to boot_block, where it will wait
843 * and 0 will store phys into struct boot-block and load r3 from there,
844 * copy kernel 0-0x100 and tell slaves to back down to 0x60 again
847 * boot block will have all cpus scanning device tree to see if they
848 * are the boot cpu ?????
849 * other device tree differences (prop sizes, va vs pa, etc)...
852 /* copy 0x100 bytes starting at start to 0 */
857 bl .copy_and_flush /* (dest, src, copy limit, start offset) */
858 1: /* assume normal blr return */
860 /* release other cpus to the new kernel secondary start at 0x60 */
863 stw r6,kexec_flag-1b(5)
864 mr r3,r25 # my phys cpu
865 mr r4,r30 # start, aka phys mem offset
868 blr /* image->start(physid, image->start, 0); */
869 #endif /* CONFIG_KEXEC */
871 /* Why isn't this a) automatic, b) written in 'C'? */
873 _GLOBAL(sys_call_table32)
874 .llong .sys_restart_syscall /* 0 */
879 .llong .compat_sys_open /* 5 */
881 .llong .compat_sys_waitpid
882 .llong .compat_sys_creat
884 .llong .sys_unlink /* 10 */
885 .llong .compat_sys_execve
887 .llong .compat_sys_time
889 .llong .sys_chmod /* 15 */
891 .llong .sys_ni_syscall /* old break syscall */
892 .llong .sys_ni_syscall /* old stat syscall */
894 .llong .sys_getpid /* 20 */
895 .llong .compat_sys_mount
896 .llong .sys_oldumount
899 .llong .compat_sys_stime /* 25 */
900 .llong .compat_sys_ptrace
902 .llong .sys_ni_syscall /* old fstat syscall */
903 .llong .compat_sys_pause
904 .llong .compat_sys_utime /* 30 */
905 .llong .sys_ni_syscall /* old stty syscall */
906 .llong .sys_ni_syscall /* old gtty syscall */
907 .llong .compat_sys_access
908 .llong .compat_sys_nice
909 .llong .sys_ni_syscall /* 35 - old ftime syscall */
911 .llong .compat_sys_kill
913 .llong .compat_sys_mkdir
914 .llong .sys_rmdir /* 40 */
917 .llong .compat_sys_times
918 .llong .sys_ni_syscall /* old prof syscall */
919 .llong .sys_brk /* 45 */
924 .llong .sys_getegid /* 50 */
927 .llong .sys_ni_syscall /* old lock syscall */
928 .llong .compat_sys_ioctl
929 .llong .compat_sys_fcntl /* 55 */
930 .llong .sys_ni_syscall /* old mpx syscall */
931 .llong .compat_sys_setpgid
932 .llong .sys_ni_syscall /* old ulimit syscall */
934 .llong .compat_sys_umask /* 60 */
939 .llong .sys_getpgrp /* 65 */
941 .llong .compat_sys_sigaction
943 .llong .compat_sys_ssetmask
944 .llong .sys_setreuid /* 70 */
946 .llong .ppc32_sigsuspend
947 .llong .compat_sys_sigpending
948 .llong .compat_sys_sethostname
949 .llong .compat_sys_setrlimit /* 75 */
950 .llong .compat_sys_old_getrlimit
951 .llong .compat_sys_getrusage
952 .llong .compat_sys_gettimeofday
953 .llong .compat_sys_settimeofday
954 .llong .compat_sys_getgroups /* 80 */
955 .llong .compat_sys_setgroups
956 .llong .sys_ni_syscall /* old select syscall */
958 .llong .sys_ni_syscall /* old lstat syscall */
959 .llong .compat_sys_readlink /* 85 */
963 .llong .old32_readdir
964 .llong .sys_mmap /* 90 */
967 .llong .sys_ftruncate
969 .llong .sys_fchown /* 95 */
970 .llong .compat_sys_getpriority
971 .llong .compat_sys_setpriority
972 .llong .sys_ni_syscall /* old profil syscall */
973 .llong .compat_sys_statfs
974 .llong .compat_sys_fstatfs /* 100 */
975 .llong .sys_ni_syscall /* old ioperm syscall */
976 .llong .compat_sys_socketcall
977 .llong .compat_sys_syslog
978 .llong .compat_sys_setitimer
979 .llong .compat_sys_getitimer /* 105 */
980 .llong .compat_sys_newstat
981 .llong .compat_sys_newlstat
982 .llong .compat_sys_newfstat
984 .llong .sys_ni_syscall /* 110 old iopl syscall */
986 .llong .sys_ni_syscall /* old idle syscall */
987 .llong .sys_ni_syscall /* old vm86 syscall */
988 .llong .compat_sys_wait4
989 .llong .sys_swapoff /* 115 */
990 .llong .compat_sys_sysinfo
993 .llong .ppc32_sigreturn
994 .llong .ppc_clone /* 120 */
995 .llong .compat_sys_setdomainname
997 .llong .sys_ni_syscall /* old modify_ldt syscall */
998 .llong .compat_sys_adjtimex
999 .llong .sys_mprotect /* 125 */
1000 .llong .compat_sys_sigprocmask
1001 .llong .sys_ni_syscall /* old create_module syscall */
1002 .llong .sys_init_module
1003 .llong .sys_delete_module
1004 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */
1005 .llong .sys_quotactl
1006 .llong .compat_sys_getpgid
1009 .llong .compat_sys_sysfs /* 135 */
1010 .llong .ppc64_personality
1011 .llong .sys_ni_syscall /* for afs_syscall */
1012 .llong .sys_setfsuid
1013 .llong .sys_setfsgid
1014 .llong .sys_llseek /* 140 */
1015 .llong .compat_sys_getdents
1016 .llong .ppc32_select
1019 .llong .compat_sys_readv /* 145 */
1020 .llong .compat_sys_writev
1021 .llong .compat_sys_getsid
1022 .llong .sys_fdatasync
1023 .llong .compat_sys_sysctl
1024 .llong .sys_mlock /* 150 */
1026 .llong .sys_mlockall
1027 .llong .sys_munlockall
1028 .llong .compat_sys_sched_setparam
1029 .llong .compat_sys_sched_getparam /* 155 */
1030 .llong .compat_sys_sched_setscheduler
1031 .llong .compat_sys_sched_getscheduler
1032 .llong .sys_sched_yield
1033 .llong .compat_sys_sched_get_priority_max
1034 .llong .compat_sys_sched_get_priority_min /* 160 */
1035 .llong .compat_sys_sched_rr_get_interval
1036 .llong .compat_sys_nanosleep
1038 .llong .sys_setresuid
1039 .llong .sys_getresuid /* 165 */
1040 .llong .sys_ni_syscall /* old query_module syscall */
1042 .llong .compat_sys_nfsservctl
1043 .llong .sys_setresgid
1044 .llong .sys_getresgid /* 170 */
1045 .llong .compat_sys_prctl
1046 .llong .ppc32_rt_sigreturn
1047 .llong .compat_sys_rt_sigaction
1048 .llong .compat_sys_rt_sigprocmask
1049 .llong .compat_sys_rt_sigpending /* 175 */
1050 .llong .compat_sys_rt_sigtimedwait
1051 .llong .compat_sys_rt_sigqueueinfo
1052 .llong .ppc32_rt_sigsuspend
1053 .llong .compat_sys_pread64
1054 .llong .compat_sys_pwrite64 /* 180 */
1059 .llong .compat_sys_sigaltstack /* 185 */
1060 .llong .compat_sys_sendfile
1061 .llong .sys_ni_syscall /* reserved for streams1 */
1062 .llong .sys_ni_syscall /* reserved for streams2 */
1064 .llong .compat_sys_getrlimit /* 190 */
1065 .llong .compat_sys_readahead
1066 .llong .compat_sys_mmap2
1067 .llong .compat_sys_truncate64
1068 .llong .compat_sys_ftruncate64
1069 .llong .sys_stat64 /* 195 */
1072 .llong .compat_sys_pciconfig_read
1073 .llong .compat_sys_pciconfig_write
1074 .llong .compat_sys_pciconfig_iobase /* 200 - pciconfig_iobase */
1075 .llong .sys_ni_syscall /* reserved for MacOnLinux */
1076 .llong .sys_getdents64
1077 .llong .sys_pivot_root
1078 .llong .compat_sys_fcntl64
1079 .llong .sys_madvise /* 205 */
1083 .llong .sys_setxattr
1084 .llong .sys_lsetxattr /* 210 */
1085 .llong .sys_fsetxattr
1086 .llong .sys_getxattr
1087 .llong .sys_lgetxattr
1088 .llong .sys_fgetxattr
1089 .llong .sys_listxattr /* 215 */
1090 .llong .sys_llistxattr
1091 .llong .sys_flistxattr
1092 .llong .sys_removexattr
1093 .llong .sys_lremovexattr
1094 .llong .sys_fremovexattr /* 220 */
1095 .llong .compat_sys_futex
1096 .llong .compat_sys_sched_setaffinity
1097 .llong .compat_sys_sched_getaffinity
1098 .llong .sys_ni_syscall
1099 .llong .sys_ni_syscall /* 225 - reserved for tux */
1100 .llong .compat_sys_sendfile64
1101 .llong .compat_sys_io_setup
1102 .llong .sys_io_destroy
1103 .llong .compat_sys_io_getevents
1104 .llong .compat_sys_io_submit
1105 .llong .sys_io_cancel
1106 .llong .sys_set_tid_address
1107 .llong .ppc32_fadvise64
1108 .llong .sys_exit_group
1109 .llong .ppc32_lookup_dcookie /* 235 */
1110 .llong .sys_epoll_create
1111 .llong .sys_epoll_ctl
1112 .llong .sys_epoll_wait
1113 .llong .sys_remap_file_pages
1114 .llong .ppc32_timer_create /* 240 */
1115 .llong .compat_sys_timer_settime
1116 .llong .compat_sys_timer_gettime
1117 .llong .sys_timer_getoverrun
1118 .llong .sys_timer_delete
1119 .llong .compat_sys_clock_settime/* 245 */
1120 .llong .compat_sys_clock_gettime
1121 .llong .compat_sys_clock_getres
1122 .llong .compat_sys_clock_nanosleep
1123 .llong .ppc32_swapcontext
1124 .llong .compat_sys_tgkill /* 250 */
1125 .llong .compat_sys_utimes
1126 .llong .compat_sys_statfs64
1127 .llong .compat_sys_fstatfs64
1128 .llong .ppc_fadvise64_64 /* 32bit only fadvise64_64 */
1129 .llong .ppc_rtas /* 255 */
1130 .llong .sys_ni_syscall /* 256 reserved for sys_debug_setcontext */
1131 .llong .sys_ni_syscall /* 257 reserved for vserver */
1132 .llong .sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */
1133 .llong .compat_sys_mbind
1134 .llong .compat_sys_get_mempolicy /* 260 */
1135 .llong .compat_sys_set_mempolicy
1136 .llong .compat_sys_mq_open
1137 .llong .sys_mq_unlink
1138 .llong .compat_sys_mq_timedsend
1139 .llong .compat_sys_mq_timedreceive /* 265 */
1140 .llong .compat_sys_mq_notify
1141 .llong .compat_sys_mq_getsetattr
1142 .llong .compat_sys_kexec_load
1143 .llong .compat_sys_add_key
1144 .llong .compat_sys_request_key /* 270 */
1145 .llong .compat_sys_keyctl
1146 .llong .compat_sys_waitid
1147 .llong .compat_sys_ioprio_set
1148 .llong .compat_sys_ioprio_get
1149 .llong .sys_inotify_init /* 275 */
1150 .llong .sys_inotify_add_watch
1151 .llong .sys_inotify_rm_watch
1154 _GLOBAL(sys_call_table)
1155 .llong .sys_restart_syscall /* 0 */
1160 .llong .sys_open /* 5 */
1165 .llong .sys_unlink /* 10 */
1170 .llong .sys_chmod /* 15 */
1172 .llong .sys_ni_syscall /* old break syscall */
1173 .llong .sys_ni_syscall /* old stat syscall */
1175 .llong .sys_getpid /* 20 */
1177 .llong .sys_ni_syscall /* old umount syscall */
1180 .llong .sys_stime /* 25 */
1183 .llong .sys_ni_syscall /* old fstat syscall */
1185 .llong .sys_utime /* 30 */
1186 .llong .sys_ni_syscall /* old stty syscall */
1187 .llong .sys_ni_syscall /* old gtty syscall */
1190 .llong .sys_ni_syscall /* 35 - old ftime syscall */
1195 .llong .sys_rmdir /* 40 */
1199 .llong .sys_ni_syscall /* old prof syscall */
1200 .llong .sys_brk /* 45 */
1205 .llong .sys_getegid /* 50 */
1208 .llong .sys_ni_syscall /* old lock syscall */
1210 .llong .sys_fcntl /* 55 */
1211 .llong .sys_ni_syscall /* old mpx syscall */
1213 .llong .sys_ni_syscall /* old ulimit syscall */
1214 .llong .sys_ni_syscall /* old uname syscall */
1215 .llong .sys_umask /* 60 */
1220 .llong .sys_getpgrp /* 65 */
1222 .llong .sys_ni_syscall
1223 .llong .sys_sgetmask
1224 .llong .sys_ssetmask
1225 .llong .sys_setreuid /* 70 */
1226 .llong .sys_setregid
1227 .llong .sys_ni_syscall
1228 .llong .sys_ni_syscall
1229 .llong .sys_sethostname
1230 .llong .sys_setrlimit /* 75 */
1231 .llong .sys_ni_syscall /* old getrlimit syscall */
1232 .llong .sys_getrusage
1233 .llong .sys_gettimeofday
1234 .llong .sys_settimeofday
1235 .llong .sys_getgroups /* 80 */
1236 .llong .sys_setgroups
1237 .llong .sys_ni_syscall /* old select syscall */
1239 .llong .sys_ni_syscall /* old lstat syscall */
1240 .llong .sys_readlink /* 85 */
1244 .llong .sys_ni_syscall /* old readdir syscall */
1245 .llong .sys_mmap /* 90 */
1247 .llong .sys_truncate
1248 .llong .sys_ftruncate
1250 .llong .sys_fchown /* 95 */
1251 .llong .sys_getpriority
1252 .llong .sys_setpriority
1253 .llong .sys_ni_syscall /* old profil syscall holder */
1255 .llong .sys_fstatfs /* 100 */
1256 .llong .sys_ni_syscall /* old ioperm syscall */
1257 .llong .sys_socketcall
1259 .llong .sys_setitimer
1260 .llong .sys_getitimer /* 105 */
1262 .llong .sys_newlstat
1263 .llong .sys_newfstat
1264 .llong .sys_ni_syscall /* old uname syscall */
1265 .llong .sys_ni_syscall /* 110 old iopl syscall */
1267 .llong .sys_ni_syscall /* old idle syscall */
1268 .llong .sys_ni_syscall /* old vm86 syscall */
1270 .llong .sys_swapoff /* 115 */
1274 .llong .sys_ni_syscall
1275 .llong .ppc_clone /* 120 */
1276 .llong .sys_setdomainname
1277 .llong .ppc_newuname
1278 .llong .sys_ni_syscall /* old modify_ldt syscall */
1279 .llong .sys_adjtimex
1280 .llong .sys_mprotect /* 125 */
1281 .llong .sys_ni_syscall
1282 .llong .sys_ni_syscall /* old create_module syscall */
1283 .llong .sys_init_module
1284 .llong .sys_delete_module
1285 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */
1286 .llong .sys_quotactl
1290 .llong .sys_sysfs /* 135 */
1291 .llong .ppc64_personality
1292 .llong .sys_ni_syscall /* for afs_syscall */
1293 .llong .sys_setfsuid
1294 .llong .sys_setfsgid
1295 .llong .sys_llseek /* 140 */
1296 .llong .sys_getdents
1300 .llong .sys_readv /* 145 */
1303 .llong .sys_fdatasync
1305 .llong .sys_mlock /* 150 */
1307 .llong .sys_mlockall
1308 .llong .sys_munlockall
1309 .llong .sys_sched_setparam
1310 .llong .sys_sched_getparam /* 155 */
1311 .llong .sys_sched_setscheduler
1312 .llong .sys_sched_getscheduler
1313 .llong .sys_sched_yield
1314 .llong .sys_sched_get_priority_max
1315 .llong .sys_sched_get_priority_min /* 160 */
1316 .llong .sys_sched_rr_get_interval
1317 .llong .sys_nanosleep
1319 .llong .sys_setresuid
1320 .llong .sys_getresuid /* 165 */
1321 .llong .sys_ni_syscall /* old query_module syscall */
1323 .llong .sys_nfsservctl
1324 .llong .sys_setresgid
1325 .llong .sys_getresgid /* 170 */
1327 .llong .ppc64_rt_sigreturn
1328 .llong .sys_rt_sigaction
1329 .llong .sys_rt_sigprocmask
1330 .llong .sys_rt_sigpending /* 175 */
1331 .llong .sys_rt_sigtimedwait
1332 .llong .sys_rt_sigqueueinfo
1333 .llong .ppc64_rt_sigsuspend
1335 .llong .sys_pwrite64 /* 180 */
1340 .llong .sys_sigaltstack /* 185 */
1341 .llong .sys_sendfile64
1342 .llong .sys_ni_syscall /* reserved for streams1 */
1343 .llong .sys_ni_syscall /* reserved for streams2 */
1345 .llong .sys_getrlimit /* 190 */
1346 .llong .sys_readahead
1347 .llong .sys_ni_syscall /* 32bit only mmap2 */
1348 .llong .sys_ni_syscall /* 32bit only truncate64 */
1349 .llong .sys_ni_syscall /* 32bit only ftruncate64 */
1350 .llong .sys_ni_syscall /* 195 - 32bit only stat64 */
1351 .llong .sys_ni_syscall /* 32bit only lstat64 */
1352 .llong .sys_ni_syscall /* 32bit only fstat64 */
1353 .llong .sys_pciconfig_read
1354 .llong .sys_pciconfig_write
1355 .llong .sys_pciconfig_iobase /* 200 - pciconfig_iobase */
1356 .llong .sys_ni_syscall /* reserved for MacOnLinux */
1357 .llong .sys_getdents64
1358 .llong .sys_pivot_root
1359 .llong .sys_ni_syscall /* 32bit only fcntl64 */
1360 .llong .sys_madvise /* 205 */
1364 .llong .sys_setxattr
1365 .llong .sys_lsetxattr /* 210 */
1366 .llong .sys_fsetxattr
1367 .llong .sys_getxattr
1368 .llong .sys_lgetxattr
1369 .llong .sys_fgetxattr
1370 .llong .sys_listxattr /* 215 */
1371 .llong .sys_llistxattr
1372 .llong .sys_flistxattr
1373 .llong .sys_removexattr
1374 .llong .sys_lremovexattr
1375 .llong .sys_fremovexattr /* 220 */
1377 .llong .sys_sched_setaffinity
1378 .llong .sys_sched_getaffinity
1379 .llong .sys_ni_syscall
1380 .llong .sys_ni_syscall /* 225 - reserved for tux */
1381 .llong .sys_ni_syscall /* 32bit only sendfile64 */
1382 .llong .sys_io_setup
1383 .llong .sys_io_destroy
1384 .llong .sys_io_getevents
1385 .llong .sys_io_submit /* 230 */
1386 .llong .sys_io_cancel
1387 .llong .sys_set_tid_address
1388 .llong .sys_fadvise64
1389 .llong .sys_exit_group
1390 .llong .sys_lookup_dcookie /* 235 */
1391 .llong .sys_epoll_create
1392 .llong .sys_epoll_ctl
1393 .llong .sys_epoll_wait
1394 .llong .sys_remap_file_pages
1395 .llong .sys_timer_create /* 240 */
1396 .llong .sys_timer_settime
1397 .llong .sys_timer_gettime
1398 .llong .sys_timer_getoverrun
1399 .llong .sys_timer_delete
1400 .llong .sys_clock_settime /* 245 */
1401 .llong .sys_clock_gettime
1402 .llong .sys_clock_getres
1403 .llong .sys_clock_nanosleep
1404 .llong .ppc64_swapcontext
1405 .llong .sys_tgkill /* 250 */
1407 .llong .sys_statfs64
1408 .llong .sys_fstatfs64
1409 .llong .sys_ni_syscall /* 32bit only fadvise64_64 */
1410 .llong .ppc_rtas /* 255 */
1411 .llong .sys_ni_syscall /* 256 reserved for sys_debug_setcontext */
1412 .llong .sys_ni_syscall /* 257 reserved for vserver */
1413 .llong .sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */
1415 .llong .sys_get_mempolicy /* 260 */
1416 .llong .sys_set_mempolicy
1418 .llong .sys_mq_unlink
1419 .llong .sys_mq_timedsend
1420 .llong .sys_mq_timedreceive /* 265 */
1421 .llong .sys_mq_notify
1422 .llong .sys_mq_getsetattr
1423 .llong .sys_kexec_load
1425 .llong .sys_request_key /* 270 */
1428 .llong .sys_ioprio_set
1429 .llong .sys_ioprio_get
1430 .llong .sys_inotify_init /* 275 */
1431 .llong .sys_inotify_add_watch
1432 .llong .sys_inotify_rm_watch