diff options
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/pci.h | 8 | ||||
-rw-r--r-- | arch/xtensa/include/asm/ptrace.h | 1 | ||||
-rw-r--r-- | arch/xtensa/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 56 |
4 files changed, 14 insertions, 55 deletions
diff --git a/arch/xtensa/include/asm/pci.h b/arch/xtensa/include/asm/pci.h index 66410acf18b..4609b0f15f1 100644 --- a/arch/xtensa/include/asm/pci.h +++ b/arch/xtensa/include/asm/pci.h | |||
@@ -56,14 +56,6 @@ struct pci_dev; | |||
56 | 56 | ||
57 | #define PCI_DMA_BUS_IS_PHYS (1) | 57 | #define PCI_DMA_BUS_IS_PHYS (1) |
58 | 58 | ||
59 | /* pci_unmap_{page,single} is a no-op, so */ | ||
60 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
61 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
62 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
63 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
64 | #define pci_ubnmap_len(PTR, LEN_NAME) (0) | ||
65 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
66 | |||
67 | /* Map a range of PCI memory or I/O space for a device into user space */ | 59 | /* Map a range of PCI memory or I/O space for a device into user space */ |
68 | int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | 60 | int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, |
69 | enum pci_mmap_state mmap_state, int write_combine); | 61 | enum pci_mmap_state mmap_state, int write_combine); |
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h index 905e1e61965..3c549f79872 100644 --- a/arch/xtensa/include/asm/ptrace.h +++ b/arch/xtensa/include/asm/ptrace.h | |||
@@ -113,6 +113,7 @@ struct pt_regs { | |||
113 | 113 | ||
114 | #include <variant/core.h> | 114 | #include <variant/core.h> |
115 | 115 | ||
116 | # define arch_has_single_step() (1) | ||
116 | # define task_pt_regs(tsk) ((struct pt_regs*) \ | 117 | # define task_pt_regs(tsk) ((struct pt_regs*) \ |
117 | (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) | 118 | (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) |
118 | # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) | 119 | # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) |
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 80d24c485fd..77fc9f6dc01 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
@@ -104,7 +104,7 @@ | |||
104 | * excsave has been restored, and | 104 | * excsave has been restored, and |
105 | * stack pointer (a1) has been set. | 105 | * stack pointer (a1) has been set. |
106 | * | 106 | * |
107 | * Note: _user_exception might be at an odd adress. Don't use call0..call12 | 107 | * Note: _user_exception might be at an odd address. Don't use call0..call12 |
108 | */ | 108 | */ |
109 | 109 | ||
110 | ENTRY(user_exception) | 110 | ENTRY(user_exception) |
@@ -244,7 +244,7 @@ _user_exception: | |||
244 | * excsave has been restored, and | 244 | * excsave has been restored, and |
245 | * stack pointer (a1) has been set. | 245 | * stack pointer (a1) has been set. |
246 | * | 246 | * |
247 | * Note: _kernel_exception might be at an odd adress. Don't use call0..call12 | 247 | * Note: _kernel_exception might be at an odd address. Don't use call0..call12 |
248 | */ | 248 | */ |
249 | 249 | ||
250 | ENTRY(kernel_exception) | 250 | ENTRY(kernel_exception) |
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 9486882ef0a..9d4e1ceb3f0 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -30,6 +30,17 @@ | |||
30 | #include <asm/elf.h> | 30 | #include <asm/elf.h> |
31 | #include <asm/coprocessor.h> | 31 | #include <asm/coprocessor.h> |
32 | 32 | ||
33 | |||
34 | void user_enable_single_step(struct task_struct *child) | ||
35 | { | ||
36 | child->ptrace |= PT_SINGLESTEP; | ||
37 | } | ||
38 | |||
39 | void user_disable_single_step(struct task_struct *child) | ||
40 | { | ||
41 | child->ptrace &= ~PT_SINGLESTEP; | ||
42 | } | ||
43 | |||
33 | /* | 44 | /* |
34 | * Called by kernel/ptrace.c when detaching to disable single stepping. | 45 | * Called by kernel/ptrace.c when detaching to disable single stepping. |
35 | */ | 46 | */ |
@@ -268,51 +279,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
268 | ret = ptrace_pokeusr(child, addr, data); | 279 | ret = ptrace_pokeusr(child, addr, data); |
269 | break; | 280 | break; |
270 | 281 | ||
271 | /* continue and stop at next (return from) syscall */ | ||
272 | |||
273 | case PTRACE_SYSCALL: | ||
274 | case PTRACE_CONT: /* restart after signal. */ | ||
275 | { | ||
276 | ret = -EIO; | ||
277 | if (!valid_signal(data)) | ||
278 | break; | ||
279 | if (request == PTRACE_SYSCALL) | ||
280 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
281 | else | ||
282 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
283 | child->exit_code = data; | ||
284 | /* Make sure the single step bit is not set. */ | ||
285 | child->ptrace &= ~PT_SINGLESTEP; | ||
286 | wake_up_process(child); | ||
287 | ret = 0; | ||
288 | break; | ||
289 | } | ||
290 | |||
291 | /* | ||
292 | * make the child exit. Best I can do is send it a sigkill. | ||
293 | * perhaps it should be put in the status that it wants to | ||
294 | * exit. | ||
295 | */ | ||
296 | case PTRACE_KILL: | ||
297 | ret = 0; | ||
298 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
299 | break; | ||
300 | child->exit_code = SIGKILL; | ||
301 | child->ptrace &= ~PT_SINGLESTEP; | ||
302 | wake_up_process(child); | ||
303 | break; | ||
304 | |||
305 | case PTRACE_SINGLESTEP: | ||
306 | ret = -EIO; | ||
307 | if (!valid_signal(data)) | ||
308 | break; | ||
309 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
310 | child->ptrace |= PT_SINGLESTEP; | ||
311 | child->exit_code = data; | ||
312 | wake_up_process(child); | ||
313 | ret = 0; | ||
314 | break; | ||
315 | |||
316 | case PTRACE_GETREGS: | 282 | case PTRACE_GETREGS: |
317 | ret = ptrace_getregs(child, (void __user *) data); | 283 | ret = ptrace_getregs(child, (void __user *) data); |
318 | break; | 284 | break; |