diff options
| author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
|---|---|---|
| committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
| commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
| tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/avr32/kernel | |
| parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
| parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) | |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/avr32/kernel')
| -rw-r--r-- | arch/avr32/kernel/irq.c | 13 | ||||
| -rw-r--r-- | arch/avr32/kernel/process.c | 1 | ||||
| -rw-r--r-- | arch/avr32/kernel/ptrace.c | 53 | ||||
| -rw-r--r-- | arch/avr32/kernel/sys_avr32.c | 31 | ||||
| -rw-r--r-- | arch/avr32/kernel/syscall-stubs.S | 2 | ||||
| -rw-r--r-- | arch/avr32/kernel/syscall_table.S | 1 | ||||
| -rw-r--r-- | arch/avr32/kernel/vmlinux.lds.S | 64 |
7 files changed, 21 insertions, 144 deletions
diff --git a/arch/avr32/kernel/irq.c b/arch/avr32/kernel/irq.c index 9f572229d318..9604f7758f9a 100644 --- a/arch/avr32/kernel/irq.c +++ b/arch/avr32/kernel/irq.c | |||
| @@ -16,15 +16,6 @@ | |||
| 16 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
| 17 | #include <linux/sysdev.h> | 17 | #include <linux/sysdev.h> |
| 18 | 18 | ||
| 19 | /* | ||
| 20 | * 'what should we do if we get a hw irq event on an illegal vector'. | ||
| 21 | * each architecture has to answer this themselves. | ||
| 22 | */ | ||
| 23 | void ack_bad_irq(unsigned int irq) | ||
| 24 | { | ||
| 25 | printk("unexpected IRQ %u\n", irq); | ||
| 26 | } | ||
| 27 | |||
| 28 | /* May be overridden by platform code */ | 19 | /* May be overridden by platform code */ |
| 29 | int __weak nmi_enable(void) | 20 | int __weak nmi_enable(void) |
| 30 | { | 21 | { |
| @@ -51,7 +42,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
| 51 | } | 42 | } |
| 52 | 43 | ||
| 53 | if (i < NR_IRQS) { | 44 | if (i < NR_IRQS) { |
| 54 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 45 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |
| 55 | action = irq_desc[i].action; | 46 | action = irq_desc[i].action; |
| 56 | if (!action) | 47 | if (!action) |
| 57 | goto unlock; | 48 | goto unlock; |
| @@ -66,7 +57,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
| 66 | 57 | ||
| 67 | seq_putc(p, '\n'); | 58 | seq_putc(p, '\n'); |
| 68 | unlock: | 59 | unlock: |
| 69 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 60 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
| 70 | } | 61 | } |
| 71 | 62 | ||
| 72 | return 0; | 63 | return 0; |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 93c0342530a0..2d76515745a4 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
| 12 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
| 13 | #include <linux/ptrace.h> | 13 | #include <linux/ptrace.h> |
| 14 | #include <linux/slab.h> | ||
| 14 | #include <linux/reboot.h> | 15 | #include <linux/reboot.h> |
| 15 | #include <linux/tick.h> | 16 | #include <linux/tick.h> |
| 16 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index 1fed38fcf594..5e73c25f8f85 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
| @@ -28,9 +28,9 @@ static struct pt_regs *get_user_regs(struct task_struct *tsk) | |||
| 28 | THREAD_SIZE - sizeof(struct pt_regs)); | 28 | THREAD_SIZE - sizeof(struct pt_regs)); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | static void ptrace_single_step(struct task_struct *tsk) | 31 | void user_enable_single_step(struct task_struct *tsk) |
| 32 | { | 32 | { |
| 33 | pr_debug("ptrace_single_step: pid=%u, PC=0x%08lx, SR=0x%08lx\n", | 33 | pr_debug("user_enable_single_step: pid=%u, PC=0x%08lx, SR=0x%08lx\n", |
| 34 | tsk->pid, task_pt_regs(tsk)->pc, task_pt_regs(tsk)->sr); | 34 | tsk->pid, task_pt_regs(tsk)->pc, task_pt_regs(tsk)->sr); |
| 35 | 35 | ||
| 36 | /* | 36 | /* |
| @@ -49,6 +49,11 @@ static void ptrace_single_step(struct task_struct *tsk) | |||
| 49 | set_tsk_thread_flag(tsk, TIF_SINGLE_STEP); | 49 | set_tsk_thread_flag(tsk, TIF_SINGLE_STEP); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | void user_disable_single_step(struct task_struct *child) | ||
| 53 | { | ||
| 54 | /* XXX(hch): a no-op here seems wrong.. */ | ||
| 55 | } | ||
| 56 | |||
| 52 | /* | 57 | /* |
| 53 | * Called by kernel/ptrace.c when detaching | 58 | * Called by kernel/ptrace.c when detaching |
| 54 | * | 59 | * |
| @@ -167,50 +172,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
| 167 | ret = ptrace_write_user(child, addr, data); | 172 | ret = ptrace_write_user(child, addr, data); |
| 168 | break; | 173 | break; |
| 169 | 174 | ||
| 170 | /* continue and stop at next (return from) syscall */ | ||
| 171 | case PTRACE_SYSCALL: | ||
| 172 | /* restart after signal */ | ||
| 173 | case PTRACE_CONT: | ||
| 174 | ret = -EIO; | ||
| 175 | if (!valid_signal(data)) | ||
| 176 | break; | ||
| 177 | if (request == PTRACE_SYSCALL) | ||
| 178 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
| 179 | else | ||
| 180 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
| 181 | child->exit_code = data; | ||
| 182 | /* XXX: Are we sure no breakpoints are active here? */ | ||
| 183 | wake_up_process(child); | ||
| 184 | ret = 0; | ||
| 185 | break; | ||
| 186 | |||
| 187 | /* | ||
| 188 | * Make the child exit. Best I can do is send it a | ||
| 189 | * SIGKILL. Perhaps it should be put in the status that it | ||
| 190 | * wants to exit. | ||
| 191 | */ | ||
| 192 | case PTRACE_KILL: | ||
| 193 | ret = 0; | ||
| 194 | if (child->exit_state == EXIT_ZOMBIE) | ||
| 195 | break; | ||
| 196 | child->exit_code = SIGKILL; | ||
| 197 | wake_up_process(child); | ||
| 198 | break; | ||
| 199 | |||
| 200 | /* | ||
| 201 | * execute single instruction. | ||
| 202 | */ | ||
| 203 | case PTRACE_SINGLESTEP: | ||
| 204 | ret = -EIO; | ||
| 205 | if (!valid_signal(data)) | ||
| 206 | break; | ||
| 207 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
| 208 | ptrace_single_step(child); | ||
| 209 | child->exit_code = data; | ||
| 210 | wake_up_process(child); | ||
| 211 | ret = 0; | ||
| 212 | break; | ||
| 213 | |||
| 214 | case PTRACE_GETREGS: | 175 | case PTRACE_GETREGS: |
| 215 | ret = ptrace_getregs(child, (void __user *)data); | 176 | ret = ptrace_getregs(child, (void __user *)data); |
| 216 | break; | 177 | break; |
diff --git a/arch/avr32/kernel/sys_avr32.c b/arch/avr32/kernel/sys_avr32.c index 5d2daeaf356f..459349b5ed5a 100644 --- a/arch/avr32/kernel/sys_avr32.c +++ b/arch/avr32/kernel/sys_avr32.c | |||
| @@ -5,39 +5,8 @@ | |||
| 5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 7 | */ | 7 | */ |
| 8 | #include <linux/errno.h> | ||
| 9 | #include <linux/fs.h> | ||
| 10 | #include <linux/file.h> | ||
| 11 | #include <linux/mm.h> | ||
| 12 | #include <linux/unistd.h> | 8 | #include <linux/unistd.h> |
| 13 | 9 | ||
| 14 | #include <asm/mman.h> | ||
| 15 | #include <asm/uaccess.h> | ||
| 16 | #include <asm/syscalls.h> | ||
| 17 | |||
| 18 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
| 19 | unsigned long prot, unsigned long flags, | ||
| 20 | unsigned long fd, off_t offset) | ||
| 21 | { | ||
| 22 | int error = -EBADF; | ||
| 23 | struct file *file = NULL; | ||
| 24 | |||
| 25 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
| 26 | if (!(flags & MAP_ANONYMOUS)) { | ||
| 27 | file = fget(fd); | ||
| 28 | if (!file) | ||
| 29 | return error; | ||
| 30 | } | ||
| 31 | |||
| 32 | down_write(¤t->mm->mmap_sem); | ||
| 33 | error = do_mmap_pgoff(file, addr, len, prot, flags, offset); | ||
| 34 | up_write(¤t->mm->mmap_sem); | ||
| 35 | |||
| 36 | if (file) | ||
| 37 | fput(file); | ||
| 38 | return error; | ||
| 39 | } | ||
| 40 | |||
| 41 | int kernel_execve(const char *file, char **argv, char **envp) | 10 | int kernel_execve(const char *file, char **argv, char **envp) |
| 42 | { | 11 | { |
| 43 | register long scno asm("r8") = __NR_execve; | 12 | register long scno asm("r8") = __NR_execve; |
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S index f7244cd02fbb..0447a3e2ba64 100644 --- a/arch/avr32/kernel/syscall-stubs.S +++ b/arch/avr32/kernel/syscall-stubs.S | |||
| @@ -61,7 +61,7 @@ __sys_execve: | |||
| 61 | __sys_mmap2: | 61 | __sys_mmap2: |
| 62 | pushm lr | 62 | pushm lr |
| 63 | st.w --sp, ARG6 | 63 | st.w --sp, ARG6 |
| 64 | call sys_mmap2 | 64 | call sys_mmap_pgoff |
| 65 | sub sp, -4 | 65 | sub sp, -4 |
| 66 | popm pc | 66 | popm pc |
| 67 | 67 | ||
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 7ee0057613b3..e76bad16b0f0 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S | |||
| @@ -295,4 +295,5 @@ sys_call_table: | |||
| 295 | .long sys_signalfd | 295 | .long sys_signalfd |
| 296 | .long sys_ni_syscall /* 280, was sys_timerfd */ | 296 | .long sys_ni_syscall /* 280, was sys_timerfd */ |
| 297 | .long sys_eventfd | 297 | .long sys_eventfd |
| 298 | .long sys_recvmmsg | ||
| 298 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ | 299 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ |
diff --git a/arch/avr32/kernel/vmlinux.lds.S b/arch/avr32/kernel/vmlinux.lds.S index c4b56654349a..9cd2bd91d64a 100644 --- a/arch/avr32/kernel/vmlinux.lds.S +++ b/arch/avr32/kernel/vmlinux.lds.S | |||
| @@ -39,30 +39,10 @@ SECTIONS | |||
| 39 | __tagtable_begin = .; | 39 | __tagtable_begin = .; |
| 40 | *(.taglist.init) | 40 | *(.taglist.init) |
| 41 | __tagtable_end = .; | 41 | __tagtable_end = .; |
| 42 | INIT_DATA | ||
| 43 | . = ALIGN(16); | ||
| 44 | __setup_start = .; | ||
| 45 | *(.init.setup) | ||
| 46 | __setup_end = .; | ||
| 47 | . = ALIGN(4); | ||
| 48 | __initcall_start = .; | ||
| 49 | INITCALLS | ||
| 50 | __initcall_end = .; | ||
| 51 | __con_initcall_start = .; | ||
| 52 | *(.con_initcall.init) | ||
| 53 | __con_initcall_end = .; | ||
| 54 | __security_initcall_start = .; | ||
| 55 | *(.security_initcall.init) | ||
| 56 | __security_initcall_end = .; | ||
| 57 | #ifdef CONFIG_BLK_DEV_INITRD | ||
| 58 | . = ALIGN(32); | ||
| 59 | __initramfs_start = .; | ||
| 60 | *(.init.ramfs) | ||
| 61 | __initramfs_end = .; | ||
| 62 | #endif | ||
| 63 | . = ALIGN(PAGE_SIZE); | ||
| 64 | __init_end = .; | ||
| 65 | } | 42 | } |
| 43 | INIT_DATA_SECTION(16) | ||
| 44 | . = ALIGN(PAGE_SIZE); | ||
| 45 | __init_end = .; | ||
| 66 | 46 | ||
| 67 | .text : AT(ADDR(.text) - LOAD_OFFSET) { | 47 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
| 68 | _evba = .; | 48 | _evba = .; |
| @@ -78,34 +58,16 @@ SECTIONS | |||
| 78 | _etext = .; | 58 | _etext = .; |
| 79 | } = 0xd703d703 | 59 | } = 0xd703d703 |
| 80 | 60 | ||
| 81 | . = ALIGN(4); | 61 | EXCEPTION_TABLE(4) |
| 82 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { | ||
| 83 | __start___ex_table = .; | ||
| 84 | *(__ex_table) | ||
| 85 | __stop___ex_table = .; | ||
| 86 | } | ||
| 87 | |||
| 88 | RODATA | 62 | RODATA |
| 89 | 63 | ||
| 90 | . = ALIGN(THREAD_SIZE); | ||
| 91 | |||
| 92 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | 64 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
| 93 | _data = .; | 65 | _data = .; |
| 94 | _sdata = .; | 66 | _sdata = .; |
| 95 | /* | ||
| 96 | * First, the init task union, aligned to an 8K boundary. | ||
| 97 | */ | ||
| 98 | *(.data.init_task) | ||
| 99 | 67 | ||
| 100 | /* Then, the page-aligned data */ | 68 | INIT_TASK_DATA(THREAD_SIZE) |
| 101 | . = ALIGN(PAGE_SIZE); | 69 | PAGE_ALIGNED_DATA(PAGE_SIZE); |
| 102 | *(.data.page_aligned) | 70 | CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) |
| 103 | |||
| 104 | /* Then, the cacheline aligned data */ | ||
| 105 | . = ALIGN(L1_CACHE_BYTES); | ||
| 106 | *(.data.cacheline_aligned) | ||
| 107 | |||
| 108 | /* And the rest... */ | ||
| 109 | *(.data.rel*) | 71 | *(.data.rel*) |
| 110 | DATA_DATA | 72 | DATA_DATA |
| 111 | CONSTRUCTORS | 73 | CONSTRUCTORS |
| @@ -113,16 +75,8 @@ SECTIONS | |||
| 113 | _edata = .; | 75 | _edata = .; |
| 114 | } | 76 | } |
| 115 | 77 | ||
| 116 | 78 | BSS_SECTION(0, 8, 8) | |
| 117 | . = ALIGN(8); | 79 | _end = .; |
| 118 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | ||
| 119 | __bss_start = .; | ||
| 120 | *(.bss) | ||
| 121 | *(COMMON) | ||
| 122 | . = ALIGN(8); | ||
| 123 | __bss_stop = .; | ||
| 124 | _end = .; | ||
| 125 | } | ||
| 126 | 80 | ||
| 127 | DWARF_DEBUG | 81 | DWARF_DEBUG |
| 128 | 82 | ||
