diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-22 17:30:35 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-22 17:30:35 -0500 |
| commit | 343391b1d14cf1e282f3cf5b4ea416c2ae2a4c9a (patch) | |
| tree | 67d32c4ea86a832e7931304224b5fadf07385ec1 | |
| parent | 262060ea46902523a9d16400aa6f5b472e99cfa6 (diff) | |
| parent | ad30f3ff3deb4037f2beea15812d01d795f8b3cc (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller:
"Improve the stability of the linux kernel on the parisc architecture"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: sigaltstack doesn't round ss.ss_sp as required
parisc: improve ptrace support for gdb single-step
parisc: don't claim cpu irqs more than once
parisc: avoid undefined shift in cnv_float.h
| -rw-r--r-- | arch/parisc/kernel/entry.S | 18 | ||||
| -rw-r--r-- | arch/parisc/kernel/irq.c | 6 | ||||
| -rw-r--r-- | arch/parisc/kernel/ptrace.c | 2 | ||||
| -rw-r--r-- | arch/parisc/kernel/signal.c | 4 | ||||
| -rw-r--r-- | arch/parisc/math-emu/cnv_float.h | 11 |
5 files changed, 26 insertions, 15 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index bfb44247d7a7..eb7850b46c25 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
| @@ -1865,7 +1865,7 @@ syscall_restore: | |||
| 1865 | 1865 | ||
| 1866 | /* Are we being ptraced? */ | 1866 | /* Are we being ptraced? */ |
| 1867 | ldw TASK_FLAGS(%r1),%r19 | 1867 | ldw TASK_FLAGS(%r1),%r19 |
| 1868 | ldi (_TIF_SINGLESTEP|_TIF_BLOCKSTEP),%r2 | 1868 | ldi _TIF_SYSCALL_TRACE_MASK,%r2 |
| 1869 | and,COND(=) %r19,%r2,%r0 | 1869 | and,COND(=) %r19,%r2,%r0 |
| 1870 | b,n syscall_restore_rfi | 1870 | b,n syscall_restore_rfi |
| 1871 | 1871 | ||
| @@ -1978,15 +1978,23 @@ syscall_restore_rfi: | |||
| 1978 | /* sr2 should be set to zero for userspace syscalls */ | 1978 | /* sr2 should be set to zero for userspace syscalls */ |
| 1979 | STREG %r0,TASK_PT_SR2(%r1) | 1979 | STREG %r0,TASK_PT_SR2(%r1) |
| 1980 | 1980 | ||
| 1981 | pt_regs_ok: | ||
| 1982 | LDREG TASK_PT_GR31(%r1),%r2 | 1981 | LDREG TASK_PT_GR31(%r1),%r2 |
| 1983 | depi 3,31,2,%r2 /* ensure return to user mode. */ | 1982 | depi 3,31,2,%r2 /* ensure return to user mode. */ |
| 1984 | STREG %r2,TASK_PT_IAOQ0(%r1) | 1983 | STREG %r2,TASK_PT_IAOQ0(%r1) |
| 1985 | ldo 4(%r2),%r2 | 1984 | ldo 4(%r2),%r2 |
| 1986 | STREG %r2,TASK_PT_IAOQ1(%r1) | 1985 | STREG %r2,TASK_PT_IAOQ1(%r1) |
| 1986 | b intr_restore | ||
| 1987 | copy %r25,%r16 | 1987 | copy %r25,%r16 |
| 1988 | |||
| 1989 | pt_regs_ok: | ||
| 1990 | LDREG TASK_PT_IAOQ0(%r1),%r2 | ||
| 1991 | depi 3,31,2,%r2 /* ensure return to user mode. */ | ||
| 1992 | STREG %r2,TASK_PT_IAOQ0(%r1) | ||
| 1993 | LDREG TASK_PT_IAOQ1(%r1),%r2 | ||
| 1994 | depi 3,31,2,%r2 | ||
| 1995 | STREG %r2,TASK_PT_IAOQ1(%r1) | ||
| 1988 | b intr_restore | 1996 | b intr_restore |
| 1989 | nop | 1997 | copy %r25,%r16 |
| 1990 | 1998 | ||
| 1991 | .import schedule,code | 1999 | .import schedule,code |
| 1992 | syscall_do_resched: | 2000 | syscall_do_resched: |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index c0b1affc06a8..0299d63cd112 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
| @@ -410,11 +410,13 @@ void __init init_IRQ(void) | |||
| 410 | { | 410 | { |
| 411 | local_irq_disable(); /* PARANOID - should already be disabled */ | 411 | local_irq_disable(); /* PARANOID - should already be disabled */ |
| 412 | mtctl(~0UL, 23); /* EIRR : clear all pending external intr */ | 412 | mtctl(~0UL, 23); /* EIRR : clear all pending external intr */ |
| 413 | claim_cpu_irqs(); | ||
| 414 | #ifdef CONFIG_SMP | 413 | #ifdef CONFIG_SMP |
| 415 | if (!cpu_eiem) | 414 | if (!cpu_eiem) { |
| 415 | claim_cpu_irqs(); | ||
| 416 | cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ); | 416 | cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ); |
| 417 | } | ||
| 417 | #else | 418 | #else |
| 419 | claim_cpu_irqs(); | ||
| 418 | cpu_eiem = EIEM_MASK(TIMER_IRQ); | 420 | cpu_eiem = EIEM_MASK(TIMER_IRQ); |
| 419 | #endif | 421 | #endif |
| 420 | set_eiem(cpu_eiem); /* EIEM : enable all external intr */ | 422 | set_eiem(cpu_eiem); /* EIEM : enable all external intr */ |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 857c2f545470..534abd4936e1 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <asm/asm-offsets.h> | 26 | #include <asm/asm-offsets.h> |
| 27 | 27 | ||
| 28 | /* PSW bits we allow the debugger to modify */ | 28 | /* PSW bits we allow the debugger to modify */ |
| 29 | #define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB) | 29 | #define USER_PSW_BITS (PSW_N | PSW_B | PSW_V | PSW_CB) |
| 30 | 30 | ||
| 31 | /* | 31 | /* |
| 32 | * Called by kernel/ptrace.c when detaching.. | 32 | * Called by kernel/ptrace.c when detaching.. |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 537996955998..fd051705a407 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
| @@ -190,8 +190,10 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) | |||
| 190 | DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n", | 190 | DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n", |
| 191 | (unsigned long)ka, sp, frame_size); | 191 | (unsigned long)ka, sp, frame_size); |
| 192 | 192 | ||
| 193 | /* Align alternate stack and reserve 64 bytes for the signal | ||
| 194 | handler's frame marker. */ | ||
| 193 | if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) | 195 | if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) |
| 194 | sp = current->sas_ss_sp; /* Stacks grow up! */ | 196 | sp = (current->sas_ss_sp + 0x7f) & ~0x3f; /* Stacks grow up! */ |
| 195 | 197 | ||
| 196 | DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp); | 198 | DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp); |
| 197 | return (void __user *) sp; /* Stacks grow up. Fun. */ | 199 | return (void __user *) sp; /* Stacks grow up. Fun. */ |
diff --git a/arch/parisc/math-emu/cnv_float.h b/arch/parisc/math-emu/cnv_float.h index 9071e093164a..933423fa5144 100644 --- a/arch/parisc/math-emu/cnv_float.h +++ b/arch/parisc/math-emu/cnv_float.h | |||
| @@ -347,16 +347,15 @@ | |||
| 347 | Sgl_isinexact_to_fix(sgl_value,exponent) | 347 | Sgl_isinexact_to_fix(sgl_value,exponent) |
| 348 | 348 | ||
| 349 | #define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \ | 349 | #define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \ |
| 350 | {Sall(sgl_value) <<= SGL_EXP_LENGTH; /* left-justify */ \ | 350 | {unsigned int val = Sall(sgl_value) << SGL_EXP_LENGTH; \ |
| 351 | if (exponent <= 31) { \ | 351 | if (exponent <= 31) { \ |
| 352 | Dintp1(dresultA) = 0; \ | 352 | Dintp1(dresultA) = 0; \ |
| 353 | Dintp2(dresultB) = (unsigned)Sall(sgl_value) >> (31 - exponent); \ | 353 | Dintp2(dresultB) = val >> (31 - exponent); \ |
| 354 | } \ | 354 | } \ |
| 355 | else { \ | 355 | else { \ |
| 356 | Dintp1(dresultA) = Sall(sgl_value) >> (63 - exponent); \ | 356 | Dintp1(dresultA) = val >> (63 - exponent); \ |
| 357 | Dintp2(dresultB) = Sall(sgl_value) << (exponent - 31); \ | 357 | Dintp2(dresultB) = exponent <= 62 ? val << (exponent - 31) : 0; \ |
| 358 | } \ | 358 | } \ |
| 359 | Sall(sgl_value) >>= SGL_EXP_LENGTH; /* return to original */ \ | ||
| 360 | } | 359 | } |
| 361 | 360 | ||
| 362 | #define Duint_setzero(dresultA,dresultB) \ | 361 | #define Duint_setzero(dresultA,dresultB) \ |
