aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/avr32/kernel
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r--arch/avr32/kernel/avr32_ksyms.c4
-rw-r--r--arch/avr32/kernel/irq.c37
-rw-r--r--arch/avr32/kernel/process.c9
-rw-r--r--arch/avr32/kernel/ptrace.c11
-rw-r--r--arch/avr32/kernel/setup.c15
-rw-r--r--arch/avr32/kernel/syscall_table.S1
-rw-r--r--arch/avr32/kernel/time.c5
-rw-r--r--arch/avr32/kernel/traps.c22
8 files changed, 29 insertions, 75 deletions
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c
index 11e310c567a9..d93ead02daed 100644
--- a/arch/avr32/kernel/avr32_ksyms.c
+++ b/arch/avr32/kernel/avr32_ksyms.c
@@ -58,8 +58,8 @@ EXPORT_SYMBOL(find_first_zero_bit);
58EXPORT_SYMBOL(find_next_zero_bit); 58EXPORT_SYMBOL(find_next_zero_bit);
59EXPORT_SYMBOL(find_first_bit); 59EXPORT_SYMBOL(find_first_bit);
60EXPORT_SYMBOL(find_next_bit); 60EXPORT_SYMBOL(find_next_bit);
61EXPORT_SYMBOL(generic_find_next_le_bit); 61EXPORT_SYMBOL(find_next_bit_le);
62EXPORT_SYMBOL(generic_find_next_zero_le_bit); 62EXPORT_SYMBOL(find_next_zero_bit_le);
63 63
64/* I/O primitives (lib/io-*.S) */ 64/* I/O primitives (lib/io-*.S) */
65EXPORT_SYMBOL(__raw_readsb); 65EXPORT_SYMBOL(__raw_readsb);
diff --git a/arch/avr32/kernel/irq.c b/arch/avr32/kernel/irq.c
index 9604f7758f9a..bc3aa18293df 100644
--- a/arch/avr32/kernel/irq.c
+++ b/arch/avr32/kernel/irq.c
@@ -26,40 +26,3 @@ void __weak nmi_disable(void)
26{ 26{
27 27
28} 28}
29
30#ifdef CONFIG_PROC_FS
31int show_interrupts(struct seq_file *p, void *v)
32{
33 int i = *(loff_t *)v, cpu;
34 struct irqaction *action;
35 unsigned long flags;
36
37 if (i == 0) {
38 seq_puts(p, " ");
39 for_each_online_cpu(cpu)
40 seq_printf(p, "CPU%d ", cpu);
41 seq_putc(p, '\n');
42 }
43
44 if (i < NR_IRQS) {
45 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
46 action = irq_desc[i].action;
47 if (!action)
48 goto unlock;
49
50 seq_printf(p, "%3d: ", i);
51 for_each_online_cpu(cpu)
52 seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
53 seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-");
54 seq_printf(p, " %s", action->name);
55 for (action = action->next; action; action = action->next)
56 seq_printf(p, ", %s", action->name);
57
58 seq_putc(p, '\n');
59 unlock:
60 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
61 }
62
63 return 0;
64}
65#endif
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 9c46aaad11ce..ef5a2a08fcca 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -367,14 +367,13 @@ asmlinkage int sys_fork(struct pt_regs *regs)
367} 367}
368 368
369asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, 369asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
370 unsigned long parent_tidptr, 370 void __user *parent_tidptr, void __user *child_tidptr,
371 unsigned long child_tidptr, struct pt_regs *regs) 371 struct pt_regs *regs)
372{ 372{
373 if (!newsp) 373 if (!newsp)
374 newsp = regs->sp; 374 newsp = regs->sp;
375 return do_fork(clone_flags, newsp, regs, 0, 375 return do_fork(clone_flags, newsp, regs, 0, parent_tidptr,
376 (int __user *)parent_tidptr, 376 child_tidptr);
377 (int __user *)child_tidptr);
378} 377}
379 378
380asmlinkage int sys_vfork(struct pt_regs *regs) 379asmlinkage int sys_vfork(struct pt_regs *regs)
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c
index 5e73c25f8f85..4aedcab7cd4b 100644
--- a/arch/avr32/kernel/ptrace.c
+++ b/arch/avr32/kernel/ptrace.c
@@ -146,9 +146,11 @@ static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs)
146 return ret; 146 return ret;
147} 147}
148 148
149long arch_ptrace(struct task_struct *child, long request, long addr, long data) 149long arch_ptrace(struct task_struct *child, long request,
150 unsigned long addr, unsigned long data)
150{ 151{
151 int ret; 152 int ret;
153 void __user *datap = (void __user *) data;
152 154
153 switch (request) { 155 switch (request) {
154 /* Read the word at location addr in the child process */ 156 /* Read the word at location addr in the child process */
@@ -158,8 +160,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
158 break; 160 break;
159 161
160 case PTRACE_PEEKUSR: 162 case PTRACE_PEEKUSR:
161 ret = ptrace_read_user(child, addr, 163 ret = ptrace_read_user(child, addr, datap);
162 (unsigned long __user *)data);
163 break; 164 break;
164 165
165 /* Write the word in data at location addr */ 166 /* Write the word in data at location addr */
@@ -173,11 +174,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
173 break; 174 break;
174 175
175 case PTRACE_GETREGS: 176 case PTRACE_GETREGS:
176 ret = ptrace_getregs(child, (void __user *)data); 177 ret = ptrace_getregs(child, datap);
177 break; 178 break;
178 179
179 case PTRACE_SETREGS: 180 case PTRACE_SETREGS:
180 ret = ptrace_setregs(child, (const void __user *)data); 181 ret = ptrace_setregs(child, datap);
181 break; 182 break;
182 183
183 default: 184 default:
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index 5c7083916c33..bb0974cce4ac 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -391,6 +391,21 @@ static int __init parse_tag_clock(struct tag *tag)
391__tagtable(ATAG_CLOCK, parse_tag_clock); 391__tagtable(ATAG_CLOCK, parse_tag_clock);
392 392
393/* 393/*
394 * The board_number correspond to the bd->bi_board_number in U-Boot. This
395 * parameter is only available during initialisation and can be used in some
396 * kind of board identification.
397 */
398u32 __initdata board_number;
399
400static int __init parse_tag_boardinfo(struct tag *tag)
401{
402 board_number = tag->u.boardinfo.board_number;
403
404 return 0;
405}
406__tagtable(ATAG_BOARDINFO, parse_tag_boardinfo);
407
408/*
394 * Scan the tag table for this tag, and call its parse function. The 409 * Scan the tag table for this tag, and call its parse function. The
395 * tag table is built by the linker from all the __tagtable 410 * tag table is built by the linker from all the __tagtable
396 * declarations. 411 * declarations.
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S
index e76bad16b0f0..c7fd394d28a4 100644
--- a/arch/avr32/kernel/syscall_table.S
+++ b/arch/avr32/kernel/syscall_table.S
@@ -296,4 +296,5 @@ sys_call_table:
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_recvmmsg
299 .long sys_setns
299 .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ 300 .long sys_ni_syscall /* r8 is saturated at nr_syscalls */
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 668ed2817e51..05ad29112ff4 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -35,7 +35,6 @@ static struct clocksource counter = {
35 .rating = 50, 35 .rating = 50,
36 .read = read_cycle_count, 36 .read = read_cycle_count,
37 .mask = CLOCKSOURCE_MASK(32), 37 .mask = CLOCKSOURCE_MASK(32),
38 .shift = 16,
39 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 38 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
40}; 39};
41 40
@@ -123,9 +122,7 @@ void __init time_init(void)
123 122
124 /* figure rate for counter */ 123 /* figure rate for counter */
125 counter_hz = clk_get_rate(boot_cpu_data.clk); 124 counter_hz = clk_get_rate(boot_cpu_data.clk);
126 counter.mult = clocksource_hz2mult(counter_hz, counter.shift); 125 ret = clocksource_register_hz(&counter, counter_hz);
127
128 ret = clocksource_register(&counter);
129 if (ret) 126 if (ret)
130 pr_debug("timer: could not register clocksource: %d\n", ret); 127 pr_debug("timer: could not register clocksource: %d\n", ret);
131 128
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index b91b2044af9c..7aa25756412f 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -95,28 +95,6 @@ void _exception(long signr, struct pt_regs *regs, int code,
95 info.si_code = code; 95 info.si_code = code;
96 info.si_addr = (void __user *)addr; 96 info.si_addr = (void __user *)addr;
97 force_sig_info(signr, &info, current); 97 force_sig_info(signr, &info, current);
98
99 /*
100 * Init gets no signals that it doesn't have a handler for.
101 * That's all very well, but if it has caused a synchronous
102 * exception and we ignore the resulting signal, it will just
103 * generate the same exception over and over again and we get
104 * nowhere. Better to kill it and let the kernel panic.
105 */
106 if (is_global_init(current)) {
107 __sighandler_t handler;
108
109 spin_lock_irq(&current->sighand->siglock);
110 handler = current->sighand->action[signr-1].sa.sa_handler;
111 spin_unlock_irq(&current->sighand->siglock);
112 if (handler == SIG_DFL) {
113 /* init has generated a synchronous exception
114 and it doesn't have a handler for the signal */
115 printk(KERN_CRIT "init has generated signal %ld "
116 "but has no handler for it\n", signr);
117 do_exit(signr);
118 }
119 }
120} 98}
121 99
122asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) 100asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs)