diff options
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/xtensa/kernel/pci-dma.c | 1 | ||||
-rw-r--r-- | arch/xtensa/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 56 |
4 files changed, 15 insertions, 48 deletions
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 80d24c485fd3..77fc9f6dc016 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -104,7 +104,7 @@ * excsave has been restored, and * stack pointer (a1) has been set. * - * Note: _user_exception might be at an odd adress. Don't use call0..call12 + * Note: _user_exception might be at an odd address. Don't use call0..call12 */ ENTRY(user_exception) @@ -244,7 +244,7 @@ _user_exception: * excsave has been restored, and * stack pointer (a1) has been set. * - * Note: _kernel_exception might be at an odd adress. Don't use call0..call12 + * Note: _kernel_exception might be at an odd address. Don't use call0..call12 */ ENTRY(kernel_exception) diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c index f5319d78c876..2783fda76ddc 100644 --- a/arch/xtensa/kernel/pci-dma.c +++ b/arch/xtensa/kernel/pci-dma.c @@ -20,6 +20,7 @@ #include <linux/mm.h> #include <linux/string.h> #include <linux/pci.h> +#include <linux/gfp.h> #include <asm/io.h> #include <asm/cacheflush.h> diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index e1a04a346e75..f167e0f5e05e 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c @@ -23,7 +23,6 @@ #include <linux/stddef.h> #include <linux/unistd.h> #include <linux/ptrace.h> -#include <linux/slab.h> #include <linux/elf.h> #include <linux/init.h> #include <linux/prctl.h> @@ -31,6 +30,7 @@ #include <linux/module.h> #include <linux/mqueue.h> #include <linux/fs.h> +#include <linux/slab.h> #include <asm/pgtable.h> #include <asm/uaccess.h> diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 9486882ef0af..9d4e1ceb3f09 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c @@ -30,6 +30,17 @@ #include <asm/elf.h> #include <asm/coprocessor.h> + +void user_enable_single_step(struct task_struct *child) +{ + child->ptrace |= PT_SINGLESTEP; +} + +void user_disable_single_step(struct task_struct *child) +{ + child->ptrace &= ~PT_SINGLESTEP; +} + /* * Called by kernel/ptrace.c when detaching to disable single stepping. */ @@ -268,51 +279,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ret = ptrace_pokeusr(child, addr, data); break; - /* continue and stop at next (return from) syscall */ - - case PTRACE_SYSCALL: - case PTRACE_CONT: /* restart after signal. */ - { - ret = -EIO; - if (!valid_signal(data)) - break; - if (request == PTRACE_SYSCALL) - set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - else - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - child->exit_code = data; - /* Make sure the single step bit is not set. */ - child->ptrace &= ~PT_SINGLESTEP; - wake_up_process(child); - ret = 0; - break; - } - - /* - * make the child exit. Best I can do is send it a sigkill. - * perhaps it should be put in the status that it wants to - * exit. - */ - case PTRACE_KILL: - ret = 0; - if (child->exit_state == EXIT_ZOMBIE) /* already dead */ - break; - child->exit_code = SIGKILL; - child->ptrace &= ~PT_SINGLESTEP; - wake_up_process(child); - break; - - case PTRACE_SINGLESTEP: - ret = -EIO; - if (!valid_signal(data)) - break; - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - child->ptrace |= PT_SINGLESTEP; - child->exit_code = data; - wake_up_process(child); - ret = 0; - break; - case PTRACE_GETREGS: ret = ptrace_getregs(child, (void __user *) data); break; |