From: Al Viro Date: Sat, 17 Nov 2012 03:27:58 +0000 (-0500) Subject: Merge branch 'arch-frv' into no-rebases X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d05f06e60df4f56a70fb8a3e46335b40687169e9;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'arch-frv' into no-rebases --- d05f06e60df4f56a70fb8a3e46335b40687169e9 diff --cc arch/hexagon/include/uapi/asm/ptrace.h index 000000000000,8ef784047a74..1ffce0c6ee07 mode 000000,100644..100644 --- a/arch/hexagon/include/uapi/asm/ptrace.h +++ b/arch/hexagon/include/uapi/asm/ptrace.h @@@ -1,0 -1,35 +1,39 @@@ + /* + * Ptrace definitions for the Hexagon architecture + * + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + #ifndef _ASM_PTRACE_H + #define _ASM_PTRACE_H + + #include + + #define instruction_pointer(regs) pt_elr(regs) + #define user_stack_pointer(regs) ((regs)->r29) + + #define profile_pc(regs) instruction_pointer(regs) + + /* kprobe-based event tracer support */ + extern int regs_query_register_offset(const char *name); + extern const char *regs_query_register_name(unsigned int offset); + ++#define current_pt_regs() \ ++ ((struct pt_regs *) \ ++ ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) ++ + #endif diff --cc arch/hexagon/include/uapi/asm/unistd.h index 000000000000,81312d6a52e6..26b2e0f909c8 mode 000000,100644..100644 --- a/arch/hexagon/include/uapi/asm/unistd.h +++ b/arch/hexagon/include/uapi/asm/unistd.h @@@ -1,0 -1,31 +1,32 @@@ + /* + * Syscall support for Hexagon + * + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + /* + * The kernel pulls this unistd.h in three different ways: + * 1. the "normal" way which gets all the __NR defines + * 2. with __SYSCALL defined to produce function declarations + * 3. with __SYSCALL defined to produce syscall table initialization + * See also: syscalltab.c + */ + + #define sys_mmap2 sys_mmap_pgoff ++#define __ARCH_WANT_SYS_EXECVE + + #include 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))