entry.S (08a7c7772b4db0be06e3b27239147c0a36e2a507) entry.S (a4261d4bb45022e1b8b95df13dbb05abac490165)
1/* SPDX-License-Identifier: GPL-2.0 */
2/* arch/sparc/kernel/entry.S: Sparc trap low-level entry points.
3 *
4 * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
7 * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au)

--- 855 unchanged lines hidden (view full) ---

864 .globl sys_fork, flush_patch_two
865sys_fork:
866 mov %o7, %l5
867flush_patch_two:
868 FLUSH_ALL_KERNEL_WINDOWS;
869 ld [%curptr + TI_TASK], %o4
870 rd %psr, %g4
871 WRITE_PAUSE
1/* SPDX-License-Identifier: GPL-2.0 */
2/* arch/sparc/kernel/entry.S: Sparc trap low-level entry points.
3 *
4 * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
7 * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au)

--- 855 unchanged lines hidden (view full) ---

864 .globl sys_fork, flush_patch_two
865sys_fork:
866 mov %o7, %l5
867flush_patch_two:
868 FLUSH_ALL_KERNEL_WINDOWS;
869 ld [%curptr + TI_TASK], %o4
870 rd %psr, %g4
871 WRITE_PAUSE
872 mov SIGCHLD, %o0 ! arg0: clone flags
873 rd %wim, %g5
874 WRITE_PAUSE
872 rd %wim, %g5
873 WRITE_PAUSE
875 mov %fp, %o1 ! arg1: usp
876 std %g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
874 std %g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
877 add %sp, STACKFRAME_SZ, %o2 ! arg2: pt_regs ptr
878 mov 0, %o3
879 call sparc_do_fork
875 add %sp, STACKFRAME_SZ, %o0
876 call sparc_fork
880 mov %l5, %o7
881
882 /* Whee, kernel threads! */
883 .globl sys_clone, flush_patch_three
884sys_clone:
885 mov %o7, %l5
886flush_patch_three:
887 FLUSH_ALL_KERNEL_WINDOWS;
888 ld [%curptr + TI_TASK], %o4
889 rd %psr, %g4
890 WRITE_PAUSE
877 mov %l5, %o7
878
879 /* Whee, kernel threads! */
880 .globl sys_clone, flush_patch_three
881sys_clone:
882 mov %o7, %l5
883flush_patch_three:
884 FLUSH_ALL_KERNEL_WINDOWS;
885 ld [%curptr + TI_TASK], %o4
886 rd %psr, %g4
887 WRITE_PAUSE
891
892 /* arg0,1: flags,usp -- loaded already */
893 cmp %o1, 0x0 ! Is new_usp NULL?
894 rd %wim, %g5
895 WRITE_PAUSE
888 rd %wim, %g5
889 WRITE_PAUSE
896 be,a 1f
897 mov %fp, %o1 ! yes, use callers usp
898 andn %o1, 7, %o1 ! no, align to 8 bytes
8991:
900 std %g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
890 std %g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
901 add %sp, STACKFRAME_SZ, %o2 ! arg2: pt_regs ptr
902 mov 0, %o3
903 call sparc_do_fork
891 add %sp, STACKFRAME_SZ, %o0
892 call sparc_clone
904 mov %l5, %o7
905
906 /* Whee, real vfork! */
907 .globl sys_vfork, flush_patch_four
908sys_vfork:
909flush_patch_four:
910 FLUSH_ALL_KERNEL_WINDOWS;
911 ld [%curptr + TI_TASK], %o4
912 rd %psr, %g4
913 WRITE_PAUSE
914 rd %wim, %g5
915 WRITE_PAUSE
916 std %g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
893 mov %l5, %o7
894
895 /* Whee, real vfork! */
896 .globl sys_vfork, flush_patch_four
897sys_vfork:
898flush_patch_four:
899 FLUSH_ALL_KERNEL_WINDOWS;
900 ld [%curptr + TI_TASK], %o4
901 rd %psr, %g4
902 WRITE_PAUSE
903 rd %wim, %g5
904 WRITE_PAUSE
905 std %g4, [%o4 + AOFF_task_thread + AOFF_thread_fork_kpsr]
917 sethi %hi(0x4000 | 0x0100 | SIGCHLD), %o0
918 mov %fp, %o1
919 or %o0, %lo(0x4000 | 0x0100 | SIGCHLD), %o0
920 sethi %hi(sparc_do_fork), %l1
921 mov 0, %o3
922 jmpl %l1 + %lo(sparc_do_fork), %g0
923 add %sp, STACKFRAME_SZ, %o2
906 sethi %hi(sparc_vfork), %l1
907 jmpl %l1 + %lo(sparc_vfork), %g0
908 add %sp, STACKFRAME_SZ, %o0
924
925 .align 4
926linux_sparc_ni_syscall:
927 sethi %hi(sys_ni_syscall), %l7
928 b do_syscall
929 or %l7, %lo(sys_ni_syscall), %l7
930
931linux_syscall_trace:

--- 441 unchanged lines hidden ---
909
910 .align 4
911linux_sparc_ni_syscall:
912 sethi %hi(sys_ni_syscall), %l7
913 b do_syscall
914 or %l7, %lo(sys_ni_syscall), %l7
915
916linux_syscall_trace:

--- 441 unchanged lines hidden ---