Commit 576821ff authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/home/anton/linux-2.5

into samba.org:/home/anton/ppc64tree
parents 28c8df48 82239faa
......@@ -43,6 +43,7 @@
#include <asm/ppcdebug.h>
#include <asm/machdep.h>
#include <asm/iSeries/HvCallHpt.h>
#include <asm/hardirq.h>
struct task_struct *last_task_used_math = NULL;
......@@ -485,3 +486,8 @@ void show_trace_task(struct task_struct *p)
} while (count++ < 16);
printk("\n");
}
void dump_stack(void)
{
show_stack(NULL);
}
......@@ -108,11 +108,11 @@ long sys_sigsuspend(old_sigset_t mask, int p2, int p3, int p4, int p6, int p7,
sigset_t saveset;
mask &= _BLOCKABLE;
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
saveset = current->blocked;
siginitset(&current->blocked, mask);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
regs->gpr[3] = -EINTR;
while (1) {
......@@ -144,11 +144,11 @@ long sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, int p3, int p4, int
return -EFAULT;
sigdelsetmask(&newset, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
saveset = current->blocked;
current->blocked = newset;
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
regs->gpr[3] = -EINTR;
while (1) {
......@@ -213,7 +213,7 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
struct pt_regs *regs)
{
struct rt_sigframe *rt_sf;
struct sigcontext_struct sigctx;
struct sigcontext sigctx;
struct sigregs *sr;
elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */
sigset_t set;
......@@ -225,10 +225,10 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
|| copy_from_user(&st, &rt_sf->uc.uc_stack, sizeof(st)))
goto badframe;
sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
if (regs->msr & MSR_FP)
giveup_fpu(current);
......@@ -331,12 +331,12 @@ long sys_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7, unsigned long r8,
struct pt_regs *regs)
{
struct sigcontext_struct *sc, sigctx;
struct sigcontext *sc, sigctx;
struct sigregs *sr;
elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */
sigset_t set;
sc = (struct sigcontext_struct *)(regs->gpr[1] + __SIGNAL_FRAMESIZE);
sc = (struct sigcontext *)(regs->gpr[1] + __SIGNAL_FRAMESIZE);
if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
goto badframe;
......@@ -345,10 +345,10 @@ long sys_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
set.sig[1] = sigctx._unused[3];
#endif
sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
if (regs->msr & MSR_FP)
giveup_fpu(current);
......@@ -391,7 +391,7 @@ static void setup_frame(struct pt_regs *regs, struct sigregs *frame,
struct funct_descr_entry * funct_desc_ptr;
unsigned long temp_ptr;
struct sigcontext_struct *sc = (struct sigcontext_struct *)newsp;
struct sigcontext *sc = (struct sigcontext *)newsp;
if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
goto badframe;
......@@ -440,7 +440,7 @@ static void setup_frame(struct pt_regs *regs, struct sigregs *frame,
static void handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
struct pt_regs * regs, unsigned long *newspp, unsigned long frame)
{
struct sigcontext_struct *sc;
struct sigcontext *sc;
struct rt_sigframe *rt_sf;
struct k_sigaction *ka = &current->sig->action[sig-1];
......@@ -481,7 +481,7 @@ static void handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
} else {
/* Put a sigcontext on the stack */
*newspp -= sizeof(*sc);
sc = (struct sigcontext_struct *)*newspp;
sc = (struct sigcontext *)*newspp;
if (verify_area(VERIFY_WRITE, sc, sizeof(*sc)))
goto badframe;
......@@ -499,11 +499,11 @@ static void handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
}
return;
......
......@@ -218,14 +218,14 @@ long sys32_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7, unsigned long r8,
struct pt_regs *regs)
{
struct sigcontext32_struct *sc, sigctx;
struct sigcontext32 *sc, sigctx;
struct sigregs32 *sr;
int ret;
elf_gregset_t32 saved_regs; /* an array of ELF_NGREG unsigned ints (32 bits) */
sigset_t set;
int i;
sc = (struct sigcontext32_struct *)(regs->gpr[1] + __SIGNAL_FRAMESIZE32);
sc = (struct sigcontext32 *)(regs->gpr[1] + __SIGNAL_FRAMESIZE32);
if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
goto badframe;
......@@ -235,10 +235,10 @@ long sys32_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
*/
set.sig[0] = sigctx.oldmask + ((long)(sigctx._unused[3]) << 32);
sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
if (regs->msr & MSR_FP )
giveup_fpu(current);
/* Last stacked signal - restore registers */
......@@ -315,8 +315,7 @@ long sys32_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
static void setup_frame32(struct pt_regs *regs, struct sigregs32 *frame,
unsigned int newsp)
{
struct sigcontext32_struct *sc =
(struct sigcontext32_struct *)(u64)newsp;
struct sigcontext32 *sc = (struct sigcontext32 *)(u64)newsp;
int i;
if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
......@@ -430,7 +429,7 @@ long sys32_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
struct pt_regs * regs)
{
struct rt_sigframe_32 *rt_sf;
struct sigcontext32_struct sigctx;
struct sigcontext32 sigctx;
struct sigregs32 *sr;
int ret;
elf_gregset_t32 saved_regs; /* an array of 32 bit register values */
......@@ -455,10 +454,10 @@ long sys32_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
*/
sigdelsetmask(&set, ~_BLOCKABLE);
/* update the current based on the sigmask found in the rt_stackframe */
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
/* If currently owning the floating point - give them up */
if (regs->msr & MSR_FP)
......@@ -842,11 +841,11 @@ int sys32_rt_sigsuspend(sigset32_t* unewset, size_t sigsetsize, int p3,
sigdelsetmask(&newset, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
saveset = current->blocked;
current->blocked = newset;
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
regs->gpr[3] = -EINTR;
while (1) {
......@@ -958,7 +957,7 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
sigset_t *oldset, struct pt_regs * regs, unsigned int *newspp,
unsigned int frame)
{
struct sigcontext32_struct *sc;
struct sigcontext32 *sc;
struct rt_sigframe_32 *rt_sf;
struct k_sigaction *ka = &current->sig->action[sig-1];
......@@ -1000,7 +999,7 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
} else {
/* Put a sigcontext on the stack */
*newspp -= sizeof(*sc);
sc = (struct sigcontext32_struct *)(u64)*newspp;
sc = (struct sigcontext32 *)(u64)*newspp;
if (verify_area(VERIFY_WRITE, sc, sizeof(*sc)))
goto badframe;
/*
......@@ -1019,11 +1018,11 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&current->sigmask_lock);
spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
}
return;
......
......@@ -27,6 +27,7 @@
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <asm/page.h>
#include <asm/pgtable.h>
......@@ -79,7 +80,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
}
#endif
if (in_interrupt() || mm == NULL) {
if (in_atomic() || mm == NULL) {
bad_page_fault(regs, address, SIGSEGV);
return;
}
......
......@@ -112,6 +112,4 @@ do { \
print_backtrace(_get_SP()); \
} while (0)
#define dump_stack() show_stack()
#endif /* __ASM_HARDIRQ_H */
......@@ -212,7 +212,7 @@ struct __old_kernel_stat32
unsigned int st_ctime;
};
struct sigcontext32_struct {
struct sigcontext32 {
unsigned int _unused[4];
int signal;
unsigned int handler;
......@@ -224,7 +224,7 @@ struct ucontext32 {
unsigned int uc_flags;
unsigned int uc_link;
stack_32_t uc_stack;
struct sigcontext32_struct uc_mcontext;
struct sigcontext32 uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
};
......
......@@ -77,6 +77,7 @@ static inline void down(struct semaphore * sem)
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
might_sleep();
/*
* Try to get the semaphore, take the slow path if we fail.
......@@ -93,6 +94,7 @@ static inline int down_interruptible(struct semaphore * sem)
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
might_sleep();
if (atomic_dec_return(&sem->count) < 0)
ret = __down_interruptible(sem);
......
......@@ -10,7 +10,7 @@
#include <asm/ptrace.h>
struct sigcontext_struct {
struct sigcontext {
unsigned long _unused[4];
int signal;
unsigned long handler;
......
......@@ -32,11 +32,11 @@ struct thread_info {
*/
#define INIT_THREAD_INFO(tsk) \
{ \
task: &tsk, \
exec_domain: &default_exec_domain, \
flags: 0, \
cpu: 0, \
preempt_count: 1, \
.task = &tsk, \
.exec_domain = &default_exec_domain, \
.flags = 0, \
.cpu = 0, \
.preempt_count = 1, \
}
#define init_thread_info (init_thread_union.thread_info)
......
......@@ -13,7 +13,7 @@ struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
struct sigcontext_struct uc_mcontext;
struct sigcontext uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
};
......
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