From: Al Viro Date: Sat, 17 Nov 2012 01:48:13 +0000 (-0500) Subject: Merge commit '517ffce4e1a03aea979fe3a18a3dd1761a24fafb' into arch-sparc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=85910c202bb869edd2bb9a6c217a658c83f06f1e;p=openwrt%2Fstaging%2Fblogic.git Merge commit '517ffce4e1a03aea979fe3a18a3dd1761a24fafb' into arch-sparc Backmerge from the point in mainline where a trivial conflict had been introduced (arch/sparc/kernel/sys_sparc_64.c had grown sys_kern_features() right after where kernel_execve() used to be) Signed-off-by: Al Viro --- 85910c202bb869edd2bb9a6c217a658c83f06f1e diff --cc arch/sparc/include/asm/ptrace.h index 1e8b81802263,da43bdc62294..bdfafd7af46f --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h @@@ -45,9 -42,22 +45,20 @@@ struct global_reg_snapshot struct thread_info *thread; unsigned long pad1; }; - extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; + + struct global_pmu_snapshot { + unsigned long pcr[4]; + unsigned long pic[4]; + }; + + union global_cpu_snapshot { + struct global_reg_snapshot reg; + struct global_pmu_snapshot pmu; + }; + + extern union global_cpu_snapshot global_cpu_snapshot[NR_CPUS]; -#define force_successful_syscall_return() \ -do { current_thread_info()->syscall_noerror = 1; \ -} while (0) +#define force_successful_syscall_return() set_thread_noerror(1) #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) #define instruction_pointer(regs) ((regs)->tpc) #define instruction_pointer_set(regs, val) ((regs)->tpc = (val)) diff --cc arch/sparc/kernel/sys_sparc_64.c index adfe60ece05f,878ef3d5fec5..51b85feb8b97 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c @@@ -729,3 -729,30 +729,8 @@@ SYSCALL_DEFINE5(rt_sigaction, int, sig return ret; } + -/* - * Do a system call from kernel instead of calling sys_execve so we - * end up with proper pt_regs. - */ -int kernel_execve(const char *filename, - const char *const argv[], - const char *const envp[]) -{ - long __res; - register long __g1 __asm__ ("g1") = __NR_execve; - register long __o0 __asm__ ("o0") = (long)(filename); - register long __o1 __asm__ ("o1") = (long)(argv); - register long __o2 __asm__ ("o2") = (long)(envp); - asm volatile ("t 0x6d\n\t" - "sub %%g0, %%o0, %0\n\t" - "movcc %%xcc, %%o0, %0\n\t" - : "=r" (__res), "=&r" (__o0) - : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) - : "cc"); - return __res; -} - + asmlinkage long sys_kern_features(void) + { + return KERN_FEATURE_MIXED_MODE_STACK; + }