Commit ea4078bd authored by Jeff Dike's avatar Jeff Dike

Small changes to bring UML up to date with 2.5.40.

parent 7570df54
......@@ -30,11 +30,6 @@ PROFILE += -pg -DPROFILING
LINK_PROFILE = $(PROFILE) -Wl,--wrap,__monstartup
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/ \
$(ARCH_DIR)/drivers/ \
$(ARCH_DIR)/sys-$(SUBARCH)/
......
......@@ -409,7 +409,7 @@ void chan_interrupt(struct list_head *chans, struct tq_struct *task,
do {
if((tty != NULL) &&
(tty->flip.count >= TTY_FLIPBUF_SIZE)){
queue_task(task, &tq_timer);
schedule_task(task);
goto out;
}
err = chan->ops->read(chan->fd, &c, chan->data);
......
......@@ -406,7 +406,7 @@ static int ubd_add(int n)
ubd_gendisk[n].major = MAJOR_NR;
ubd_gendisk[n].first_minor = n << UBD_SHIFT;
ubd_gendisk[n].minor_shift = UBD_SHIFT;
ubd_gendisk[n].fops = &ubd_fops;
ubd_gendisk[n].fops = &ubd_blops;
if (fakehd_set)
sprintf(ubd_gendisk[n].disk_name, "hd%c", n + 'a');
else
......@@ -416,7 +416,7 @@ static int ubd_add(int n)
fake_gendisk[n].major = fake_major;
fake_gendisk[n].first_minor = n << UBD_SHIFT;
fake_gendisk[n].minor_shift = UBD_SHIFT;
fake_gendisk[n].fops = &ubd_fops;
fake_gendisk[n].fops = &ubd_blops;
sprintf(fake_gendisk[n].disk_name, "ubd%d", n);
}
......@@ -445,7 +445,7 @@ static int ubd_add(int n)
if(real == NULL) return(-1);
ubd_dev[n].real = real;
make_ide_entries(ubd_gendisk[n].name);
make_ide_entries(ubd_gendisk[n].disk_name);
return(0);
}
......@@ -863,6 +863,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
return(-EFAULT);
return(0);
}
return(-EINVAL);
}
static int ubd_revalidate(kdev_t rdev)
......
......@@ -9,7 +9,7 @@
#define DSISR_WRITE 0x02000000
#define SC_FAULT_ADDR(sc) ({ \
struct sigcontext_struct *_sc = (sc); \
struct sigcontext *_sc = (sc); \
long retval = -1; \
switch (_sc->regs->trap) { \
case 0x300: \
......@@ -27,7 +27,7 @@
})
#define SC_FAULT_WRITE(sc) ({ \
struct sigcontext_struct *_sc = (sc); \
struct sigcontext *_sc = (sc); \
long retval = -1; \
switch (_sc->regs->trap) { \
case 0x300: \
......
......@@ -101,12 +101,12 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
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, signr);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
}
sp = PT_REGS_SP(regs);
......@@ -188,11 +188,11 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
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);
while (1) {
current->state = TASK_INTERRUPTIBLE;
......@@ -214,11 +214,11 @@ int sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
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);
while (1) {
current->state = TASK_INTERRUPTIBLE;
......@@ -234,13 +234,13 @@ int sys_sigreturn(struct pt_regs regs)
void *mask = sp_to_mask(PT_REGS_SP(&regs));
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),
sizeof(current->blocked.sig[0]));
copy_from_user(&current->blocked.sig[1], mask, sig_size);
sigdelsetmask(&current->blocked, ~_BLOCKABLE);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
copy_sc_from_user(current->thread.regs.regs.sc, sc,
&signal_frame_sc.arch);
return(PT_REGS_SYSCALL_RET(&current->thread.regs));
......@@ -252,11 +252,11 @@ int sys_rt_sigreturn(struct pt_regs regs)
void *mask = sp_to_rt_mask(PT_REGS_SP(&regs));
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);
sigdelsetmask(&current->blocked, ~_BLOCKABLE);
recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock);
spin_unlock_irq(&current->sig->siglock);
copy_sc_from_user(current->thread.regs.regs.sc, sc,
&signal_frame_sc.arch);
return(PT_REGS_SYSCALL_RET(&current->thread.regs));
......
......@@ -416,7 +416,7 @@ int nsegfaults = 0;
void segv_handler(int sig, struct uml_pt_regs *regs)
{
struct sigcontext_struct *context = regs->sc;
struct sigcontext *context = regs->sc;
int index;
if(regs->is_user && !SEGV_IS_FIXABLE(context)){
......
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