Commit 343391b1 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 262060ea ad30f3ff
...@@ -1865,7 +1865,7 @@ syscall_restore: ...@@ -1865,7 +1865,7 @@ syscall_restore:
/* Are we being ptraced? */ /* Are we being ptraced? */
ldw TASK_FLAGS(%r1),%r19 ldw TASK_FLAGS(%r1),%r19
ldi (_TIF_SINGLESTEP|_TIF_BLOCKSTEP),%r2 ldi _TIF_SYSCALL_TRACE_MASK,%r2
and,COND(=) %r19,%r2,%r0 and,COND(=) %r19,%r2,%r0
b,n syscall_restore_rfi b,n syscall_restore_rfi
...@@ -1978,15 +1978,23 @@ syscall_restore_rfi: ...@@ -1978,15 +1978,23 @@ syscall_restore_rfi:
/* sr2 should be set to zero for userspace syscalls */ /* sr2 should be set to zero for userspace syscalls */
STREG %r0,TASK_PT_SR2(%r1) STREG %r0,TASK_PT_SR2(%r1)
pt_regs_ok:
LDREG TASK_PT_GR31(%r1),%r2 LDREG TASK_PT_GR31(%r1),%r2
depi 3,31,2,%r2 /* ensure return to user mode. */ depi 3,31,2,%r2 /* ensure return to user mode. */
STREG %r2,TASK_PT_IAOQ0(%r1) STREG %r2,TASK_PT_IAOQ0(%r1)
ldo 4(%r2),%r2 ldo 4(%r2),%r2
STREG %r2,TASK_PT_IAOQ1(%r1) STREG %r2,TASK_PT_IAOQ1(%r1)
b intr_restore
copy %r25,%r16 copy %r25,%r16
pt_regs_ok:
LDREG TASK_PT_IAOQ0(%r1),%r2
depi 3,31,2,%r2 /* ensure return to user mode. */
STREG %r2,TASK_PT_IAOQ0(%r1)
LDREG TASK_PT_IAOQ1(%r1),%r2
depi 3,31,2,%r2
STREG %r2,TASK_PT_IAOQ1(%r1)
b intr_restore b intr_restore
nop copy %r25,%r16
.import schedule,code .import schedule,code
syscall_do_resched: syscall_do_resched:
......
...@@ -410,11 +410,13 @@ void __init init_IRQ(void) ...@@ -410,11 +410,13 @@ void __init init_IRQ(void)
{ {
local_irq_disable(); /* PARANOID - should already be disabled */ local_irq_disable(); /* PARANOID - should already be disabled */
mtctl(~0UL, 23); /* EIRR : clear all pending external intr */ mtctl(~0UL, 23); /* EIRR : clear all pending external intr */
claim_cpu_irqs();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (!cpu_eiem) if (!cpu_eiem) {
claim_cpu_irqs();
cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ); cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ);
}
#else #else
claim_cpu_irqs();
cpu_eiem = EIEM_MASK(TIMER_IRQ); cpu_eiem = EIEM_MASK(TIMER_IRQ);
#endif #endif
set_eiem(cpu_eiem); /* EIEM : enable all external intr */ set_eiem(cpu_eiem); /* EIEM : enable all external intr */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
/* PSW bits we allow the debugger to modify */ /* PSW bits we allow the debugger to modify */
#define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB) #define USER_PSW_BITS (PSW_N | PSW_B | PSW_V | PSW_CB)
/* /*
* Called by kernel/ptrace.c when detaching.. * Called by kernel/ptrace.c when detaching..
......
...@@ -190,8 +190,10 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) ...@@ -190,8 +190,10 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n", DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n",
(unsigned long)ka, sp, frame_size); (unsigned long)ka, sp, frame_size);
/* Align alternate stack and reserve 64 bytes for the signal
handler's frame marker. */
if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
sp = current->sas_ss_sp; /* Stacks grow up! */ sp = (current->sas_ss_sp + 0x7f) & ~0x3f; /* Stacks grow up! */
DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp); DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp);
return (void __user *) sp; /* Stacks grow up. Fun. */ return (void __user *) sp; /* Stacks grow up. Fun. */
......
...@@ -347,16 +347,15 @@ ...@@ -347,16 +347,15 @@
Sgl_isinexact_to_fix(sgl_value,exponent) Sgl_isinexact_to_fix(sgl_value,exponent)
#define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \ #define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \
{Sall(sgl_value) <<= SGL_EXP_LENGTH; /* left-justify */ \ {unsigned int val = Sall(sgl_value) << SGL_EXP_LENGTH; \
if (exponent <= 31) { \ if (exponent <= 31) { \
Dintp1(dresultA) = 0; \ Dintp1(dresultA) = 0; \
Dintp2(dresultB) = (unsigned)Sall(sgl_value) >> (31 - exponent); \ Dintp2(dresultB) = val >> (31 - exponent); \
} \ } \
else { \ else { \
Dintp1(dresultA) = Sall(sgl_value) >> (63 - exponent); \ Dintp1(dresultA) = val >> (63 - exponent); \
Dintp2(dresultB) = Sall(sgl_value) << (exponent - 31); \ Dintp2(dresultB) = exponent <= 62 ? val << (exponent - 31) : 0; \
} \ } \
Sall(sgl_value) >>= SGL_EXP_LENGTH; /* return to original */ \
} }
#define Duint_setzero(dresultA,dresultB) \ #define Duint_setzero(dresultA,dresultB) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment