From 32942bc7a609a874f462e1168dbeae20dbc6b79f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 27 Sep 2012 08:51:20 -0400 Subject: sparc32: bury the remnants of LOWSYS tricks Time to end that depravity, let's bury the body. It's been 15 years, for crying out loud... Signed-off-by: Al Viro --- arch/sparc/kernel/entry.S | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'arch/sparc/kernel/entry.S') diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index dcaa1cf..dc08970 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -959,17 +959,9 @@ flush_patch_four: .align 4 linux_sparc_ni_syscall: sethi %hi(sys_ni_syscall), %l7 - b syscall_is_too_hard + b do_syscall or %l7, %lo(sys_ni_syscall), %l7 -linux_fast_syscall: - andn %l7, 3, %l7 - mov %i0, %o0 - mov %i1, %o1 - mov %i2, %o2 - jmpl %l7 + %g0, %g0 - mov %i3, %o3 - linux_syscall_trace: add %sp, STACKFRAME_SZ, %o0 call syscall_trace @@ -1002,11 +994,8 @@ linux_sparc_syscall: bgeu linux_sparc_ni_syscall sll %g1, 2, %l4 ld [%l7 + %l4], %l7 - andcc %l7, 1, %g0 - bne linux_fast_syscall - /* Just do first insn from SAVE_ALL in the delay slot */ -syscall_is_too_hard: +do_syscall: SAVE_ALL_HEAD rd %wim, %l3 -- cgit v1.1 From c78e06430ea621ce59d20cb899a9a86bdcf4487b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 27 Sep 2012 15:21:21 -0400 Subject: sparc32: switch to generic kernel_thread() Signed-off-by: Al Viro --- arch/sparc/kernel/entry.S | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/sparc/kernel/entry.S') diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index dc08970..6114672 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -983,6 +983,16 @@ ret_from_fork: b ret_sys_call ld [%sp + STACKFRAME_SZ + PT_I0], %o0 + .globl ret_from_kernel_thread +ret_from_kernel_thread: + call schedule_tail + ld [%g3 + TI_TASK], %o0 + ld [%sp + STACKFRAME_SZ + PT_G1], %l0 + call %l0 + ld [%sp + STACKFRAME_SZ + PT_G2], %o0 + call do_exit /* won't return */ + clr %o0 + /* Linux native system calls enter here... */ .align 4 .globl linux_sparc_syscall -- cgit v1.1 From ab3486813bbbd9e74efb4c130183f3994dada4bd Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 28 Sep 2012 14:20:01 -0400 Subject: sparc32: switch to generic kernel_execve() Signed-off-by: Al Viro --- arch/sparc/kernel/entry.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'arch/sparc/kernel/entry.S') diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 6114672..36b35e5 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -990,8 +990,15 @@ ret_from_kernel_thread: ld [%sp + STACKFRAME_SZ + PT_G1], %l0 call %l0 ld [%sp + STACKFRAME_SZ + PT_G2], %o0 - call do_exit /* won't return */ - clr %o0 + rd %psr, %l1 + ld [%sp + STACKFRAME_SZ + PT_PSR], %l0 + andn %l0, PSR_CWP, %l0 + nop + and %l1, PSR_CWP, %l1 + or %l0, %l1, %l0 + st %l0, [%sp + STACKFRAME_SZ + PT_PSR] + b ret_sys_call + mov 0, %o0 /* Linux native system calls enter here... */ .align 4 -- cgit v1.1 From f7200d4c504a385b1b70f3bab379f99745f7ef6a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 29 Sep 2012 14:49:48 -0400 Subject: sparc32: switch to generic sys_execve() Signed-off-by: Al Viro --- arch/sparc/kernel/entry.S | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'arch/sparc/kernel/entry.S') diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 36b35e5..21fd1a8 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -806,23 +806,10 @@ sys_nis_syscall: call c_sys_nis_syscall mov %l5, %o7 - .align 4 - .globl sys_execve -sys_execve: - mov %o7, %l5 - add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg - call sparc_execve - mov %l5, %o7 - - .globl sunos_execv sunos_execv: - st %g0, [%sp + STACKFRAME_SZ + PT_I2] - - call sparc_execve - add %sp, STACKFRAME_SZ, %o0 - - b ret_sys_call - ld [%sp + STACKFRAME_SZ + PT_I0], %o0 + .globl sunos_execv + b sys_execve + clr %i2 .align 4 .globl sys_sparc_pipe -- cgit v1.1