From: Andy P. <at...@us...> - 2002-04-09 17:07:26
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel In directory usw-pr-cvs1:/tmp/cvs-serv15874/parisc/kernel Modified Files: cache.c ccio-dma.c ccio-rm-dma.c init_task.c irq.c pci-dma.c pci.c pdc_cons.c ptrace.c sba_iommu.c semaphore.c setup.c sys_parisc.c traps.c Log Message: synch 2.4.15 commit 30 Index: cache.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/cache.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: ccio-dma.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/ccio-dma.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- ccio-dma.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ ccio-dma.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -638,7 +638,7 @@ } -static int ccio_dma_supported( struct pci_dev *dev, dma_addr_t mask) +static int ccio_dma_supported( struct pci_dev *dev, u64 mask) { if (dev == NULL) { printk(MODULE_NAME ": EISA/ISA/et al not supported\n"); Index: ccio-rm-dma.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/ccio-rm-dma.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ccio-rm-dma.c 14 Jan 2001 19:56:04 -0000 1.1.1.1 +++ ccio-rm-dma.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -93,7 +93,7 @@ } -static int ccio_dma_supported( struct pci_dev *dev, dma_addr_t mask) +static int ccio_dma_supported( struct pci_dev *dev, u64 mask) { if (dev == NULL) { printk(MODULE_NAME ": EISA/ISA/et al not supported\n"); Index: init_task.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/init_task.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- init_task.c 14 Jan 2001 19:56:23 -0000 1.1.1.1 +++ init_task.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -6,7 +6,6 @@ #include <asm/pgtable.h> #include <asm/pgalloc.h> -static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; Index: irq.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/irq.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 Index: pci-dma.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/pci-dma.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- pci-dma.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ pci-dma.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -77,7 +77,7 @@ static inline void dump_resmap(void) {;} #endif -static int pa11_dma_supported( struct pci_dev *dev, dma_addr_t mask) +static int pa11_dma_supported( struct pci_dev *dev, u64 mask) { return 1; } Index: pci.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/pci.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: pdc_cons.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/pdc_cons.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pdc_cons.c 14 Jan 2001 19:56:45 -0000 1.1.1.1 +++ pdc_cons.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -141,11 +141,7 @@ --pdc_console_initialized; #ifdef CONFIG_VT_CONSOLE - { - /* fixme (needed?): Wait for console-tasklet to finish !*/ - extern struct tasklet_struct console_tasklet; - tasklet_schedule(&console_tasklet); - } + schedule_console_callback(); #endif unregister_console(&pdc_cons); Index: ptrace.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/ptrace.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ptrace.c 14 Jan 2001 19:56:47 -0000 1.1.1.1 +++ ptrace.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -31,6 +31,20 @@ #define PT_SINGLESTEP 0x10000 #define PT_BLOCKSTEP 0x20000 +/* + * Called by kernel/ptrace.c when detaching.. + * + * Make sure single step bits etc are not set. + */ +void ptrace_disable(struct task_struct *child) +{ + /* make sure the trap bits are not set */ + pa_psw(child)->r = 0; + pa_psw(child)->t = 0; + pa_psw(child)->h = 0; + pa_psw(child)->l = 0; +} + long sys_ptrace(long request, pid_t pid, long addr, long data) { struct task_struct *child; @@ -61,32 +75,7 @@ goto out_tsk; if (request == PTRACE_ATTACH) { - if (child == current) - goto out_tsk; - if ((!child->dumpable || - (current->uid != child->euid) || - (current->uid != child->suid) || - (current->uid != child->uid) || - (current->gid != child->egid) || - (current->gid != child->sgid) || - (!cap_issubset(child->cap_permitted, current->cap_permitted)) || - (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) - goto out_tsk; - /* the same process cannot be attached many times */ - if (child->ptrace & PT_PTRACED) - goto out_tsk; - child->ptrace |= PT_PTRACED; - if (child->p_pptr != current) { - unsigned long flags; - - write_lock_irqsave(&tasklist_lock, flags); - REMOVE_LINKS(child); - child->p_pptr = current; - SET_LINKS(child); - write_unlock_irqrestore(&tasklist_lock, flags); - } - send_sig(SIGSTOP, child, 1); - ret = 0; + ret = ptrace_attach(child); goto out_tsk; } ret = -ESRCH; @@ -251,17 +240,8 @@ goto out_wake; case PTRACE_DETACH: - ret = -EIO; - if ((unsigned long) data > _NSIG) - goto out_tsk; - child->ptrace &= ~(PT_PTRACED|PT_TRACESYS|PT_SINGLESTEP|PT_BLOCKSTEP); - child->exit_code = data; - write_lock_irq(&tasklist_lock); - REMOVE_LINKS(child); - child->p_pptr = child->p_opptr; - SET_LINKS(child); - write_unlock_irq(&tasklist_lock); - goto out_wake_notrap; + ret = ptrace_detach(child, data); + goto out_tsk; default: ret = -EIO; Index: sba_iommu.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/sba_iommu.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- sba_iommu.c 25 Feb 2001 23:15:23 -0000 1.1.1.2 +++ sba_iommu.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -779,7 +779,7 @@ } static int -sba_dma_supported( struct pci_dev *dev, dma_addr_t mask) +sba_dma_supported( struct pci_dev *dev, u64 mask) { if (dev == NULL) { printk(MODULE_NAME ": EISA/ISA/et al not supported\n"); Index: semaphore.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/semaphore.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- semaphore.c 14 Jan 2001 19:56:55 -0000 1.1.1.1 +++ semaphore.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -129,111 +129,3 @@ { return waking_non_zero_trylock(sem); } - - -/* Wait for the lock to become unbiased. Readers - * are non-exclusive. =) - */ -void down_read_failed(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - __up_read(sem); /* this takes care of granting the lock */ - - add_wait_queue(&sem->wait, &wait); - - while (atomic_read(&sem->count) < 0) { - set_task_state(current, TASK_UNINTERRUPTIBLE); - if (atomic_read(&sem->count) >= 0) - break; - schedule(); - } - - remove_wait_queue(&sem->wait, &wait); - current->state = TASK_RUNNING; -} - -void down_read_failed_biased(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - add_wait_queue(&sem->wait, &wait); /* put ourselves at the head of the list */ - - for (;;) { - if (sem->read_bias_granted && xchg(&sem->read_bias_granted, 0)) - break; - set_task_state(current, TASK_UNINTERRUPTIBLE); - if (!sem->read_bias_granted) - schedule(); - } - - remove_wait_queue(&sem->wait, &wait); - current->state = TASK_RUNNING; -} - - -/* Wait for the lock to become unbiased. Since we're - * a writer, we'll make ourselves exclusive. - */ -void down_write_failed(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - __up_write(sem); /* this takes care of granting the lock */ - - add_wait_queue_exclusive(&sem->wait, &wait); - - while (atomic_read(&sem->count) < 0) { - set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); - if (atomic_read(&sem->count) >= 0) - break; /* we must attempt to aquire or bias the lock */ - schedule(); - } - - remove_wait_queue(&sem->wait, &wait); - current->state = TASK_RUNNING; -} - -void down_write_failed_biased(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - add_wait_queue_exclusive(&sem->write_bias_wait, &wait); /* put ourselves at the end of the list */ - - for (;;) { - if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) - break; - set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); - if (!sem->write_bias_granted) - schedule(); - } - - remove_wait_queue(&sem->write_bias_wait, &wait); - current->state = TASK_RUNNING; - - /* if the lock is currently unbiased, awaken the sleepers - * FIXME: this wakes up the readers early in a bit of a - * stampede -> bad! - */ - if (atomic_read(&sem->count) >= 0) - wake_up(&sem->wait); -} - - -/* Called when someone has done an up that transitioned from - * negative to non-negative, meaning that the lock has been - * granted to whomever owned the bias. - */ -void rwsem_wake_readers(struct rw_semaphore *sem) -{ - if (xchg(&sem->read_bias_granted, 1)) - BUG(); - wake_up(&sem->wait); -} - -void rwsem_wake_writer(struct rw_semaphore *sem) -{ - if (xchg(&sem->write_bias_granted, 1)) - BUG(); - wake_up(&sem->write_bias_wait); -} Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/setup.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 Index: sys_parisc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/sys_parisc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sys_parisc.c 14 Jan 2001 19:57:00 -0000 1.1.1.1 +++ sys_parisc.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -51,7 +51,7 @@ struct file * file = NULL; int error; - down(¤t->mm->mmap_sem); + down_write(¤t->mm->mmap_sem); lock_kernel(); if (!(flags & MAP_ANONYMOUS)) { error = -EBADF; @@ -65,7 +65,7 @@ fput(file); out: unlock_kernel(); - up(¤t->mm->mmap_sem); + up_write(¤t->mm->mmap_sem); return error; } Index: traps.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/traps.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- traps.c 14 Jan 2001 19:57:06 -0000 1.1.1.1 +++ traps.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -82,7 +82,7 @@ printk(" YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI\nPSW: "); printbinary(regs->gr[0], 32); - printk("\n"); + printk(" %s\n", print_tainted()); for (i = 0; i < 32; i += 4) { int j; |