diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-19 14:09:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-19 14:09:23 -0400 |
commit | 2422084a94fcd5038406261b331672a13c92c050 (patch) | |
tree | 18b8aede90f388b9e2808b1517a105ad5171e6ac | |
parent | 81cef8e38babd1dd07eb53fccc956620a1b4f32e (diff) | |
parent | 494486a1d2697f2153199b6501ab5b4d6e15a2bb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
alpha: deal with multiple simultaneously pending signals
alpha: fix a 14 years old bug in sigreturn tracing
alpha: unb0rk sigsuspend() and rt_sigsuspend()
alpha: belated ERESTART_RESTARTBLOCK race fix
alpha: Shift perf event pending work earlier in timer interrupt
alpha: wire up fanotify and prlimit64 syscalls
alpha: kill big kernel lock
alpha: fix build breakage in asm/cacheflush.h
alpha: remove unnecessary cast from void* in assignment.
alpha: Use static const char * const where possible
-rw-r--r-- | arch/alpha/include/asm/cacheflush.h | 2 | ||||
-rw-r--r-- | arch/alpha/include/asm/unistd.h | 6 | ||||
-rw-r--r-- | arch/alpha/kernel/entry.S | 61 | ||||
-rw-r--r-- | arch/alpha/kernel/err_ev6.c | 12 | ||||
-rw-r--r-- | arch/alpha/kernel/err_marvel.c | 33 | ||||
-rw-r--r-- | arch/alpha/kernel/err_titan.c | 35 | ||||
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 9 | ||||
-rw-r--r-- | arch/alpha/kernel/pci-sysfs.c | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/signal.c | 41 | ||||
-rw-r--r-- | arch/alpha/kernel/srm_env.c | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/systbls.S | 3 | ||||
-rw-r--r-- | arch/alpha/kernel/time.c | 10 | ||||
-rw-r--r-- | arch/alpha/kernel/traps.c | 3 |
13 files changed, 88 insertions, 131 deletions
diff --git a/arch/alpha/include/asm/cacheflush.h b/arch/alpha/include/asm/cacheflush.h index 01d71e1c8a9e..012f1243b1c1 100644 --- a/arch/alpha/include/asm/cacheflush.h +++ b/arch/alpha/include/asm/cacheflush.h | |||
@@ -43,6 +43,8 @@ extern void smp_imb(void); | |||
43 | /* ??? Ought to use this in arch/alpha/kernel/signal.c too. */ | 43 | /* ??? Ought to use this in arch/alpha/kernel/signal.c too. */ |
44 | 44 | ||
45 | #ifndef CONFIG_SMP | 45 | #ifndef CONFIG_SMP |
46 | #include <linux/sched.h> | ||
47 | |||
46 | extern void __load_new_mm_context(struct mm_struct *); | 48 | extern void __load_new_mm_context(struct mm_struct *); |
47 | static inline void | 49 | static inline void |
48 | flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | 50 | flush_icache_user_range(struct vm_area_struct *vma, struct page *page, |
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 804e5311c841..058937bf5a77 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h | |||
@@ -449,10 +449,13 @@ | |||
449 | #define __NR_pwritev 491 | 449 | #define __NR_pwritev 491 |
450 | #define __NR_rt_tgsigqueueinfo 492 | 450 | #define __NR_rt_tgsigqueueinfo 492 |
451 | #define __NR_perf_event_open 493 | 451 | #define __NR_perf_event_open 493 |
452 | #define __NR_fanotify_init 494 | ||
453 | #define __NR_fanotify_mark 495 | ||
454 | #define __NR_prlimit64 496 | ||
452 | 455 | ||
453 | #ifdef __KERNEL__ | 456 | #ifdef __KERNEL__ |
454 | 457 | ||
455 | #define NR_SYSCALLS 494 | 458 | #define NR_SYSCALLS 497 |
456 | 459 | ||
457 | #define __ARCH_WANT_IPC_PARSE_VERSION | 460 | #define __ARCH_WANT_IPC_PARSE_VERSION |
458 | #define __ARCH_WANT_OLD_READDIR | 461 | #define __ARCH_WANT_OLD_READDIR |
@@ -463,6 +466,7 @@ | |||
463 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | 466 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT |
464 | #define __ARCH_WANT_SYS_OLDUMOUNT | 467 | #define __ARCH_WANT_SYS_OLDUMOUNT |
465 | #define __ARCH_WANT_SYS_SIGPENDING | 468 | #define __ARCH_WANT_SYS_SIGPENDING |
469 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
466 | 470 | ||
467 | /* "Conditional" syscalls. What we want is | 471 | /* "Conditional" syscalls. What we want is |
468 | 472 | ||
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index b45d913a51c3..ab1ee0ab082b 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S | |||
@@ -317,14 +317,14 @@ ret_from_sys_call: | |||
317 | ldq $0, SP_OFF($sp) | 317 | ldq $0, SP_OFF($sp) |
318 | and $0, 8, $0 | 318 | and $0, 8, $0 |
319 | beq $0, restore_all | 319 | beq $0, restore_all |
320 | ret_from_reschedule: | 320 | ret_to_user: |
321 | /* Make sure need_resched and sigpending don't change between | 321 | /* Make sure need_resched and sigpending don't change between |
322 | sampling and the rti. */ | 322 | sampling and the rti. */ |
323 | lda $16, 7 | 323 | lda $16, 7 |
324 | call_pal PAL_swpipl | 324 | call_pal PAL_swpipl |
325 | ldl $5, TI_FLAGS($8) | 325 | ldl $5, TI_FLAGS($8) |
326 | and $5, _TIF_WORK_MASK, $2 | 326 | and $5, _TIF_WORK_MASK, $2 |
327 | bne $5, work_pending | 327 | bne $2, work_pending |
328 | restore_all: | 328 | restore_all: |
329 | RESTORE_ALL | 329 | RESTORE_ALL |
330 | call_pal PAL_rti | 330 | call_pal PAL_rti |
@@ -363,7 +363,7 @@ $ret_success: | |||
363 | * $8: current. | 363 | * $8: current. |
364 | * $19: The old syscall number, or zero if this is not a return | 364 | * $19: The old syscall number, or zero if this is not a return |
365 | * from a syscall that errored and is possibly restartable. | 365 | * from a syscall that errored and is possibly restartable. |
366 | * $20: Error indication. | 366 | * $20: The old a3 value |
367 | */ | 367 | */ |
368 | 368 | ||
369 | .align 4 | 369 | .align 4 |
@@ -392,12 +392,18 @@ $work_resched: | |||
392 | 392 | ||
393 | $work_notifysig: | 393 | $work_notifysig: |
394 | mov $sp, $16 | 394 | mov $sp, $16 |
395 | br $1, do_switch_stack | 395 | bsr $1, do_switch_stack |
396 | mov $sp, $17 | 396 | mov $sp, $17 |
397 | mov $5, $18 | 397 | mov $5, $18 |
398 | mov $19, $9 /* save old syscall number */ | ||
399 | mov $20, $10 /* save old a3 */ | ||
400 | and $5, _TIF_SIGPENDING, $2 | ||
401 | cmovne $2, 0, $9 /* we don't want double syscall restarts */ | ||
398 | jsr $26, do_notify_resume | 402 | jsr $26, do_notify_resume |
403 | mov $9, $19 | ||
404 | mov $10, $20 | ||
399 | bsr $1, undo_switch_stack | 405 | bsr $1, undo_switch_stack |
400 | br restore_all | 406 | br ret_to_user |
401 | .end work_pending | 407 | .end work_pending |
402 | 408 | ||
403 | /* | 409 | /* |
@@ -430,6 +436,7 @@ strace: | |||
430 | beq $1, 1f | 436 | beq $1, 1f |
431 | ldq $27, 0($2) | 437 | ldq $27, 0($2) |
432 | 1: jsr $26, ($27), sys_gettimeofday | 438 | 1: jsr $26, ($27), sys_gettimeofday |
439 | ret_from_straced: | ||
433 | ldgp $gp, 0($26) | 440 | ldgp $gp, 0($26) |
434 | 441 | ||
435 | /* check return.. */ | 442 | /* check return.. */ |
@@ -757,11 +764,15 @@ sys_vfork: | |||
757 | .ent sys_sigreturn | 764 | .ent sys_sigreturn |
758 | sys_sigreturn: | 765 | sys_sigreturn: |
759 | .prologue 0 | 766 | .prologue 0 |
767 | lda $9, ret_from_straced | ||
768 | cmpult $26, $9, $9 | ||
760 | mov $sp, $17 | 769 | mov $sp, $17 |
761 | lda $18, -SWITCH_STACK_SIZE($sp) | 770 | lda $18, -SWITCH_STACK_SIZE($sp) |
762 | lda $sp, -SWITCH_STACK_SIZE($sp) | 771 | lda $sp, -SWITCH_STACK_SIZE($sp) |
763 | jsr $26, do_sigreturn | 772 | jsr $26, do_sigreturn |
764 | br $1, undo_switch_stack | 773 | bne $9, 1f |
774 | jsr $26, syscall_trace | ||
775 | 1: br $1, undo_switch_stack | ||
765 | br ret_from_sys_call | 776 | br ret_from_sys_call |
766 | .end sys_sigreturn | 777 | .end sys_sigreturn |
767 | 778 | ||
@@ -770,47 +781,19 @@ sys_sigreturn: | |||
770 | .ent sys_rt_sigreturn | 781 | .ent sys_rt_sigreturn |
771 | sys_rt_sigreturn: | 782 | sys_rt_sigreturn: |
772 | .prologue 0 | 783 | .prologue 0 |
784 | lda $9, ret_from_straced | ||
785 | cmpult $26, $9, $9 | ||
773 | mov $sp, $17 | 786 | mov $sp, $17 |
774 | lda $18, -SWITCH_STACK_SIZE($sp) | 787 | lda $18, -SWITCH_STACK_SIZE($sp) |
775 | lda $sp, -SWITCH_STACK_SIZE($sp) | 788 | lda $sp, -SWITCH_STACK_SIZE($sp) |
776 | jsr $26, do_rt_sigreturn | 789 | jsr $26, do_rt_sigreturn |
777 | br $1, undo_switch_stack | 790 | bne $9, 1f |
791 | jsr $26, syscall_trace | ||
792 | 1: br $1, undo_switch_stack | ||
778 | br ret_from_sys_call | 793 | br ret_from_sys_call |
779 | .end sys_rt_sigreturn | 794 | .end sys_rt_sigreturn |
780 | 795 | ||
781 | .align 4 | 796 | .align 4 |
782 | .globl sys_sigsuspend | ||
783 | .ent sys_sigsuspend | ||
784 | sys_sigsuspend: | ||
785 | .prologue 0 | ||
786 | mov $sp, $17 | ||
787 | br $1, do_switch_stack | ||
788 | mov $sp, $18 | ||
789 | subq $sp, 16, $sp | ||
790 | stq $26, 0($sp) | ||
791 | jsr $26, do_sigsuspend | ||
792 | ldq $26, 0($sp) | ||
793 | lda $sp, SWITCH_STACK_SIZE+16($sp) | ||
794 | ret | ||
795 | .end sys_sigsuspend | ||
796 | |||
797 | .align 4 | ||
798 | .globl sys_rt_sigsuspend | ||
799 | .ent sys_rt_sigsuspend | ||
800 | sys_rt_sigsuspend: | ||
801 | .prologue 0 | ||
802 | mov $sp, $18 | ||
803 | br $1, do_switch_stack | ||
804 | mov $sp, $19 | ||
805 | subq $sp, 16, $sp | ||
806 | stq $26, 0($sp) | ||
807 | jsr $26, do_rt_sigsuspend | ||
808 | ldq $26, 0($sp) | ||
809 | lda $sp, SWITCH_STACK_SIZE+16($sp) | ||
810 | ret | ||
811 | .end sys_rt_sigsuspend | ||
812 | |||
813 | .align 4 | ||
814 | .globl sys_sethae | 797 | .globl sys_sethae |
815 | .ent sys_sethae | 798 | .ent sys_sethae |
816 | sys_sethae: | 799 | sys_sethae: |
diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c index 8ca6345bf131..253cf1a87481 100644 --- a/arch/alpha/kernel/err_ev6.c +++ b/arch/alpha/kernel/err_ev6.c | |||
@@ -90,11 +90,13 @@ static int | |||
90 | ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn, | 90 | ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn, |
91 | u64 c_stat, u64 c_sts, int print) | 91 | u64 c_stat, u64 c_sts, int print) |
92 | { | 92 | { |
93 | char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN", | 93 | static const char * const sourcename[] = { |
94 | "MEMORY", "BCACHE", "DCACHE", | 94 | "UNKNOWN", "UNKNOWN", "UNKNOWN", |
95 | "BCACHE PROBE", "BCACHE PROBE" }; | 95 | "MEMORY", "BCACHE", "DCACHE", |
96 | char *streamname[] = { "D", "I" }; | 96 | "BCACHE PROBE", "BCACHE PROBE" |
97 | char *bitsname[] = { "SINGLE", "DOUBLE" }; | 97 | }; |
98 | static const char * const streamname[] = { "D", "I" }; | ||
99 | static const char * const bitsname[] = { "SINGLE", "DOUBLE" }; | ||
98 | int status = MCHK_DISPOSITION_REPORT; | 100 | int status = MCHK_DISPOSITION_REPORT; |
99 | int source = -1, stream = -1, bits = -1; | 101 | int source = -1, stream = -1, bits = -1; |
100 | 102 | ||
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index 5c905aaaeccd..648ae88aeb8a 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c | |||
@@ -589,22 +589,23 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt) | |||
589 | static void | 589 | static void |
590 | marvel_print_pox_trans_sum(u64 trans_sum) | 590 | marvel_print_pox_trans_sum(u64 trans_sum) |
591 | { | 591 | { |
592 | char *pcix_cmd[] = { "Interrupt Acknowledge", | 592 | static const char * const pcix_cmd[] = { |
593 | "Special Cycle", | 593 | "Interrupt Acknowledge", |
594 | "I/O Read", | 594 | "Special Cycle", |
595 | "I/O Write", | 595 | "I/O Read", |
596 | "Reserved", | 596 | "I/O Write", |
597 | "Reserved / Device ID Message", | 597 | "Reserved", |
598 | "Memory Read", | 598 | "Reserved / Device ID Message", |
599 | "Memory Write", | 599 | "Memory Read", |
600 | "Reserved / Alias to Memory Read Block", | 600 | "Memory Write", |
601 | "Reserved / Alias to Memory Write Block", | 601 | "Reserved / Alias to Memory Read Block", |
602 | "Configuration Read", | 602 | "Reserved / Alias to Memory Write Block", |
603 | "Configuration Write", | 603 | "Configuration Read", |
604 | "Memory Read Multiple / Split Completion", | 604 | "Configuration Write", |
605 | "Dual Address Cycle", | 605 | "Memory Read Multiple / Split Completion", |
606 | "Memory Read Line / Memory Read Block", | 606 | "Dual Address Cycle", |
607 | "Memory Write and Invalidate / Memory Write Block" | 607 | "Memory Read Line / Memory Read Block", |
608 | "Memory Write and Invalidate / Memory Write Block" | ||
608 | }; | 609 | }; |
609 | 610 | ||
610 | #define IO7__POX_TRANSUM__PCI_ADDR__S (0) | 611 | #define IO7__POX_TRANSUM__PCI_ADDR__S (0) |
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index f7ed97ce0dfd..c3b3781a03de 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c | |||
@@ -75,8 +75,12 @@ titan_parse_p_serror(int which, u64 serror, int print) | |||
75 | int status = MCHK_DISPOSITION_REPORT; | 75 | int status = MCHK_DISPOSITION_REPORT; |
76 | 76 | ||
77 | #ifdef CONFIG_VERBOSE_MCHECK | 77 | #ifdef CONFIG_VERBOSE_MCHECK |
78 | char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"}; | 78 | static const char * const serror_src[] = { |
79 | char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"}; | 79 | "GPCI", "APCI", "AGP HP", "AGP LP" |
80 | }; | ||
81 | static const char * const serror_cmd[] = { | ||
82 | "DMA Read", "DMA RMW", "SGTE Read", "Reserved" | ||
83 | }; | ||
80 | #endif /* CONFIG_VERBOSE_MCHECK */ | 84 | #endif /* CONFIG_VERBOSE_MCHECK */ |
81 | 85 | ||
82 | #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0) | 86 | #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0) |
@@ -140,14 +144,15 @@ titan_parse_p_perror(int which, int port, u64 perror, int print) | |||
140 | int status = MCHK_DISPOSITION_REPORT; | 144 | int status = MCHK_DISPOSITION_REPORT; |
141 | 145 | ||
142 | #ifdef CONFIG_VERBOSE_MCHECK | 146 | #ifdef CONFIG_VERBOSE_MCHECK |
143 | char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle", | 147 | static const char * const perror_cmd[] = { |
144 | "I/O Read", "I/O Write", | 148 | "Interrupt Acknowledge", "Special Cycle", |
145 | "Reserved", "Reserved", | 149 | "I/O Read", "I/O Write", |
146 | "Memory Read", "Memory Write", | 150 | "Reserved", "Reserved", |
147 | "Reserved", "Reserved", | 151 | "Memory Read", "Memory Write", |
148 | "Configuration Read", "Configuration Write", | 152 | "Reserved", "Reserved", |
149 | "Memory Read Multiple", "Dual Address Cycle", | 153 | "Configuration Read", "Configuration Write", |
150 | "Memory Read Line","Memory Write and Invalidate" | 154 | "Memory Read Multiple", "Dual Address Cycle", |
155 | "Memory Read Line", "Memory Write and Invalidate" | ||
151 | }; | 156 | }; |
152 | #endif /* CONFIG_VERBOSE_MCHECK */ | 157 | #endif /* CONFIG_VERBOSE_MCHECK */ |
153 | 158 | ||
@@ -273,11 +278,11 @@ titan_parse_p_agperror(int which, u64 agperror, int print) | |||
273 | int cmd, len; | 278 | int cmd, len; |
274 | unsigned long addr; | 279 | unsigned long addr; |
275 | 280 | ||
276 | char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)", | 281 | static const char * const agperror_cmd[] = { |
277 | "Write (low-priority)", | 282 | "Read (low-priority)", "Read (high-priority)", |
278 | "Write (high-priority)", | 283 | "Write (low-priority)", "Write (high-priority)", |
279 | "Reserved", "Reserved", | 284 | "Reserved", "Reserved", |
280 | "Flush", "Fence" | 285 | "Flush", "Fence" |
281 | }; | 286 | }; |
282 | #endif /* CONFIG_VERBOSE_MCHECK */ | 287 | #endif /* CONFIG_VERBOSE_MCHECK */ |
283 | 288 | ||
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 5d1e6d6ce684..547e8b84b2f7 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/smp_lock.h> | ||
19 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
20 | #include <linux/syscalls.h> | 19 | #include <linux/syscalls.h> |
21 | #include <linux/unistd.h> | 20 | #include <linux/unistd.h> |
@@ -69,7 +68,6 @@ SYSCALL_DEFINE4(osf_set_program_attributes, unsigned long, text_start, | |||
69 | { | 68 | { |
70 | struct mm_struct *mm; | 69 | struct mm_struct *mm; |
71 | 70 | ||
72 | lock_kernel(); | ||
73 | mm = current->mm; | 71 | mm = current->mm; |
74 | mm->end_code = bss_start + bss_len; | 72 | mm->end_code = bss_start + bss_len; |
75 | mm->start_brk = bss_start + bss_len; | 73 | mm->start_brk = bss_start + bss_len; |
@@ -78,7 +76,6 @@ SYSCALL_DEFINE4(osf_set_program_attributes, unsigned long, text_start, | |||
78 | printk("set_program_attributes(%lx %lx %lx %lx)\n", | 76 | printk("set_program_attributes(%lx %lx %lx %lx)\n", |
79 | text_start, text_len, bss_start, bss_len); | 77 | text_start, text_len, bss_start, bss_len); |
80 | #endif | 78 | #endif |
81 | unlock_kernel(); | ||
82 | return 0; | 79 | return 0; |
83 | } | 80 | } |
84 | 81 | ||
@@ -517,7 +514,6 @@ SYSCALL_DEFINE2(osf_proplist_syscall, enum pl_code, code, | |||
517 | long error; | 514 | long error; |
518 | int __user *min_buf_size_ptr; | 515 | int __user *min_buf_size_ptr; |
519 | 516 | ||
520 | lock_kernel(); | ||
521 | switch (code) { | 517 | switch (code) { |
522 | case PL_SET: | 518 | case PL_SET: |
523 | if (get_user(error, &args->set.nbytes)) | 519 | if (get_user(error, &args->set.nbytes)) |
@@ -547,7 +543,6 @@ SYSCALL_DEFINE2(osf_proplist_syscall, enum pl_code, code, | |||
547 | error = -EOPNOTSUPP; | 543 | error = -EOPNOTSUPP; |
548 | break; | 544 | break; |
549 | }; | 545 | }; |
550 | unlock_kernel(); | ||
551 | return error; | 546 | return error; |
552 | } | 547 | } |
553 | 548 | ||
@@ -594,7 +589,7 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss, | |||
594 | 589 | ||
595 | SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) | 590 | SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) |
596 | { | 591 | { |
597 | char *sysinfo_table[] = { | 592 | const char *sysinfo_table[] = { |
598 | utsname()->sysname, | 593 | utsname()->sysname, |
599 | utsname()->nodename, | 594 | utsname()->nodename, |
600 | utsname()->release, | 595 | utsname()->release, |
@@ -606,7 +601,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) | |||
606 | "dummy", /* secure RPC domain */ | 601 | "dummy", /* secure RPC domain */ |
607 | }; | 602 | }; |
608 | unsigned long offset; | 603 | unsigned long offset; |
609 | char *res; | 604 | const char *res; |
610 | long len, err = -EINVAL; | 605 | long len, err = -EINVAL; |
611 | 606 | ||
612 | offset = command-1; | 607 | offset = command-1; |
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c index 738fc824e2ea..b899e95f79fd 100644 --- a/arch/alpha/kernel/pci-sysfs.c +++ b/arch/alpha/kernel/pci-sysfs.c | |||
@@ -66,7 +66,7 @@ static int pci_mmap_resource(struct kobject *kobj, | |||
66 | { | 66 | { |
67 | struct pci_dev *pdev = to_pci_dev(container_of(kobj, | 67 | struct pci_dev *pdev = to_pci_dev(container_of(kobj, |
68 | struct device, kobj)); | 68 | struct device, kobj)); |
69 | struct resource *res = (struct resource *)attr->private; | 69 | struct resource *res = attr->private; |
70 | enum pci_mmap_state mmap_type; | 70 | enum pci_mmap_state mmap_type; |
71 | struct pci_bus_region bar; | 71 | struct pci_bus_region bar; |
72 | int i; | 72 | int i; |
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 0932dbb1ef8e..0f6b51ae865a 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
@@ -144,8 +144,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act, | |||
144 | /* | 144 | /* |
145 | * Atomically swap in the new signal mask, and wait for a signal. | 145 | * Atomically swap in the new signal mask, and wait for a signal. |
146 | */ | 146 | */ |
147 | asmlinkage int | 147 | SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) |
148 | do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw) | ||
149 | { | 148 | { |
150 | mask &= _BLOCKABLE; | 149 | mask &= _BLOCKABLE; |
151 | spin_lock_irq(¤t->sighand->siglock); | 150 | spin_lock_irq(¤t->sighand->siglock); |
@@ -154,41 +153,6 @@ do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw) | |||
154 | recalc_sigpending(); | 153 | recalc_sigpending(); |
155 | spin_unlock_irq(¤t->sighand->siglock); | 154 | spin_unlock_irq(¤t->sighand->siglock); |
156 | 155 | ||
157 | /* Indicate EINTR on return from any possible signal handler, | ||
158 | which will not come back through here, but via sigreturn. */ | ||
159 | regs->r0 = EINTR; | ||
160 | regs->r19 = 1; | ||
161 | |||
162 | current->state = TASK_INTERRUPTIBLE; | ||
163 | schedule(); | ||
164 | set_thread_flag(TIF_RESTORE_SIGMASK); | ||
165 | return -ERESTARTNOHAND; | ||
166 | } | ||
167 | |||
168 | asmlinkage int | ||
169 | do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize, | ||
170 | struct pt_regs *regs, struct switch_stack *sw) | ||
171 | { | ||
172 | sigset_t set; | ||
173 | |||
174 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
175 | if (sigsetsize != sizeof(sigset_t)) | ||
176 | return -EINVAL; | ||
177 | if (copy_from_user(&set, uset, sizeof(set))) | ||
178 | return -EFAULT; | ||
179 | |||
180 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
181 | spin_lock_irq(¤t->sighand->siglock); | ||
182 | current->saved_sigmask = current->blocked; | ||
183 | current->blocked = set; | ||
184 | recalc_sigpending(); | ||
185 | spin_unlock_irq(¤t->sighand->siglock); | ||
186 | |||
187 | /* Indicate EINTR on return from any possible signal handler, | ||
188 | which will not come back through here, but via sigreturn. */ | ||
189 | regs->r0 = EINTR; | ||
190 | regs->r19 = 1; | ||
191 | |||
192 | current->state = TASK_INTERRUPTIBLE; | 156 | current->state = TASK_INTERRUPTIBLE; |
193 | schedule(); | 157 | schedule(); |
194 | set_thread_flag(TIF_RESTORE_SIGMASK); | 158 | set_thread_flag(TIF_RESTORE_SIGMASK); |
@@ -239,6 +203,8 @@ restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | |||
239 | unsigned long usp; | 203 | unsigned long usp; |
240 | long i, err = __get_user(regs->pc, &sc->sc_pc); | 204 | long i, err = __get_user(regs->pc, &sc->sc_pc); |
241 | 205 | ||
206 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
207 | |||
242 | sw->r26 = (unsigned long) ret_from_sys_call; | 208 | sw->r26 = (unsigned long) ret_from_sys_call; |
243 | 209 | ||
244 | err |= __get_user(regs->r0, sc->sc_regs+0); | 210 | err |= __get_user(regs->r0, sc->sc_regs+0); |
@@ -591,7 +557,6 @@ syscall_restart(unsigned long r0, unsigned long r19, | |||
591 | regs->pc -= 4; | 557 | regs->pc -= 4; |
592 | break; | 558 | break; |
593 | case ERESTART_RESTARTBLOCK: | 559 | case ERESTART_RESTARTBLOCK: |
594 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
595 | regs->r0 = EINTR; | 560 | regs->r0 = EINTR; |
596 | break; | 561 | break; |
597 | } | 562 | } |
diff --git a/arch/alpha/kernel/srm_env.c b/arch/alpha/kernel/srm_env.c index 4afc1a1e2e5a..f0df3fbd8402 100644 --- a/arch/alpha/kernel/srm_env.c +++ b/arch/alpha/kernel/srm_env.c | |||
@@ -87,7 +87,7 @@ static int srm_env_proc_show(struct seq_file *m, void *v) | |||
87 | srm_env_t *entry; | 87 | srm_env_t *entry; |
88 | char *page; | 88 | char *page; |
89 | 89 | ||
90 | entry = (srm_env_t *)m->private; | 90 | entry = m->private; |
91 | page = (char *)__get_free_page(GFP_USER); | 91 | page = (char *)__get_free_page(GFP_USER); |
92 | if (!page) | 92 | if (!page) |
93 | return -ENOMEM; | 93 | return -ENOMEM; |
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index 09acb786e72b..ce594ef533cc 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S | |||
@@ -512,6 +512,9 @@ sys_call_table: | |||
512 | .quad sys_pwritev | 512 | .quad sys_pwritev |
513 | .quad sys_rt_tgsigqueueinfo | 513 | .quad sys_rt_tgsigqueueinfo |
514 | .quad sys_perf_event_open | 514 | .quad sys_perf_event_open |
515 | .quad sys_fanotify_init | ||
516 | .quad sys_fanotify_mark /* 495 */ | ||
517 | .quad sys_prlimit64 | ||
515 | 518 | ||
516 | .size sys_call_table, . - sys_call_table | 519 | .size sys_call_table, . - sys_call_table |
517 | .type sys_call_table, @object | 520 | .type sys_call_table, @object |
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index eacceb26d9c8..396af1799ea4 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -191,16 +191,16 @@ irqreturn_t timer_interrupt(int irq, void *dev) | |||
191 | 191 | ||
192 | write_sequnlock(&xtime_lock); | 192 | write_sequnlock(&xtime_lock); |
193 | 193 | ||
194 | #ifndef CONFIG_SMP | ||
195 | while (nticks--) | ||
196 | update_process_times(user_mode(get_irq_regs())); | ||
197 | #endif | ||
198 | |||
199 | if (test_perf_event_pending()) { | 194 | if (test_perf_event_pending()) { |
200 | clear_perf_event_pending(); | 195 | clear_perf_event_pending(); |
201 | perf_event_do_pending(); | 196 | perf_event_do_pending(); |
202 | } | 197 | } |
203 | 198 | ||
199 | #ifndef CONFIG_SMP | ||
200 | while (nticks--) | ||
201 | update_process_times(user_mode(get_irq_regs())); | ||
202 | #endif | ||
203 | |||
204 | return IRQ_HANDLED; | 204 | return IRQ_HANDLED; |
205 | } | 205 | } |
206 | 206 | ||
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index b14f015008ad..0414e021a91c 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/smp_lock.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/kallsyms.h> | 18 | #include <linux/kallsyms.h> |
@@ -623,7 +622,6 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg, | |||
623 | return; | 622 | return; |
624 | } | 623 | } |
625 | 624 | ||
626 | lock_kernel(); | ||
627 | printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n", | 625 | printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n", |
628 | pc, va, opcode, reg); | 626 | pc, va, opcode, reg); |
629 | do_exit(SIGSEGV); | 627 | do_exit(SIGSEGV); |
@@ -646,7 +644,6 @@ got_exception: | |||
646 | * Yikes! No one to forward the exception to. | 644 | * Yikes! No one to forward the exception to. |
647 | * Since the registers are in a weird format, dump them ourselves. | 645 | * Since the registers are in a weird format, dump them ourselves. |
648 | */ | 646 | */ |
649 | lock_kernel(); | ||
650 | 647 | ||
651 | printk("%s(%d): unhandled unaligned exception\n", | 648 | printk("%s(%d): unhandled unaligned exception\n", |
652 | current->comm, task_pid_nr(current)); | 649 | current->comm, task_pid_nr(current)); |