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 git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc: Fix debugger syscall restart interactions.
sparc: Fix ptrace() detach.
sparc32: Don't twiddle PT_DTRACE in exec.
sparc video: remove open boot prom code

+150 -160
+2
arch/sparc/kernel/entry.S
··· 1306 1306 .align 4 1307 1307 .globl linux_sparc_syscall 1308 1308 linux_sparc_syscall: 1309 + sethi %hi(PSR_SYSCALL), %l4 1310 + or %l0, %l4, %l0 1309 1311 /* Direct access to user regs, must faster. */ 1310 1312 cmp %g1, NR_SYSCALLS 1311 1313 bgeu linux_sparc_ni_syscall
-5
arch/sparc/kernel/process.c
··· 638 638 (char __user * __user *)regs->u_regs[base + UREG_I2], 639 639 regs); 640 640 putname(filename); 641 - if (error == 0) { 642 - task_lock(current); 643 - current->ptrace &= ~PT_DTRACE; 644 - task_unlock(current); 645 - } 646 641 out: 647 642 return error; 648 643 }
+4 -2
arch/sparc/kernel/ptrace.c
··· 170 170 switch (pos) { 171 171 case 32: /* PSR */ 172 172 psr = regs->psr; 173 - psr &= ~PSR_ICC; 174 - psr |= (reg & PSR_ICC); 173 + psr &= ~(PSR_ICC | PSR_SYSCALL); 174 + psr |= (reg & (PSR_ICC | PSR_SYSCALL)); 175 175 regs->psr = psr; 176 176 break; 177 177 case 33: /* PC */ ··· 441 441 break; 442 442 443 443 default: 444 + if (request == PTRACE_SPARC_DETACH) 445 + request = PTRACE_DETACH; 444 446 ret = ptrace_request(child, request, addr, data); 445 447 break; 446 448 }
+8 -3
arch/sparc/kernel/rtrap.S
··· 50 50 ret_trap_entry: 51 51 ret_trap_lockless_ipi: 52 52 andcc %t_psr, PSR_PS, %g0 53 + sethi %hi(PSR_SYSCALL), %g1 53 54 be 1f 54 - nop 55 + andn %t_psr, %g1, %t_psr 55 56 56 57 wr %t_psr, 0x0, %psr 57 58 b ret_trap_kernel ··· 74 73 ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr 75 74 76 75 mov %l5, %o1 77 - mov %l6, %o2 78 76 call do_signal 79 77 add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr 80 78 ··· 81 81 ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr 82 82 clr %l6 83 83 ret_trap_continue: 84 + sethi %hi(PSR_SYSCALL), %g1 85 + andn %t_psr, %g1, %t_psr 84 86 wr %t_psr, 0x0, %psr 85 87 WRITE_PAUSE 86 88 ··· 139 137 LOAD_PT_PRIV(sp, t_psr, t_pc, t_npc) 140 138 or %t_pc, %t_npc, %g2 141 139 andcc %g2, 0x3, %g0 140 + sethi %hi(PSR_SYCALL), %g2 142 141 be 1f 143 - nop 142 + andn %t_psr, %g2, %t_psr 144 143 145 144 b ret_trap_unaligned_pc 146 145 add %sp, STACKFRAME_SZ, %o0 ··· 204 201 1: 205 202 LOAD_PT_ALL(sp, t_psr, t_pc, t_npc, g1) 206 203 2: 204 + sethi %hi(PSR_SYSCALL), %twin_tmp1 205 + andn %t_psr, %twin_tmp1, %t_psr 207 206 wr %t_psr, 0x0, %psr 208 207 WRITE_PAUSE 209 208
+28 -36
arch/sparc/kernel/signal.c
··· 145 145 regs->psr = (up_psr & ~(PSR_ICC | PSR_EF)) 146 146 | (regs->psr & (PSR_ICC | PSR_EF)); 147 147 148 + /* Prevent syscall restart. */ 149 + pt_regs_clear_syscall(regs); 150 + 148 151 err |= __get_user(fpu_save, &sf->fpu_save); 149 152 150 153 if (fpu_save) ··· 201 198 &sf->regs.u_regs[UREG_G1], 15 * sizeof(u32)); 202 199 203 200 regs->psr = (regs->psr & ~PSR_ICC) | (psr & PSR_ICC); 201 + 202 + /* Prevent syscall restart. */ 203 + pt_regs_clear_syscall(regs); 204 204 205 205 err |= __get_user(fpu_save, &sf->fpu_save); 206 206 ··· 513 507 * want to handle. Thus you cannot kill init even with a SIGKILL even by 514 508 * mistake. 515 509 */ 516 - asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0, int restart_syscall) 510 + asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) 517 511 { 518 - siginfo_t info; 519 - struct sparc_deliver_cookie cookie; 520 512 struct k_sigaction ka; 521 - int signr; 513 + int restart_syscall; 522 514 sigset_t *oldset; 515 + siginfo_t info; 516 + int signr; 523 517 524 - cookie.restart_syscall = restart_syscall; 525 - cookie.orig_i0 = orig_i0; 518 + if (pt_regs_is_syscall(regs) && (regs->psr & PSR_C)) 519 + restart_syscall = 1; 520 + else 521 + restart_syscall = 0; 526 522 527 523 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 528 524 oldset = &current->saved_sigmask; 529 525 else 530 526 oldset = &current->blocked; 531 527 532 - signr = get_signal_to_deliver(&info, &ka, regs, &cookie); 528 + signr = get_signal_to_deliver(&info, &ka, regs, NULL); 529 + 530 + /* If the debugger messes with the program counter, it clears 531 + * the software "in syscall" bit, directing us to not perform 532 + * a syscall restart. 533 + */ 534 + if (restart_syscall && !pt_regs_is_syscall(regs)) 535 + restart_syscall = 0; 536 + 533 537 if (signr > 0) { 534 - if (cookie.restart_syscall) 535 - syscall_restart(cookie.orig_i0, regs, &ka.sa); 538 + if (restart_syscall) 539 + syscall_restart(orig_i0, regs, &ka.sa); 536 540 handle_signal(signr, &ka, &info, oldset, regs); 537 541 538 542 /* a signal was successfully delivered; the saved ··· 554 538 clear_thread_flag(TIF_RESTORE_SIGMASK); 555 539 return; 556 540 } 557 - if (cookie.restart_syscall && 541 + if (restart_syscall && 558 542 (regs->u_regs[UREG_I0] == ERESTARTNOHAND || 559 543 regs->u_regs[UREG_I0] == ERESTARTSYS || 560 544 regs->u_regs[UREG_I0] == ERESTARTNOINTR)) { 561 545 /* replay the system call when we are done */ 562 - regs->u_regs[UREG_I0] = cookie.orig_i0; 546 + regs->u_regs[UREG_I0] = orig_i0; 563 547 regs->pc -= 4; 564 548 regs->npc -= 4; 565 549 } 566 - if (cookie.restart_syscall && 550 + if (restart_syscall && 567 551 regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) { 568 552 regs->u_regs[UREG_G1] = __NR_restart_syscall; 569 553 regs->pc -= 4; ··· 614 598 ret = 0; 615 599 out: 616 600 return ret; 617 - } 618 - 619 - void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) 620 - { 621 - struct sparc_deliver_cookie *cp = cookie; 622 - 623 - if (cp->restart_syscall && 624 - (regs->u_regs[UREG_I0] == ERESTARTNOHAND || 625 - regs->u_regs[UREG_I0] == ERESTARTSYS || 626 - regs->u_regs[UREG_I0] == ERESTARTNOINTR)) { 627 - /* replay the system call when we are done */ 628 - regs->u_regs[UREG_I0] = cp->orig_i0; 629 - regs->pc -= 4; 630 - regs->npc -= 4; 631 - cp->restart_syscall = 0; 632 - } 633 - 634 - if (cp->restart_syscall && 635 - regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) { 636 - regs->u_regs[UREG_G1] = __NR_restart_syscall; 637 - regs->pc -= 4; 638 - regs->npc -= 4; 639 - cp->restart_syscall = 0; 640 - } 641 601 }
+4 -3
arch/sparc64/kernel/etrap.S
··· 27 27 28 28 .text 29 29 .align 64 30 - .globl etrap, etrap_irq, etraptl1 30 + .globl etrap_syscall, etrap, etrap_irq, etraptl1 31 31 etrap: rdpr %pil, %g2 32 - etrap_irq: 33 - TRAP_LOAD_THREAD_REG(%g6, %g1) 32 + etrap_irq: clr %g3 33 + etrap_syscall: TRAP_LOAD_THREAD_REG(%g6, %g1) 34 34 rdpr %tstate, %g1 35 + or %g1, %g3, %g1 35 36 sllx %g2, 20, %g3 36 37 andcc %g1, TSTATE_PRIV, %g0 37 38 or %g1, %g3, %g1
+11 -5
arch/sparc64/kernel/ptrace.c
··· 287 287 32 * sizeof(u64), 288 288 33 * sizeof(u64)); 289 289 if (!ret) { 290 - /* Only the condition codes can be modified 291 - * in the %tstate register. 290 + /* Only the condition codes and the "in syscall" 291 + * state can be modified in the %tstate register. 292 292 */ 293 - tstate &= (TSTATE_ICC | TSTATE_XCC); 294 - regs->tstate &= ~(TSTATE_ICC | TSTATE_XCC); 293 + tstate &= (TSTATE_ICC | TSTATE_XCC | TSTATE_SYSCALL); 294 + regs->tstate &= ~(TSTATE_ICC | TSTATE_XCC | TSTATE_SYSCALL); 295 295 regs->tstate |= tstate; 296 296 } 297 297 } ··· 657 657 switch (pos) { 658 658 case 32: /* PSR */ 659 659 tstate = regs->tstate; 660 - tstate &= ~(TSTATE_ICC | TSTATE_XCC); 660 + tstate &= ~(TSTATE_ICC | TSTATE_XCC | TSTATE_SYSCALL); 661 661 tstate |= psr_to_tstate_icc(reg); 662 + if (reg & PSR_SYSCALL) 663 + tstate |= TSTATE_SYSCALL; 662 664 regs->tstate = tstate; 663 665 break; 664 666 case 33: /* PC */ ··· 946 944 break; 947 945 948 946 default: 947 + if (request == PTRACE_SPARC_DETACH) 948 + request = PTRACE_DETACH; 949 949 ret = compat_ptrace_request(child, request, addr, data); 950 950 break; 951 951 } ··· 1040 1036 break; 1041 1037 1042 1038 default: 1039 + if (request == PTRACE_SPARC_DETACH) 1040 + request = PTRACE_DETACH; 1043 1041 ret = ptrace_request(child, request, addr, data); 1044 1042 break; 1045 1043 }
+1
arch/sparc64/kernel/rtrap.S
··· 257 257 wr %o3, %g0, %y 258 258 wrpr %l4, 0x0, %pil 259 259 wrpr %g0, 0x1, %tl 260 + andn %l1, TSTATE_SYSCALL, %l1 260 261 wrpr %l1, %g0, %tstate 261 262 wrpr %l2, %g0, %tpc 262 263 wrpr %o2, %g0, %tnpc
+22 -38
arch/sparc64/kernel/signal.c
··· 333 333 regs->tnpc = tnpc; 334 334 335 335 /* Prevent syscall restart. */ 336 - pt_regs_clear_trap_type(regs); 336 + pt_regs_clear_syscall(regs); 337 337 338 338 sigdelsetmask(&set, ~_BLOCKABLE); 339 339 spin_lock_irq(&current->sighand->siglock); ··· 499 499 } 500 500 501 501 static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, 502 - struct sigaction *sa) 502 + struct sigaction *sa) 503 503 { 504 504 switch (regs->u_regs[UREG_I0]) { 505 505 case ERESTART_RESTARTBLOCK: ··· 525 525 */ 526 526 static void do_signal(struct pt_regs *regs, unsigned long orig_i0) 527 527 { 528 - struct signal_deliver_cookie cookie; 529 528 struct k_sigaction ka; 529 + int restart_syscall; 530 530 sigset_t *oldset; 531 531 siginfo_t info; 532 532 int signr; 533 533 534 534 if (pt_regs_is_syscall(regs) && 535 535 (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) { 536 - pt_regs_clear_trap_type(regs); 537 - cookie.restart_syscall = 1; 536 + restart_syscall = 1; 538 537 } else 539 - cookie.restart_syscall = 0; 540 - cookie.orig_i0 = orig_i0; 538 + restart_syscall = 0; 541 539 542 540 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 543 541 oldset = &current->saved_sigmask; ··· 545 547 #ifdef CONFIG_COMPAT 546 548 if (test_thread_flag(TIF_32BIT)) { 547 549 extern void do_signal32(sigset_t *, struct pt_regs *, 548 - struct signal_deliver_cookie *); 549 - do_signal32(oldset, regs, &cookie); 550 + int restart_syscall, 551 + unsigned long orig_i0); 552 + do_signal32(oldset, regs, restart_syscall, orig_i0); 550 553 return; 551 554 } 552 555 #endif 553 556 554 - signr = get_signal_to_deliver(&info, &ka, regs, &cookie); 557 + signr = get_signal_to_deliver(&info, &ka, regs, NULL); 558 + 559 + /* If the debugger messes with the program counter, it clears 560 + * the software "in syscall" bit, directing us to not perform 561 + * a syscall restart. 562 + */ 563 + if (restart_syscall && !pt_regs_is_syscall(regs)) 564 + restart_syscall = 0; 565 + 555 566 if (signr > 0) { 556 - if (cookie.restart_syscall) 557 - syscall_restart(cookie.orig_i0, regs, &ka.sa); 567 + if (restart_syscall) 568 + syscall_restart(orig_i0, regs, &ka.sa); 558 569 handle_signal(signr, &ka, &info, oldset, regs); 559 570 560 571 /* a signal was successfully delivered; the saved ··· 575 568 clear_thread_flag(TIF_RESTORE_SIGMASK); 576 569 return; 577 570 } 578 - if (cookie.restart_syscall && 571 + if (restart_syscall && 579 572 (regs->u_regs[UREG_I0] == ERESTARTNOHAND || 580 573 regs->u_regs[UREG_I0] == ERESTARTSYS || 581 574 regs->u_regs[UREG_I0] == ERESTARTNOINTR)) { 582 575 /* replay the system call when we are done */ 583 - regs->u_regs[UREG_I0] = cookie.orig_i0; 576 + regs->u_regs[UREG_I0] = orig_i0; 584 577 regs->tpc -= 4; 585 578 regs->tnpc -= 4; 586 579 } 587 - if (cookie.restart_syscall && 580 + if (restart_syscall && 588 581 regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) { 589 582 regs->u_regs[UREG_G1] = __NR_restart_syscall; 590 583 regs->tpc -= 4; ··· 604 597 { 605 598 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) 606 599 do_signal(regs, orig_i0); 607 - } 608 - 609 - void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) 610 - { 611 - struct signal_deliver_cookie *cp = cookie; 612 - 613 - if (cp->restart_syscall && 614 - (regs->u_regs[UREG_I0] == ERESTARTNOHAND || 615 - regs->u_regs[UREG_I0] == ERESTARTSYS || 616 - regs->u_regs[UREG_I0] == ERESTARTNOINTR)) { 617 - /* replay the system call when we are done */ 618 - regs->u_regs[UREG_I0] = cp->orig_i0; 619 - regs->tpc -= 4; 620 - regs->tnpc -= 4; 621 - cp->restart_syscall = 0; 622 - } 623 - if (cp->restart_syscall && 624 - regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) { 625 - regs->u_regs[UREG_G1] = __NR_restart_syscall; 626 - regs->tpc -= 4; 627 - regs->tnpc -= 4; 628 - cp->restart_syscall = 0; 629 - } 630 600 }
+17 -9
arch/sparc64/kernel/signal32.c
··· 269 269 regs->tstate |= psr_to_tstate_icc(psr); 270 270 271 271 /* Prevent syscall restart. */ 272 - pt_regs_clear_trap_type(regs); 272 + pt_regs_clear_syscall(regs); 273 273 274 274 err |= __get_user(fpu_save, &sf->fpu_save); 275 275 if (fpu_save) ··· 355 355 regs->tstate |= psr_to_tstate_icc(psr); 356 356 357 357 /* Prevent syscall restart. */ 358 - pt_regs_clear_trap_type(regs); 358 + pt_regs_clear_syscall(regs); 359 359 360 360 err |= __get_user(fpu_save, &sf->fpu_save); 361 361 if (fpu_save) ··· 768 768 * mistake. 769 769 */ 770 770 void do_signal32(sigset_t *oldset, struct pt_regs * regs, 771 - struct signal_deliver_cookie *cookie) 771 + int restart_syscall, unsigned long orig_i0) 772 772 { 773 773 struct k_sigaction ka; 774 774 siginfo_t info; 775 775 int signr; 776 776 777 - signr = get_signal_to_deliver(&info, &ka, regs, cookie); 777 + signr = get_signal_to_deliver(&info, &ka, regs, NULL); 778 + 779 + /* If the debugger messes with the program counter, it clears 780 + * the "in syscall" bit, directing us to not perform a syscall 781 + * restart. 782 + */ 783 + if (restart_syscall && !pt_regs_is_syscall(regs)) 784 + restart_syscall = 0; 785 + 778 786 if (signr > 0) { 779 - if (cookie->restart_syscall) 780 - syscall_restart32(cookie->orig_i0, regs, &ka.sa); 787 + if (restart_syscall) 788 + syscall_restart32(orig_i0, regs, &ka.sa); 781 789 handle_signal32(signr, &ka, &info, oldset, regs); 782 790 783 791 /* a signal was successfully delivered; the saved ··· 797 789 clear_thread_flag(TIF_RESTORE_SIGMASK); 798 790 return; 799 791 } 800 - if (cookie->restart_syscall && 792 + if (restart_syscall && 801 793 (regs->u_regs[UREG_I0] == ERESTARTNOHAND || 802 794 regs->u_regs[UREG_I0] == ERESTARTSYS || 803 795 regs->u_regs[UREG_I0] == ERESTARTNOINTR)) { 804 796 /* replay the system call when we are done */ 805 - regs->u_regs[UREG_I0] = cookie->orig_i0; 797 + regs->u_regs[UREG_I0] = orig_i0; 806 798 regs->tpc -= 4; 807 799 regs->tnpc -= 4; 808 800 } 809 - if (cookie->restart_syscall && 801 + if (restart_syscall && 810 802 regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) { 811 803 regs->u_regs[UREG_G1] = __NR_restart_syscall; 812 804 regs->tpc -= 4;
+2 -4
drivers/video/bw2.c
··· 17 17 #include <linux/init.h> 18 18 #include <linux/fb.h> 19 19 #include <linux/mm.h> 20 + #include <linux/of_device.h> 20 21 21 22 #include <asm/io.h> 22 - #include <asm/oplib.h> 23 - #include <asm/prom.h> 24 - #include <asm/of_device.h> 25 23 #include <asm/fbio.h> 26 24 27 25 #include "sbuslib.h" ··· 297 299 par->physbase = op->resource[0].start; 298 300 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 299 301 300 - sbusfb_fill_var(&info->var, dp->node, 1); 302 + sbusfb_fill_var(&info->var, dp, 1); 301 303 linebytes = of_getintprop_default(dp, "linebytes", 302 304 info->var.xres); 303 305
+2 -3
drivers/video/cg14.c
··· 17 17 #include <linux/fb.h> 18 18 #include <linux/mm.h> 19 19 #include <linux/uaccess.h> 20 + #include <linux/of_device.h> 20 21 21 22 #include <asm/io.h> 22 - #include <asm/prom.h> 23 - #include <asm/of_device.h> 24 23 #include <asm/fbio.h> 25 24 26 25 #include "sbuslib.h" ··· 481 482 482 483 spin_lock_init(&par->lock); 483 484 484 - sbusfb_fill_var(&info->var, dp->node, 8); 485 + sbusfb_fill_var(&info->var, dp, 8); 485 486 info->var.red.length = 8; 486 487 info->var.green.length = 8; 487 488 info->var.blue.length = 8;
+2 -4
drivers/video/cg3.c
··· 17 17 #include <linux/init.h> 18 18 #include <linux/fb.h> 19 19 #include <linux/mm.h> 20 + #include <linux/of_device.h> 20 21 21 22 #include <asm/io.h> 22 - #include <asm/oplib.h> 23 - #include <asm/prom.h> 24 - #include <asm/of_device.h> 25 23 #include <asm/fbio.h> 26 24 27 25 #include "sbuslib.h" ··· 371 373 par->physbase = op->resource[0].start; 372 374 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 373 375 374 - sbusfb_fill_var(&info->var, dp->node, 8); 376 + sbusfb_fill_var(&info->var, dp, 8); 375 377 info->var.red.length = 8; 376 378 info->var.green.length = 8; 377 379 info->var.blue.length = 8;
+2 -2
drivers/video/cg6.c
··· 17 17 #include <linux/init.h> 18 18 #include <linux/fb.h> 19 19 #include <linux/mm.h> 20 + #include <linux/of_device.h> 20 21 21 22 #include <asm/io.h> 22 - #include <asm/of_device.h> 23 23 #include <asm/fbio.h> 24 24 25 25 #include "sbuslib.h" ··· 728 728 par->physbase = op->resource[0].start; 729 729 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 730 730 731 - sbusfb_fill_var(&info->var, dp->node, 8); 731 + sbusfb_fill_var(&info->var, dp, 8); 732 732 info->var.red.length = 8; 733 733 info->var.green.length = 8; 734 734 info->var.blue.length = 8;
+2 -3
drivers/video/ffb.c
··· 16 16 #include <linux/fb.h> 17 17 #include <linux/mm.h> 18 18 #include <linux/timer.h> 19 + #include <linux/of_device.h> 19 20 20 21 #include <asm/io.h> 21 22 #include <asm/upa.h> 22 - #include <asm/prom.h> 23 - #include <asm/of_device.h> 24 23 #include <asm/fbio.h> 25 24 26 25 #include "sbuslib.h" ··· 940 941 info->screen_base = (char *) par->physbase + FFB_DFB24_POFF; 941 942 info->pseudo_palette = par->pseudo_palette; 942 943 943 - sbusfb_fill_var(&info->var, dp->node, 32); 944 + sbusfb_fill_var(&info->var, dp, 32); 944 945 par->fbsize = PAGE_ALIGN(info->var.xres * info->var.yres * 4); 945 946 ffb_fixup_var_rgb(&info->var); 946 947
+2 -3
drivers/video/leo.c
··· 16 16 #include <linux/init.h> 17 17 #include <linux/fb.h> 18 18 #include <linux/mm.h> 19 + #include <linux/of_device.h> 19 20 20 21 #include <asm/io.h> 21 - #include <asm/prom.h> 22 - #include <asm/of_device.h> 23 22 #include <asm/fbio.h> 24 23 25 24 #include "sbuslib.h" ··· 561 562 par->physbase = op->resource[0].start; 562 563 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 563 564 564 - sbusfb_fill_var(&info->var, dp->node, 32); 565 + sbusfb_fill_var(&info->var, dp, 32); 565 566 leo_fixup_var_rgb(&info->var); 566 567 567 568 linebytes = of_getintprop_default(dp, "linebytes",
+2 -3
drivers/video/p9100.c
··· 15 15 #include <linux/init.h> 16 16 #include <linux/fb.h> 17 17 #include <linux/mm.h> 18 + #include <linux/of_device.h> 18 19 19 20 #include <asm/io.h> 20 - #include <asm/prom.h> 21 - #include <asm/of_device.h> 22 21 #include <asm/fbio.h> 23 22 24 23 #include "sbuslib.h" ··· 274 275 par->physbase = op->resource[2].start; 275 276 par->which_io = op->resource[2].flags & IORESOURCE_BITS; 276 277 277 - sbusfb_fill_var(&info->var, dp->node, 8); 278 + sbusfb_fill_var(&info->var, dp, 8); 278 279 info->var.red.length = 8; 279 280 info->var.green.length = 8; 280 281 info->var.blue.length = 8;
+5 -4
drivers/video/sbuslib.c
··· 10 10 #include <linux/fb.h> 11 11 #include <linux/mm.h> 12 12 #include <linux/uaccess.h> 13 + #include <linux/of_device.h> 13 14 14 - #include <asm/oplib.h> 15 15 #include <asm/fbio.h> 16 16 17 17 #include "sbuslib.h" 18 18 19 - void sbusfb_fill_var(struct fb_var_screeninfo *var, int prom_node, int bpp) 19 + void sbusfb_fill_var(struct fb_var_screeninfo *var, struct device_node *dp, 20 + int bpp) 20 21 { 21 22 memset(var, 0, sizeof(*var)); 22 23 23 - var->xres = prom_getintdefault(prom_node, "width", 1152); 24 - var->yres = prom_getintdefault(prom_node, "height", 900); 24 + var->xres = of_getintprop_default(dp, "width", 1152); 25 + var->yres = of_getintprop_default(dp, "height", 900); 25 26 var->xres_virtual = var->xres; 26 27 var->yres_virtual = var->yres; 27 28 var->bits_per_pixel = bpp;
+3 -2
drivers/video/sbuslib.h
··· 11 11 #define SBUS_MMAP_FBSIZE(n) (-n) 12 12 #define SBUS_MMAP_EMPTY 0x80000000 13 13 14 - extern void sbusfb_fill_var(struct fb_var_screeninfo *var, int prom_node, int bpp); 14 + extern void sbusfb_fill_var(struct fb_var_screeninfo *var, 15 + struct device_node *dp, int bpp); 15 16 struct vm_area_struct; 16 17 extern int sbusfb_mmap_helper(struct sbus_mmap_map *map, 17 18 unsigned long physbase, unsigned long fbsize, ··· 22 21 struct fb_info *info, 23 22 int type, int fb_depth, unsigned long fb_size); 24 23 int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, 25 - unsigned long arg); 24 + unsigned long arg); 26 25 27 26 #endif /* _SBUSLIB_H */
+1 -2
drivers/video/sunxvr2500.c
··· 9 9 #include <linux/fb.h> 10 10 #include <linux/pci.h> 11 11 #include <linux/init.h> 12 + #include <linux/of_device.h> 12 13 13 14 #include <asm/io.h> 14 - #include <asm/prom.h> 15 - #include <asm/of_device.h> 16 15 17 16 struct s3d_info { 18 17 struct fb_info *info;
+1 -2
drivers/video/sunxvr500.c
··· 9 9 #include <linux/fb.h> 10 10 #include <linux/pci.h> 11 11 #include <linux/init.h> 12 + #include <linux/of_device.h> 12 13 13 14 #include <asm/io.h> 14 - #include <asm/prom.h> 15 - #include <asm/of_device.h> 16 15 17 16 /* XXX This device has a 'dev-comm' property which aparently is 18 17 * XXX a pointer into the openfirmware's address space which is
+2 -3
drivers/video/tcx.c
··· 17 17 #include <linux/init.h> 18 18 #include <linux/fb.h> 19 19 #include <linux/mm.h> 20 + #include <linux/of_device.h> 20 21 21 22 #include <asm/io.h> 22 - #include <asm/prom.h> 23 - #include <asm/of_device.h> 24 23 #include <asm/fbio.h> 25 24 26 25 #include "sbuslib.h" ··· 384 385 par->lowdepth = 385 386 (of_find_property(dp, "tcx-8-bit", NULL) != NULL); 386 387 387 - sbusfb_fill_var(&info->var, dp->node, 8); 388 + sbusfb_fill_var(&info->var, dp, 8); 388 389 info->var.red.length = 8; 389 390 info->var.green.length = 8; 390 391 info->var.blue.length = 8;
+1
include/asm-sparc/psr.h
··· 25 25 #define PSR_PIL 0x00000f00 /* processor interrupt level */ 26 26 #define PSR_EF 0x00001000 /* enable floating point */ 27 27 #define PSR_EC 0x00002000 /* enable co-processor */ 28 + #define PSR_SYSCALL 0x00004000 /* inside of a syscall */ 28 29 #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ 29 30 #define PSR_ICC 0x00f00000 /* integer condition codes */ 30 31 #define PSR_C 0x00100000 /* carry bit */
+11
include/asm-sparc/ptrace.h
··· 39 39 #define UREG_FP UREG_I6 40 40 #define UREG_RETPC UREG_I7 41 41 42 + static inline bool pt_regs_is_syscall(struct pt_regs *regs) 43 + { 44 + return (regs->psr & PSR_SYSCALL); 45 + } 46 + 47 + static inline bool pt_regs_clear_syscall(struct pt_regs *regs) 48 + { 49 + return (regs->psr &= ~PSR_SYSCALL); 50 + } 51 + 42 52 /* A register window */ 43 53 struct reg_window { 44 54 unsigned long locals[8]; ··· 159 149 #define SF_XXARG 0x5c 160 150 161 151 /* Stuff for the ptrace system call */ 152 + #define PTRACE_SPARC_DETACH 11 162 153 #define PTRACE_GETREGS 12 163 154 #define PTRACE_SETREGS 13 164 155 #define PTRACE_GETFPREGS 14
+1 -7
include/asm-sparc/signal.h
··· 199 199 size_t ss_size; 200 200 } stack_t; 201 201 202 - struct sparc_deliver_cookie { 203 - int restart_syscall; 204 - unsigned long orig_i0; 205 - }; 206 - 207 - struct pt_regs; 208 - extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); 202 + #define ptrace_signal_deliver(regs, cookie) do { } while (0) 209 203 210 204 #endif /* !(__KERNEL__) */ 211 205
+2
include/asm-sparc64/psrcompat.h
··· 12 12 #define PSR_PIL 0x00000f00 /* processor interrupt level */ 13 13 #define PSR_EF 0x00001000 /* enable floating point */ 14 14 #define PSR_EC 0x00002000 /* enable co-processor */ 15 + #define PSR_SYSCALL 0x00004000 /* inside of a syscall */ 15 16 #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ 16 17 #define PSR_ICC 0x00f00000 /* integer condition codes */ 17 18 #define PSR_C 0x00100000 /* carry bit */ ··· 31 30 PSR_S | 32 31 ((tstate & TSTATE_ICC) >> 12) | 33 32 ((tstate & TSTATE_XCC) >> 20) | 33 + ((tstate & TSTATE_SYSCALL) ? PSR_SYSCALL : 0) | 34 34 PSR_V8PLUS); 35 35 } 36 36
+1
include/asm-sparc64/pstate.h
··· 62 62 #define TSTATE_PRIV _AC(0x0000000000000400,UL) /* Privilege. */ 63 63 #define TSTATE_IE _AC(0x0000000000000200,UL) /* Interrupt Enable. */ 64 64 #define TSTATE_AG _AC(0x0000000000000100,UL) /* Alternate Globals.*/ 65 + #define TSTATE_SYSCALL _AC(0x0000000000000020,UL) /* in syscall trap */ 65 66 #define TSTATE_CWP _AC(0x000000000000001f,UL) /* Curr Win-Pointer. */ 66 67 67 68 /* Floating-Point Registers State Register.
+6 -7
include/asm-sparc64/ptrace.h
··· 42 42 return regs->magic & 0x1ff; 43 43 } 44 44 45 - static inline int pt_regs_clear_trap_type(struct pt_regs *regs) 46 - { 47 - return regs->magic &= ~0x1ff; 48 - } 49 - 50 45 static inline bool pt_regs_is_syscall(struct pt_regs *regs) 51 46 { 52 - int tt = pt_regs_trap_type(regs); 47 + return (regs->tstate & TSTATE_SYSCALL); 48 + } 53 49 54 - return (tt == 0x110 || tt == 0x111 || tt == 0x16d); 50 + static inline bool pt_regs_clear_syscall(struct pt_regs *regs) 51 + { 52 + return (regs->tstate &= ~TSTATE_SYSCALL); 55 53 } 56 54 57 55 struct pt_regs32 { ··· 296 298 #define SF_XXARG 0x5c 297 299 298 300 /* Stuff for the ptrace system call */ 301 + #define PTRACE_SPARC_DETACH 11 299 302 #define PTRACE_GETREGS 12 300 303 #define PTRACE_SETREGS 13 301 304 #define PTRACE_GETFPREGS 14
+1 -7
include/asm-sparc64/signal.h
··· 186 186 void __user *ka_restorer; 187 187 }; 188 188 189 - struct signal_deliver_cookie { 190 - int restart_syscall; 191 - unsigned long orig_i0; 192 - }; 193 - 194 - struct pt_regs; 195 - extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); 189 + #define ptrace_signal_deliver(regs, cookie) do { } while (0) 196 190 197 191 #endif /* !(__KERNEL__) */ 198 192
+4 -3
include/asm-sparc64/ttable.h
··· 91 91 nop; 92 92 93 93 #define SYSCALL_TRAP(routine, systbl) \ 94 + rdpr %pil, %g2; \ 95 + mov TSTATE_SYSCALL, %g3; \ 94 96 sethi %hi(109f), %g7; \ 95 - ba,pt %xcc, etrap; \ 97 + ba,pt %xcc, etrap_syscall; \ 96 98 109: or %g7, %lo(109b), %g7; \ 97 99 sethi %hi(systbl), %l7; \ 98 100 ba,pt %xcc, routine; \ 99 - or %l7, %lo(systbl), %l7; \ 100 - nop; nop; 101 + or %l7, %lo(systbl), %l7; 101 102 102 103 #define TRAP_UTRAP(handler,lvl) \ 103 104 mov handler, %g3; \