diff options
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/asm-offsets.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/calls.S | 2 | ||||
-rw-r--r-- | arch/arm/kernel/compat.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/compat.h | 13 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 2 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 3 | ||||
-rw-r--r-- | arch/arm/kernel/ptrace.c | 14 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 10 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 1 | ||||
-rw-r--r-- | arch/arm/kernel/sys_oabi-compat.c | 30 | ||||
-rw-r--r-- | arch/arm/kernel/time.c | 10 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 8 |
12 files changed, 77 insertions, 22 deletions
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 0abbce8c70bc..b324dcac1c56 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -57,7 +57,9 @@ int main(void) | |||
57 | DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); | 57 | DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); |
58 | DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); | 58 | DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); |
59 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); | 59 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); |
60 | DEFINE(TI_IWMMXT_STATE, (offsetof(struct thread_info, fpstate)+4)&~7); | 60 | #ifdef CONFIG_IWMMXT |
61 | DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); | ||
62 | #endif | ||
61 | BLANK(); | 63 | BLANK(); |
62 | DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0)); | 64 | DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0)); |
63 | DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1)); | 65 | DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1)); |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 8c3035d5ffc9..3173924a9b60 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -111,7 +111,7 @@ | |||
111 | CALL(sys_statfs) | 111 | CALL(sys_statfs) |
112 | /* 100 */ CALL(sys_fstatfs) | 112 | /* 100 */ CALL(sys_fstatfs) |
113 | CALL(sys_ni_syscall) | 113 | CALL(sys_ni_syscall) |
114 | CALL(OBSOLETE(sys_socketcall)) | 114 | CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall))) |
115 | CALL(sys_syslog) | 115 | CALL(sys_syslog) |
116 | CALL(sys_setitimer) | 116 | CALL(sys_setitimer) |
117 | /* 105 */ CALL(sys_getitimer) | 117 | /* 105 */ CALL(sys_getitimer) |
diff --git a/arch/arm/kernel/compat.c b/arch/arm/kernel/compat.c index 7195add42e74..60cfa7f3226c 100644 --- a/arch/arm/kernel/compat.c +++ b/arch/arm/kernel/compat.c | |||
@@ -27,6 +27,8 @@ | |||
27 | 27 | ||
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | 29 | ||
30 | #include "compat.h" | ||
31 | |||
30 | /* | 32 | /* |
31 | * Usage: | 33 | * Usage: |
32 | * - do not go blindly adding fields, add them at the end | 34 | * - do not go blindly adding fields, add them at the end |
diff --git a/arch/arm/kernel/compat.h b/arch/arm/kernel/compat.h new file mode 100644 index 000000000000..27e61a68bd1c --- /dev/null +++ b/arch/arm/kernel/compat.h | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/compat.h | ||
3 | * | ||
4 | * Copyright (C) 2001 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | extern void convert_to_tag_list(struct tag *tags); | ||
12 | |||
13 | extern void squash_mem_tags(struct tag *tag); | ||
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 964cd717506b..ec48d70c6d8b 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -566,7 +566,7 @@ ENTRY(__switch_to) | |||
566 | ldr r6, [r2, #TI_CPU_DOMAIN]! | 566 | ldr r6, [r2, #TI_CPU_DOMAIN]! |
567 | #endif | 567 | #endif |
568 | #if __LINUX_ARM_ARCH__ >= 6 | 568 | #if __LINUX_ARM_ARCH__ >= 6 |
569 | #ifdef CONFIG_CPU_MPCORE | 569 | #ifdef CONFIG_CPU_32v6K |
570 | clrex | 570 | clrex |
571 | #else | 571 | #else |
572 | strex r5, r4, [ip] @ Clear exclusive monitor | 572 | strex r5, r4, [ip] @ Clear exclusive monitor |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 4b4e4cf79c80..489c069e5c3e 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kallsyms.h> | 27 | #include <linux/kallsyms.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/cpu.h> | 29 | #include <linux/cpu.h> |
30 | #include <linux/elfcore.h> | ||
30 | 31 | ||
31 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
32 | #include <asm/processor.h> | 33 | #include <asm/processor.h> |
@@ -83,7 +84,7 @@ EXPORT_SYMBOL(pm_power_off); | |||
83 | * This is our default idle handler. We need to disable | 84 | * This is our default idle handler. We need to disable |
84 | * interrupts here to ensure we don't miss a wakeup call. | 85 | * interrupts here to ensure we don't miss a wakeup call. |
85 | */ | 86 | */ |
86 | void default_idle(void) | 87 | static void default_idle(void) |
87 | { | 88 | { |
88 | if (hlt_counter) | 89 | if (hlt_counter) |
89 | cpu_relax(); | 90 | cpu_relax(); |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 7b6256bb590e..a1d1b2906e8d 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -610,15 +610,12 @@ static int ptrace_setfpregs(struct task_struct *tsk, void __user *ufp) | |||
610 | static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) | 610 | static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) |
611 | { | 611 | { |
612 | struct thread_info *thread = task_thread_info(tsk); | 612 | struct thread_info *thread = task_thread_info(tsk); |
613 | void *ptr = &thread->fpstate; | ||
614 | 613 | ||
615 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) | 614 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) |
616 | return -ENODATA; | 615 | return -ENODATA; |
617 | iwmmxt_task_disable(thread); /* force it to ram */ | 616 | iwmmxt_task_disable(thread); /* force it to ram */ |
618 | /* The iWMMXt state is stored doubleword-aligned. */ | 617 | return copy_to_user(ufp, &thread->fpstate.iwmmxt, IWMMXT_SIZE) |
619 | if (((long) ptr) & 4) | 618 | ? -EFAULT : 0; |
620 | ptr += 4; | ||
621 | return copy_to_user(ufp, ptr, 0x98) ? -EFAULT : 0; | ||
622 | } | 619 | } |
623 | 620 | ||
624 | /* | 621 | /* |
@@ -627,15 +624,12 @@ static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) | |||
627 | static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) | 624 | static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) |
628 | { | 625 | { |
629 | struct thread_info *thread = task_thread_info(tsk); | 626 | struct thread_info *thread = task_thread_info(tsk); |
630 | void *ptr = &thread->fpstate; | ||
631 | 627 | ||
632 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) | 628 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) |
633 | return -EACCES; | 629 | return -EACCES; |
634 | iwmmxt_task_release(thread); /* force a reload */ | 630 | iwmmxt_task_release(thread); /* force a reload */ |
635 | /* The iWMMXt state is stored doubleword-aligned. */ | 631 | return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE) |
636 | if (((long) ptr) & 4) | 632 | ? -EFAULT : 0; |
637 | ptr += 4; | ||
638 | return copy_from_user(ptr, ufp, 0x98) ? -EFAULT : 0; | ||
639 | } | 633 | } |
640 | 634 | ||
641 | #endif | 635 | #endif |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c45d10d07bde..08974cbe9824 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/root_dev.h> | 23 | #include <linux/root_dev.h> |
24 | #include <linux/cpu.h> | 24 | #include <linux/cpu.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/smp.h> | ||
26 | 27 | ||
27 | #include <asm/cpu.h> | 28 | #include <asm/cpu.h> |
28 | #include <asm/elf.h> | 29 | #include <asm/elf.h> |
@@ -36,6 +37,8 @@ | |||
36 | #include <asm/mach/irq.h> | 37 | #include <asm/mach/irq.h> |
37 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
38 | 39 | ||
40 | #include "compat.h" | ||
41 | |||
39 | #ifndef MEM_SIZE | 42 | #ifndef MEM_SIZE |
40 | #define MEM_SIZE (16*1024*1024) | 43 | #define MEM_SIZE (16*1024*1024) |
41 | #endif | 44 | #endif |
@@ -52,10 +55,7 @@ static int __init fpe_setup(char *line) | |||
52 | __setup("fpe=", fpe_setup); | 55 | __setup("fpe=", fpe_setup); |
53 | #endif | 56 | #endif |
54 | 57 | ||
55 | extern unsigned int mem_fclk_21285; | ||
56 | extern void paging_init(struct meminfo *, struct machine_desc *desc); | 58 | extern void paging_init(struct meminfo *, struct machine_desc *desc); |
57 | extern void convert_to_tag_list(struct tag *tags); | ||
58 | extern void squash_mem_tags(struct tag *tag); | ||
59 | extern void reboot_setup(char *str); | 59 | extern void reboot_setup(char *str); |
60 | extern int root_mountflags; | 60 | extern int root_mountflags; |
61 | extern void _stext, _text, _etext, __data_start, _edata, _end; | 61 | extern void _stext, _text, _etext, __data_start, _edata, _end; |
@@ -771,6 +771,10 @@ void __init setup_arch(char **cmdline_p) | |||
771 | paging_init(&meminfo, mdesc); | 771 | paging_init(&meminfo, mdesc); |
772 | request_standard_resources(&meminfo, mdesc); | 772 | request_standard_resources(&meminfo, mdesc); |
773 | 773 | ||
774 | #ifdef CONFIG_SMP | ||
775 | smp_init_cpus(); | ||
776 | #endif | ||
777 | |||
774 | cpu_init(); | 778 | cpu_init(); |
775 | 779 | ||
776 | /* | 780 | /* |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 7338948bd7d3..02aa300c4633 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -338,7 +338,6 @@ void __init smp_prepare_boot_cpu(void) | |||
338 | 338 | ||
339 | per_cpu(cpu_data, cpu).idle = current; | 339 | per_cpu(cpu_data, cpu).idle = current; |
340 | 340 | ||
341 | cpu_set(cpu, cpu_possible_map); | ||
342 | cpu_set(cpu, cpu_present_map); | 341 | cpu_set(cpu, cpu_present_map); |
343 | cpu_set(cpu, cpu_online_map); | 342 | cpu_set(cpu, cpu_online_map); |
344 | } | 343 | } |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 9d4b76409c64..8e2f9bc3368b 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -64,6 +64,7 @@ | |||
64 | * sys_connect: | 64 | * sys_connect: |
65 | * sys_sendmsg: | 65 | * sys_sendmsg: |
66 | * sys_sendto: | 66 | * sys_sendto: |
67 | * sys_socketcall: | ||
67 | * | 68 | * |
68 | * struct sockaddr_un loses its padding with EABI. Since the size of the | 69 | * struct sockaddr_un loses its padding with EABI. Since the size of the |
69 | * structure is used as a validation test in unix_mkname(), we need to | 70 | * structure is used as a validation test in unix_mkname(), we need to |
@@ -78,6 +79,7 @@ | |||
78 | #include <linux/eventpoll.h> | 79 | #include <linux/eventpoll.h> |
79 | #include <linux/sem.h> | 80 | #include <linux/sem.h> |
80 | #include <linux/socket.h> | 81 | #include <linux/socket.h> |
82 | #include <linux/net.h> | ||
81 | #include <asm/ipc.h> | 83 | #include <asm/ipc.h> |
82 | #include <asm/uaccess.h> | 84 | #include <asm/uaccess.h> |
83 | 85 | ||
@@ -408,3 +410,31 @@ asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned fla | |||
408 | return sys_sendmsg(fd, msg, flags); | 410 | return sys_sendmsg(fd, msg, flags); |
409 | } | 411 | } |
410 | 412 | ||
413 | asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args) | ||
414 | { | ||
415 | unsigned long r = -EFAULT, a[6]; | ||
416 | |||
417 | switch (call) { | ||
418 | case SYS_BIND: | ||
419 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
420 | r = sys_oabi_bind(a[0], (struct sockaddr __user *)a[1], a[2]); | ||
421 | break; | ||
422 | case SYS_CONNECT: | ||
423 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
424 | r = sys_oabi_connect(a[0], (struct sockaddr __user *)a[1], a[2]); | ||
425 | break; | ||
426 | case SYS_SENDTO: | ||
427 | if (copy_from_user(a, args, 6 * sizeof(long)) == 0) | ||
428 | r = sys_oabi_sendto(a[0], (void __user *)a[1], a[2], a[3], | ||
429 | (struct sockaddr __user *)a[4], a[5]); | ||
430 | break; | ||
431 | case SYS_SENDMSG: | ||
432 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
433 | r = sys_oabi_sendmsg(a[0], (struct msghdr __user *)a[1], a[2]); | ||
434 | break; | ||
435 | default: | ||
436 | r = sys_socketcall(call, args); | ||
437 | } | ||
438 | |||
439 | return r; | ||
440 | } | ||
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index d7d932c02866..d6bd435a6857 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -422,12 +422,14 @@ static int timer_dyn_tick_disable(void) | |||
422 | void timer_dyn_reprogram(void) | 422 | void timer_dyn_reprogram(void) |
423 | { | 423 | { |
424 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; | 424 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; |
425 | unsigned long next, seq; | ||
425 | 426 | ||
426 | if (dyn_tick) { | 427 | if (dyn_tick && (dyn_tick->state & DYN_TICK_ENABLED)) { |
427 | write_seqlock(&xtime_lock); | 428 | next = next_timer_interrupt(); |
428 | if (dyn_tick->state & DYN_TICK_ENABLED) | 429 | do { |
430 | seq = read_seqbegin(&xtime_lock); | ||
429 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); | 431 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); |
430 | write_sequnlock(&xtime_lock); | 432 | } while (read_seqretry(&xtime_lock, seq)); |
431 | } | 433 | } |
432 | } | 434 | } |
433 | 435 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 10235b01582e..03924bcc6129 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/personality.h> | 19 | #include <linux/personality.h> |
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
22 | #include <linux/delay.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | 24 | ||
24 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
@@ -231,6 +232,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | |||
231 | __die(str, err, thread, regs); | 232 | __die(str, err, thread, regs); |
232 | bust_spinlocks(0); | 233 | bust_spinlocks(0); |
233 | spin_unlock_irq(&die_lock); | 234 | spin_unlock_irq(&die_lock); |
235 | |||
236 | if (panic_on_oops) { | ||
237 | printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); | ||
238 | ssleep(5); | ||
239 | panic("Fatal exception"); | ||
240 | } | ||
241 | |||
234 | do_exit(SIGSEGV); | 242 | do_exit(SIGSEGV); |
235 | } | 243 | } |
236 | 244 | ||