diff options
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/xtensa/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/xtensa/kernel/pci-dma.c | 1 | ||||
-rw-r--r-- | arch/xtensa/kernel/pci.c | 15 | ||||
-rw-r--r-- | arch/xtensa/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 56 | ||||
-rw-r--r-- | arch/xtensa/kernel/syscall.c | 43 |
7 files changed, 24 insertions, 101 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 @@ | |||
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/irq.c b/arch/xtensa/kernel/irq.c index a1badb32fcda..8cd38484e130 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -90,7 +90,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
90 | } | 90 | } |
91 | 91 | ||
92 | if (i < NR_IRQS) { | 92 | if (i < NR_IRQS) { |
93 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 93 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |
94 | action = irq_desc[i].action; | 94 | action = irq_desc[i].action; |
95 | if (!action) | 95 | if (!action) |
96 | goto skip; | 96 | goto skip; |
@@ -109,7 +109,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
109 | 109 | ||
110 | seq_putc(p, '\n'); | 110 | seq_putc(p, '\n'); |
111 | skip: | 111 | skip: |
112 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 112 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
113 | } else if (i == NR_IRQS) { | 113 | } else if (i == NR_IRQS) { |
114 | seq_printf(p, "NMI: "); | 114 | seq_printf(p, "NMI: "); |
115 | for_each_online_cpu(j) | 115 | for_each_online_cpu(j) |
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 @@ | |||
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
24 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
25 | 26 | ||
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index b7c073484e01..cd1026931203 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c | |||
@@ -69,26 +69,25 @@ static int pci_bus_count; | |||
69 | * but we want to try to avoid allocating at 0x2900-0x2bff | 69 | * but we want to try to avoid allocating at 0x2900-0x2bff |
70 | * which might have be mirrored at 0x0100-0x03ff.. | 70 | * which might have be mirrored at 0x0100-0x03ff.. |
71 | */ | 71 | */ |
72 | void | 72 | resource_size_t |
73 | pcibios_align_resource(void *data, struct resource *res, resource_size_t size, | 73 | pcibios_align_resource(void *data, const struct resource *res, |
74 | resource_size_t align) | 74 | resource_size_t size, resource_size_t align) |
75 | { | 75 | { |
76 | struct pci_dev *dev = data; | 76 | struct pci_dev *dev = data; |
77 | resource_size_t start = res->start; | ||
77 | 78 | ||
78 | if (res->flags & IORESOURCE_IO) { | 79 | if (res->flags & IORESOURCE_IO) { |
79 | resource_size_t start = res->start; | ||
80 | |||
81 | if (size > 0x100) { | 80 | if (size > 0x100) { |
82 | printk(KERN_ERR "PCI: I/O Region %s/%d too large" | 81 | printk(KERN_ERR "PCI: I/O Region %s/%d too large" |
83 | " (%ld bytes)\n", pci_name(dev), | 82 | " (%ld bytes)\n", pci_name(dev), |
84 | dev->resource - res, size); | 83 | dev->resource - res, size); |
85 | } | 84 | } |
86 | 85 | ||
87 | if (start & 0x300) { | 86 | if (start & 0x300) |
88 | start = (start + 0x3ff) & ~0x3ff; | 87 | start = (start + 0x3ff) & ~0x3ff; |
89 | res->start = start; | ||
90 | } | ||
91 | } | 88 | } |
89 | |||
90 | return start; | ||
92 | } | 91 | } |
93 | 92 | ||
94 | int | 93 | int |
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 @@ | |||
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <linux/unistd.h> | 24 | #include <linux/unistd.h> |
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/elf.h> | 26 | #include <linux/elf.h> |
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/prctl.h> | 28 | #include <linux/prctl.h> |
@@ -31,6 +30,7 @@ | |||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/mqueue.h> | 31 | #include <linux/mqueue.h> |
33 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
33 | #include <linux/slab.h> | ||
34 | 34 | ||
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/uaccess.h> | 36 | #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 @@ | |||
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; |
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index ac15ecbdf919..816e6d0d686c 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c | |||
@@ -39,49 +39,6 @@ syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= { | |||
39 | #include <asm/unistd.h> | 39 | #include <asm/unistd.h> |
40 | }; | 40 | }; |
41 | 41 | ||
42 | /* | ||
43 | * xtensa_pipe() is the normal C calling standard for creating a pipe. It's not | ||
44 | * the way unix traditional does this, though. | ||
45 | */ | ||
46 | |||
47 | asmlinkage long xtensa_pipe(int __user *userfds) | ||
48 | { | ||
49 | int fd[2]; | ||
50 | int error; | ||
51 | |||
52 | error = do_pipe_flags(fd, 0); | ||
53 | if (!error) { | ||
54 | if (copy_to_user(userfds, fd, 2 * sizeof(int))) | ||
55 | error = -EFAULT; | ||
56 | } | ||
57 | return error; | ||
58 | } | ||
59 | |||
60 | |||
61 | asmlinkage long xtensa_mmap2(unsigned long addr, unsigned long len, | ||
62 | unsigned long prot, unsigned long flags, | ||
63 | unsigned long fd, unsigned long pgoff) | ||
64 | { | ||
65 | int error = -EBADF; | ||
66 | struct file * file = NULL; | ||
67 | |||
68 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
69 | if (!(flags & MAP_ANONYMOUS)) { | ||
70 | file = fget(fd); | ||
71 | if (!file) | ||
72 | goto out; | ||
73 | } | ||
74 | |||
75 | down_write(¤t->mm->mmap_sem); | ||
76 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
77 | up_write(¤t->mm->mmap_sem); | ||
78 | |||
79 | if (file) | ||
80 | fput(file); | ||
81 | out: | ||
82 | return error; | ||
83 | } | ||
84 | |||
85 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) | 42 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) |
86 | { | 43 | { |
87 | unsigned long ret; | 44 | unsigned long ret; |