Commit f234e508 authored by Jeff Dike's avatar Jeff Dike

Merged Al's ubd changes with mine.

parents 2e714290 049e26a1
...@@ -30,11 +30,6 @@ PROFILE += -pg -DPROFILING ...@@ -30,11 +30,6 @@ PROFILE += -pg -DPROFILING
LINK_PROFILE = $(PROFILE) -Wl,--wrap,__monstartup LINK_PROFILE = $(PROFILE) -Wl,--wrap,__monstartup
endif endif
ARCH_SUBDIRS = $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
$(ARCH_DIR)/sys-$(SUBARCH) $(ARCH_DIR)/os-$(OS)
SUBDIRS += $(ARCH_SUBDIRS)
core-y += $(ARCH_DIR)/kernel/ \ core-y += $(ARCH_DIR)/kernel/ \
$(ARCH_DIR)/drivers/ \ $(ARCH_DIR)/drivers/ \
$(ARCH_DIR)/sys-$(SUBARCH)/ $(ARCH_DIR)/sys-$(SUBARCH)/
......
...@@ -409,7 +409,7 @@ void chan_interrupt(struct list_head *chans, struct tq_struct *task, ...@@ -409,7 +409,7 @@ void chan_interrupt(struct list_head *chans, struct tq_struct *task,
do { do {
if((tty != NULL) && if((tty != NULL) &&
(tty->flip.count >= TTY_FLIPBUF_SIZE)){ (tty->flip.count >= TTY_FLIPBUF_SIZE)){
queue_task(task, &tq_timer); schedule_task(task);
goto out; goto out;
} }
err = chan->ops->read(chan->fd, &c, chan->data); err = chan->ops->read(chan->fd, &c, chan->data);
......
...@@ -880,6 +880,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file, ...@@ -880,6 +880,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
return(-EFAULT); return(-EFAULT);
return(0); return(0);
} }
return(-EINVAL);
} }
static int ubd_revalidate(kdev_t rdev) static int ubd_revalidate(kdev_t rdev)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define DSISR_WRITE 0x02000000 #define DSISR_WRITE 0x02000000
#define SC_FAULT_ADDR(sc) ({ \ #define SC_FAULT_ADDR(sc) ({ \
struct sigcontext_struct *_sc = (sc); \ struct sigcontext *_sc = (sc); \
long retval = -1; \ long retval = -1; \
switch (_sc->regs->trap) { \ switch (_sc->regs->trap) { \
case 0x300: \ case 0x300: \
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
}) })
#define SC_FAULT_WRITE(sc) ({ \ #define SC_FAULT_WRITE(sc) ({ \
struct sigcontext_struct *_sc = (sc); \ struct sigcontext *_sc = (sc); \
long retval = -1; \ long retval = -1; \
switch (_sc->regs->trap) { \ switch (_sc->regs->trap) { \
case 0x300: \ case 0x300: \
......
...@@ -101,12 +101,12 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr, ...@@ -101,12 +101,12 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
ka->sa.sa_handler = SIG_DFL; ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NODEFER)) { if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked, &current->blocked, sigorsets(&current->blocked, &current->blocked,
&ka->sa.sa_mask); &ka->sa.sa_mask);
sigaddset(&current->blocked, signr); sigaddset(&current->blocked, signr);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
} }
sp = PT_REGS_SP(regs); sp = PT_REGS_SP(regs);
...@@ -188,11 +188,11 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask) ...@@ -188,11 +188,11 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
sigset_t saveset; sigset_t saveset;
mask &= _BLOCKABLE; mask &= _BLOCKABLE;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
saveset = current->blocked; saveset = current->blocked;
siginitset(&current->blocked, mask); siginitset(&current->blocked, mask);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
while (1) { while (1) {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
...@@ -214,11 +214,11 @@ int sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize) ...@@ -214,11 +214,11 @@ int sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
return -EFAULT; return -EFAULT;
sigdelsetmask(&newset, ~_BLOCKABLE); sigdelsetmask(&newset, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
saveset = current->blocked; saveset = current->blocked;
current->blocked = newset; current->blocked = newset;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
while (1) { while (1) {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
...@@ -234,13 +234,13 @@ int sys_sigreturn(struct pt_regs regs) ...@@ -234,13 +234,13 @@ int sys_sigreturn(struct pt_regs regs)
void *mask = sp_to_mask(PT_REGS_SP(&regs)); void *mask = sp_to_mask(PT_REGS_SP(&regs));
int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long); int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
copy_from_user(&current->blocked.sig[0], sc_sigmask(sc), copy_from_user(&current->blocked.sig[0], sc_sigmask(sc),
sizeof(current->blocked.sig[0])); sizeof(current->blocked.sig[0]));
copy_from_user(&current->blocked.sig[1], mask, sig_size); copy_from_user(&current->blocked.sig[1], mask, sig_size);
sigdelsetmask(&current->blocked, ~_BLOCKABLE); sigdelsetmask(&current->blocked, ~_BLOCKABLE);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
copy_sc_from_user(current->thread.regs.regs.sc, sc, copy_sc_from_user(current->thread.regs.regs.sc, sc,
&signal_frame_sc.arch); &signal_frame_sc.arch);
return(PT_REGS_SYSCALL_RET(&current->thread.regs)); return(PT_REGS_SYSCALL_RET(&current->thread.regs));
...@@ -252,11 +252,11 @@ int sys_rt_sigreturn(struct pt_regs regs) ...@@ -252,11 +252,11 @@ int sys_rt_sigreturn(struct pt_regs regs)
void *mask = sp_to_rt_mask(PT_REGS_SP(&regs)); void *mask = sp_to_rt_mask(PT_REGS_SP(&regs));
int sig_size = _NSIG_WORDS * sizeof(unsigned long); int sig_size = _NSIG_WORDS * sizeof(unsigned long);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
copy_from_user(&current->blocked, mask, sig_size); copy_from_user(&current->blocked, mask, sig_size);
sigdelsetmask(&current->blocked, ~_BLOCKABLE); sigdelsetmask(&current->blocked, ~_BLOCKABLE);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
copy_sc_from_user(current->thread.regs.regs.sc, sc, copy_sc_from_user(current->thread.regs.regs.sc, sc,
&signal_frame_sc.arch); &signal_frame_sc.arch);
return(PT_REGS_SYSCALL_RET(&current->thread.regs)); return(PT_REGS_SYSCALL_RET(&current->thread.regs));
......
...@@ -417,7 +417,7 @@ int nsegfaults = 0; ...@@ -417,7 +417,7 @@ int nsegfaults = 0;
void segv_handler(int sig, struct uml_pt_regs *regs) void segv_handler(int sig, struct uml_pt_regs *regs)
{ {
struct sigcontext_struct *context = regs->sc; struct sigcontext *context = regs->sc;
int index; int index;
if(regs->is_user && !SEGV_IS_FIXABLE(context)){ if(regs->is_user && !SEGV_IS_FIXABLE(context)){
......
#ifndef _ASM_UM_TOPOLOGY_H
#define _ASM_UM_TOPOLOGY_H
#include <asm-generic/topology.h>
#endif
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