Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+88 -131
+2
arch/alpha/include/asm/cacheflush.h
··· 43 43 /* ??? Ought to use this in arch/alpha/kernel/signal.c too. */ 44 44 45 45 #ifndef CONFIG_SMP 46 + #include <linux/sched.h> 47 + 46 48 extern void __load_new_mm_context(struct mm_struct *); 47 49 static inline void 48 50 flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
+5 -1
arch/alpha/include/asm/unistd.h
··· 449 449 #define __NR_pwritev 491 450 450 #define __NR_rt_tgsigqueueinfo 492 451 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 456 #ifdef __KERNEL__ 454 457 455 - #define NR_SYSCALLS 494 458 + #define NR_SYSCALLS 497 456 459 457 460 #define __ARCH_WANT_IPC_PARSE_VERSION 458 461 #define __ARCH_WANT_OLD_READDIR ··· 466 463 #define __ARCH_WANT_SYS_OLD_GETRLIMIT 467 464 #define __ARCH_WANT_SYS_OLDUMOUNT 468 465 #define __ARCH_WANT_SYS_SIGPENDING 466 + #define __ARCH_WANT_SYS_RT_SIGSUSPEND 469 467 470 468 /* "Conditional" syscalls. What we want is 471 469
+22 -39
arch/alpha/kernel/entry.S
··· 317 317 ldq $0, SP_OFF($sp) 318 318 and $0, 8, $0 319 319 beq $0, restore_all 320 - ret_from_reschedule: 320 + ret_to_user: 321 321 /* Make sure need_resched and sigpending don't change between 322 322 sampling and the rti. */ 323 323 lda $16, 7 324 324 call_pal PAL_swpipl 325 325 ldl $5, TI_FLAGS($8) 326 326 and $5, _TIF_WORK_MASK, $2 327 - bne $5, work_pending 327 + bne $2, work_pending 328 328 restore_all: 329 329 RESTORE_ALL 330 330 call_pal PAL_rti ··· 363 363 * $8: current. 364 364 * $19: The old syscall number, or zero if this is not a return 365 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 369 .align 4 ··· 392 392 393 393 $work_notifysig: 394 394 mov $sp, $16 395 - br $1, do_switch_stack 395 + bsr $1, do_switch_stack 396 396 mov $sp, $17 397 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 402 jsr $26, do_notify_resume 403 + mov $9, $19 404 + mov $10, $20 399 405 bsr $1, undo_switch_stack 400 - br restore_all 406 + br ret_to_user 401 407 .end work_pending 402 408 403 409 /* ··· 436 430 beq $1, 1f 437 431 ldq $27, 0($2) 438 432 1: jsr $26, ($27), sys_gettimeofday 433 + ret_from_straced: 439 434 ldgp $gp, 0($26) 440 435 441 436 /* check return.. */ ··· 764 757 .ent sys_sigreturn 765 758 sys_sigreturn: 766 759 .prologue 0 760 + lda $9, ret_from_straced 761 + cmpult $26, $9, $9 767 762 mov $sp, $17 768 763 lda $18, -SWITCH_STACK_SIZE($sp) 769 764 lda $sp, -SWITCH_STACK_SIZE($sp) 770 765 jsr $26, do_sigreturn 771 - br $1, undo_switch_stack 766 + bne $9, 1f 767 + jsr $26, syscall_trace 768 + 1: br $1, undo_switch_stack 772 769 br ret_from_sys_call 773 770 .end sys_sigreturn 774 771 ··· 781 770 .ent sys_rt_sigreturn 782 771 sys_rt_sigreturn: 783 772 .prologue 0 773 + lda $9, ret_from_straced 774 + cmpult $26, $9, $9 784 775 mov $sp, $17 785 776 lda $18, -SWITCH_STACK_SIZE($sp) 786 777 lda $sp, -SWITCH_STACK_SIZE($sp) 787 778 jsr $26, do_rt_sigreturn 788 - br $1, undo_switch_stack 779 + bne $9, 1f 780 + jsr $26, syscall_trace 781 + 1: br $1, undo_switch_stack 789 782 br ret_from_sys_call 790 783 .end sys_rt_sigreturn 791 - 792 - .align 4 793 - .globl sys_sigsuspend 794 - .ent sys_sigsuspend 795 - sys_sigsuspend: 796 - .prologue 0 797 - mov $sp, $17 798 - br $1, do_switch_stack 799 - mov $sp, $18 800 - subq $sp, 16, $sp 801 - stq $26, 0($sp) 802 - jsr $26, do_sigsuspend 803 - ldq $26, 0($sp) 804 - lda $sp, SWITCH_STACK_SIZE+16($sp) 805 - ret 806 - .end sys_sigsuspend 807 - 808 - .align 4 809 - .globl sys_rt_sigsuspend 810 - .ent sys_rt_sigsuspend 811 - sys_rt_sigsuspend: 812 - .prologue 0 813 - mov $sp, $18 814 - br $1, do_switch_stack 815 - mov $sp, $19 816 - subq $sp, 16, $sp 817 - stq $26, 0($sp) 818 - jsr $26, do_rt_sigsuspend 819 - ldq $26, 0($sp) 820 - lda $sp, SWITCH_STACK_SIZE+16($sp) 821 - ret 822 - .end sys_rt_sigsuspend 823 784 824 785 .align 4 825 786 .globl sys_sethae
+7 -5
arch/alpha/kernel/err_ev6.c
··· 90 90 ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn, 91 91 u64 c_stat, u64 c_sts, int print) 92 92 { 93 - char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN", 94 - "MEMORY", "BCACHE", "DCACHE", 95 - "BCACHE PROBE", "BCACHE PROBE" }; 96 - char *streamname[] = { "D", "I" }; 97 - char *bitsname[] = { "SINGLE", "DOUBLE" }; 93 + static const char * const sourcename[] = { 94 + "UNKNOWN", "UNKNOWN", "UNKNOWN", 95 + "MEMORY", "BCACHE", "DCACHE", 96 + "BCACHE PROBE", "BCACHE PROBE" 97 + }; 98 + static const char * const streamname[] = { "D", "I" }; 99 + static const char * const bitsname[] = { "SINGLE", "DOUBLE" }; 98 100 int status = MCHK_DISPOSITION_REPORT; 99 101 int source = -1, stream = -1, bits = -1; 100 102
+17 -16
arch/alpha/kernel/err_marvel.c
··· 589 589 static void 590 590 marvel_print_pox_trans_sum(u64 trans_sum) 591 591 { 592 - char *pcix_cmd[] = { "Interrupt Acknowledge", 593 - "Special Cycle", 594 - "I/O Read", 595 - "I/O Write", 596 - "Reserved", 597 - "Reserved / Device ID Message", 598 - "Memory Read", 599 - "Memory Write", 600 - "Reserved / Alias to Memory Read Block", 601 - "Reserved / Alias to Memory Write Block", 602 - "Configuration Read", 603 - "Configuration Write", 604 - "Memory Read Multiple / Split Completion", 605 - "Dual Address Cycle", 606 - "Memory Read Line / Memory Read Block", 607 - "Memory Write and Invalidate / Memory Write Block" 592 + static const char * const pcix_cmd[] = { 593 + "Interrupt Acknowledge", 594 + "Special Cycle", 595 + "I/O Read", 596 + "I/O Write", 597 + "Reserved", 598 + "Reserved / Device ID Message", 599 + "Memory Read", 600 + "Memory Write", 601 + "Reserved / Alias to Memory Read Block", 602 + "Reserved / Alias to Memory Write Block", 603 + "Configuration Read", 604 + "Configuration Write", 605 + "Memory Read Multiple / Split Completion", 606 + "Dual Address Cycle", 607 + "Memory Read Line / Memory Read Block", 608 + "Memory Write and Invalidate / Memory Write Block" 608 609 }; 609 610 610 611 #define IO7__POX_TRANSUM__PCI_ADDR__S (0)
+20 -15
arch/alpha/kernel/err_titan.c
··· 75 75 int status = MCHK_DISPOSITION_REPORT; 76 76 77 77 #ifdef CONFIG_VERBOSE_MCHECK 78 - char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"}; 79 - char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"}; 78 + static const char * const serror_src[] = { 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 84 #endif /* CONFIG_VERBOSE_MCHECK */ 81 85 82 86 #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0) ··· 144 140 int status = MCHK_DISPOSITION_REPORT; 145 141 146 142 #ifdef CONFIG_VERBOSE_MCHECK 147 - char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle", 148 - "I/O Read", "I/O Write", 149 - "Reserved", "Reserved", 150 - "Memory Read", "Memory Write", 151 - "Reserved", "Reserved", 152 - "Configuration Read", "Configuration Write", 153 - "Memory Read Multiple", "Dual Address Cycle", 154 - "Memory Read Line","Memory Write and Invalidate" 143 + static const char * const perror_cmd[] = { 144 + "Interrupt Acknowledge", "Special Cycle", 145 + "I/O Read", "I/O Write", 146 + "Reserved", "Reserved", 147 + "Memory Read", "Memory Write", 148 + "Reserved", "Reserved", 149 + "Configuration Read", "Configuration Write", 150 + "Memory Read Multiple", "Dual Address Cycle", 151 + "Memory Read Line", "Memory Write and Invalidate" 155 152 }; 156 153 #endif /* CONFIG_VERBOSE_MCHECK */ 157 154 ··· 278 273 int cmd, len; 279 274 unsigned long addr; 280 275 281 - char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)", 282 - "Write (low-priority)", 283 - "Write (high-priority)", 284 - "Reserved", "Reserved", 285 - "Flush", "Fence" 276 + static const char * const agperror_cmd[] = { 277 + "Read (low-priority)", "Read (high-priority)", 278 + "Write (low-priority)", "Write (high-priority)", 279 + "Reserved", "Reserved", 280 + "Flush", "Fence" 286 281 }; 287 282 #endif /* CONFIG_VERBOSE_MCHECK */ 288 283
+2 -7
arch/alpha/kernel/osf_sys.c
··· 15 15 #include <linux/kernel.h> 16 16 #include <linux/mm.h> 17 17 #include <linux/smp.h> 18 - #include <linux/smp_lock.h> 19 18 #include <linux/stddef.h> 20 19 #include <linux/syscalls.h> 21 20 #include <linux/unistd.h> ··· 68 69 { 69 70 struct mm_struct *mm; 70 71 71 - lock_kernel(); 72 72 mm = current->mm; 73 73 mm->end_code = bss_start + bss_len; 74 74 mm->start_brk = bss_start + bss_len; ··· 76 78 printk("set_program_attributes(%lx %lx %lx %lx)\n", 77 79 text_start, text_len, bss_start, bss_len); 78 80 #endif 79 - unlock_kernel(); 80 81 return 0; 81 82 } 82 83 ··· 514 517 long error; 515 518 int __user *min_buf_size_ptr; 516 519 517 - lock_kernel(); 518 520 switch (code) { 519 521 case PL_SET: 520 522 if (get_user(error, &args->set.nbytes)) ··· 543 547 error = -EOPNOTSUPP; 544 548 break; 545 549 }; 546 - unlock_kernel(); 547 550 return error; 548 551 } 549 552 ··· 589 594 590 595 SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) 591 596 { 592 - char *sysinfo_table[] = { 597 + const char *sysinfo_table[] = { 593 598 utsname()->sysname, 594 599 utsname()->nodename, 595 600 utsname()->release, ··· 601 606 "dummy", /* secure RPC domain */ 602 607 }; 603 608 unsigned long offset; 604 - char *res; 609 + const char *res; 605 610 long len, err = -EINVAL; 606 611 607 612 offset = command-1;
+1 -1
arch/alpha/kernel/pci-sysfs.c
··· 66 66 { 67 67 struct pci_dev *pdev = to_pci_dev(container_of(kobj, 68 68 struct device, kobj)); 69 - struct resource *res = (struct resource *)attr->private; 69 + struct resource *res = attr->private; 70 70 enum pci_mmap_state mmap_type; 71 71 struct pci_bus_region bar; 72 72 int i;
+3 -38
arch/alpha/kernel/signal.c
··· 144 144 /* 145 145 * Atomically swap in the new signal mask, and wait for a signal. 146 146 */ 147 - asmlinkage int 148 - do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw) 147 + SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) 149 148 { 150 149 mask &= _BLOCKABLE; 151 150 spin_lock_irq(&current->sighand->siglock); ··· 152 153 siginitset(&current->blocked, mask); 153 154 recalc_sigpending(); 154 155 spin_unlock_irq(&current->sighand->siglock); 155 - 156 - /* Indicate EINTR on return from any possible signal handler, 157 - which will not come back through here, but via sigreturn. */ 158 - regs->r0 = EINTR; 159 - regs->r19 = 1; 160 - 161 - current->state = TASK_INTERRUPTIBLE; 162 - schedule(); 163 - set_thread_flag(TIF_RESTORE_SIGMASK); 164 - return -ERESTARTNOHAND; 165 - } 166 - 167 - asmlinkage int 168 - do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize, 169 - struct pt_regs *regs, struct switch_stack *sw) 170 - { 171 - sigset_t set; 172 - 173 - /* XXX: Don't preclude handling different sized sigset_t's. */ 174 - if (sigsetsize != sizeof(sigset_t)) 175 - return -EINVAL; 176 - if (copy_from_user(&set, uset, sizeof(set))) 177 - return -EFAULT; 178 - 179 - sigdelsetmask(&set, ~_BLOCKABLE); 180 - spin_lock_irq(&current->sighand->siglock); 181 - current->saved_sigmask = current->blocked; 182 - current->blocked = set; 183 - recalc_sigpending(); 184 - spin_unlock_irq(&current->sighand->siglock); 185 - 186 - /* Indicate EINTR on return from any possible signal handler, 187 - which will not come back through here, but via sigreturn. */ 188 - regs->r0 = EINTR; 189 - regs->r19 = 1; 190 156 191 157 current->state = TASK_INTERRUPTIBLE; 192 158 schedule(); ··· 202 238 { 203 239 unsigned long usp; 204 240 long i, err = __get_user(regs->pc, &sc->sc_pc); 241 + 242 + current_thread_info()->restart_block.fn = do_no_restart_syscall; 205 243 206 244 sw->r26 = (unsigned long) ret_from_sys_call; 207 245 ··· 557 591 regs->pc -= 4; 558 592 break; 559 593 case ERESTART_RESTARTBLOCK: 560 - current_thread_info()->restart_block.fn = do_no_restart_syscall; 561 594 regs->r0 = EINTR; 562 595 break; 563 596 }
+1 -1
arch/alpha/kernel/srm_env.c
··· 87 87 srm_env_t *entry; 88 88 char *page; 89 89 90 - entry = (srm_env_t *)m->private; 90 + entry = m->private; 91 91 page = (char *)__get_free_page(GFP_USER); 92 92 if (!page) 93 93 return -ENOMEM;
+3
arch/alpha/kernel/systbls.S
··· 512 512 .quad sys_pwritev 513 513 .quad sys_rt_tgsigqueueinfo 514 514 .quad sys_perf_event_open 515 + .quad sys_fanotify_init 516 + .quad sys_fanotify_mark /* 495 */ 517 + .quad sys_prlimit64 515 518 516 519 .size sys_call_table, . - sys_call_table 517 520 .type sys_call_table, @object
+5 -5
arch/alpha/kernel/time.c
··· 191 191 192 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 194 if (test_perf_event_pending()) { 200 195 clear_perf_event_pending(); 201 196 perf_event_do_pending(); 202 197 } 198 + 199 + #ifndef CONFIG_SMP 200 + while (nticks--) 201 + update_process_times(user_mode(get_irq_regs())); 202 + #endif 203 203 204 204 return IRQ_HANDLED; 205 205 }
-3
arch/alpha/kernel/traps.c
··· 13 13 #include <linux/sched.h> 14 14 #include <linux/tty.h> 15 15 #include <linux/delay.h> 16 - #include <linux/smp_lock.h> 17 16 #include <linux/module.h> 18 17 #include <linux/init.h> 19 18 #include <linux/kallsyms.h> ··· 622 623 return; 623 624 } 624 625 625 - lock_kernel(); 626 626 printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n", 627 627 pc, va, opcode, reg); 628 628 do_exit(SIGSEGV); ··· 644 646 * Yikes! No one to forward the exception to. 645 647 * Since the registers are in a weird format, dump them ourselves. 646 648 */ 647 - lock_kernel(); 648 649 649 650 printk("%s(%d): unhandled unaligned exception\n", 650 651 current->comm, task_pid_nr(current));