diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-06-17 13:25:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-06-17 13:25:08 +0000 |
commit | 59223edaa18759982db0a8aced0e77457d10c68e (patch) | |
tree | 89354903b01fa0a447bffeefe00df3044495db2e /arch/mips/kernel | |
parent | db7d4daea91e105e3859cf461d7e53b9b77454b2 (diff) |
Merge with Linux 2.3.6. Sorry, this isn't tested on silicon, I don't
have a MIPS box at hand.
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/init_task.c | 6 | ||||
-rw-r--r-- | arch/mips/kernel/irixelf.c | 45 | ||||
-rw-r--r-- | arch/mips/kernel/irixsig.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/ptrace.c | 21 | ||||
-rw-r--r-- | arch/mips/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/signal.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/sysirix.c | 11 |
8 files changed, 36 insertions, 62 deletions
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c index 90ae6952f..2ce7885c5 100644 --- a/arch/mips/kernel/init_task.c +++ b/arch/mips/kernel/init_task.c @@ -9,7 +9,7 @@ static struct fs_struct init_fs = INIT_FS; static struct files * init_fd_array[NR_OPEN] = { NULL, }; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; -struct mm_struct init_mm = INIT_MM; +struct mm_struct init_mm = INIT_MM(init_mm); /* * Initial task structure. @@ -21,4 +21,6 @@ struct mm_struct init_mm = INIT_MM; * * The things we do for performance.. */ -union task_union init_task_union __attribute__((__section__(".text"))) = { INIT_TASK }; +union task_union init_task_union + __attribute__((__section__(".text"))) = + { INIT_TASK(init_task_union.task) }; diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 38fab1e16..8c55d335e 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -1,4 +1,4 @@ -/* $Id: irixelf.c,v 1.15 1999/01/04 16:03:48 ralf Exp $ +/* $Id: irixelf.c,v 1.16.2.2 1999/06/14 21:40:54 ralf Exp $ * * irixelf.c: Code to load IRIX ELF executables which conform to * the MIPS ABI. @@ -133,9 +133,7 @@ static void set_brk(unsigned long start, unsigned long end) end = PAGE_ALIGN(end); if (end <= start) return; - do_mmap(NULL, start, end - start, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_FIXED | MAP_PRIVATE, 0); + do_brk(start, end - start); } @@ -395,9 +393,7 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex, /* Map the last of the bss segment */ if (last_bss > len) { - do_mmap(NULL, len, (last_bss - len), - PROT_READ|PROT_WRITE|PROT_EXEC, - MAP_FIXED|MAP_PRIVATE, 0); + do_brk(len, (last_bss - len)); } kfree(elf_phdata); @@ -590,8 +586,7 @@ void irix_map_prda_page (void) unsigned long v; struct prda *pp; - v = do_mmap (NULL, PRDA_ADDRESS, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_FIXED | MAP_PRIVATE, 0); + v = do_brk (PRDA_ADDRESS, PAGE_SIZE); if (v < 0) return; @@ -618,7 +613,7 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm, unsigned int load_addr, elf_bss, elf_brk; unsigned int elf_entry, interp_load_addr = 0; unsigned int start_code, end_code, end_data, elf_stack; - int elf_exec_fileno, retval, has_interp, has_ephdr, i; + int elf_exec_fileno, retval, has_interp, has_ephdr, size, i; char *elf_interpreter; mm_segment_t old_fs; @@ -635,13 +630,13 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm, #endif /* Now read in all of the header information */ - elf_phdata = (struct elf_phdr *) kmalloc(elf_ex.e_phentsize * - elf_ex.e_phnum, GFP_KERNEL); + size = elf_ex.e_phentsize * elf_ex.e_phnum; + elf_phdata = (struct elf_phdr *) kmalloc(size, GFP_KERNEL); if (elf_phdata == NULL) return -ENOMEM; - retval = read_exec(bprm->dentry, elf_ex.e_phoff, (char *) elf_phdata, - elf_ex.e_phentsize * elf_ex.e_phnum, 1); + retval = read_exec(bprm->dentry, elf_ex.e_phoff, + (char *) elf_phdata, size, 1); if (retval < 0) { kfree (elf_phdata); return retval; @@ -733,7 +728,7 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm, * change some of these later. */ current->mm->rss = 0; - bprm->p = setup_arg_pages(bprm->p, bprm); + setup_arg_pages(bprm); current->mm->start_stack = bprm->p; /* At this point, we assume that the image should be loaded at @@ -803,12 +798,12 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm, padzero(elf_bss); #ifdef DEBUG_ELF - printk("(start_brk) %08lx\n" , current->mm->start_brk); - printk("(end_code) %08lx\n" , current->mm->end_code); - printk("(start_code) %08lx\n" , current->mm->start_code); - printk("(end_data) %08lx\n" , current->mm->end_data); - printk("(start_stack) %08lx\n" , current->mm->start_stack); - printk("(brk) %08lx\n" , current->mm->brk); + printk("(start_brk) %lx\n" , (long) current->mm->start_brk); + printk("(end_code) %lx\n" , (long) current->mm->end_code); + printk("(start_code) %lx\n" , (long) current->mm->start_code); + printk("(end_data) %lx\n" , (long) current->mm->end_data); + printk("(start_stack) %lx\n" , (long) current->mm->start_stack); + printk("(brk) %lx\n" , (long) current->mm->brk); #endif #if 0 /* XXX No fucking way dude... */ @@ -932,9 +927,7 @@ static inline int do_load_irix_library(int fd) len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000; bss = elf_phdata->p_memsz + elf_phdata->p_vaddr; if (bss > len) - do_mmap(NULL, len, bss-len, - PROT_READ|PROT_WRITE|PROT_EXEC, - MAP_FIXED|MAP_PRIVATE, 0); + do_brk(len, bss-len); kfree(elf_phdata); return 0; } @@ -1109,10 +1102,10 @@ static int writenote(struct memelfnote *men, struct file *file) #undef DUMP_SEEK #define DUMP_WRITE(addr, nr) \ - if (!dump_write(&file, (addr), (nr))) \ + if (!dump_write(file, (addr), (nr))) \ goto close_coredump; #define DUMP_SEEK(off) \ - if (!dump_seek(&file, (off))) \ + if (!dump_seek(file, (off))) \ goto close_coredump; /* Actual dumper. * diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 3aef18cb6..693d72110 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -3,7 +3,7 @@ * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * - * $Id: irixsig.c,v 1.9 1998/03/27 04:47:54 ralf Exp $ + * $Id: irixsig.c,v 1.10 1999/01/03 17:50:50 ralf Exp $ */ #include <linux/kernel.h> @@ -666,7 +666,7 @@ asmlinkage int irix_waitsys(int type, int pid, struct irix5_siginfo *info, int options, struct rusage *ru) { int flag, retval; - struct wait_queue wait = { current, NULL }; + DECLARE_WAITQUEUE(wait, current); struct task_struct *p; lock_kernel(); diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 3143829dc..a4f64b5fb 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.10 1998/08/25 09:14:40 ralf Exp $ +/* $Id: process.c,v 1.11 1999/01/03 17:50:51 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -149,7 +149,7 @@ void dump_thread(struct pt_regs *regs, struct user *dump) /* * Create a kernel thread */ -pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) +int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) { long retval; diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 71dd05e75..476f331ef 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -1,4 +1,4 @@ -/* $Id: ptrace.c,v 1.11 1999/02/15 02:16:51 ralf Exp $ +/* $Id: ptrace.c,v 1.12 1999/06/13 16:30:32 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -143,25 +143,6 @@ repeat: flush_tlb_page(vma, addr); } -static struct vm_area_struct * find_extend_vma(struct task_struct * tsk, unsigned long addr) -{ - struct vm_area_struct * vma; - - addr &= PAGE_MASK; - vma = find_vma(tsk->mm, addr); - if (!vma) - return NULL; - if (vma->vm_start <= addr) - return vma; - if (!(vma->vm_flags & VM_GROWSDOWN)) - return NULL; - if (vma->vm_end - addr > tsk->rlim[RLIMIT_STACK].rlim_cur) - return NULL; - vma->vm_offset -= vma->vm_start - addr; - vma->vm_start = addr; - return vma; -} - /* * This routine checks the page boundaries, and that the offset is * within the task area. It then calls get_long() to read a long. diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 9af079b7d..5040f5f15 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.14 1999/05/01 12:23:45 harald Exp $ +/* $Id: setup.c,v 1.15 1999/05/01 22:40:37 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -28,6 +28,7 @@ #ifdef CONFIG_BLK_DEV_RAM #include <linux/blk.h> #endif +#include <linux/ide.h> #ifdef CONFIG_RTC #include <linux/ioport.h> #include <linux/timex.h> @@ -36,7 +37,6 @@ #include <asm/asm.h> #include <asm/bootinfo.h> #include <asm/cachectl.h> -#include <asm/ide.h> #include <asm/io.h> #include <asm/stackframe.h> #include <asm/system.h> diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index c9d832c92..604320e01 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.17 1998/08/28 23:29:05 tsbogend Exp $ +/* $Id: signal.c,v 1.18 1999/02/15 02:16:52 ralf Exp $ * * linux/arch/mips/kernel/signal.c * @@ -504,6 +504,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) default: lock_kernel(); sigaddset(¤t->signal, signr); + recalc_sigpending(current); current->flags |= PF_SIGNALED; do_exit(exit_code); /* NOTREACHED */ diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 5464524f6..338a1ce11 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c @@ -1,4 +1,4 @@ -/* $Id: sysirix.c,v 1.18 1999/05/01 22:40:38 ralf Exp $ +/* $Id: sysirix.c,v 1.19 1999/06/13 16:30:33 ralf Exp $ * * sysirix.c: IRIX system call emulation. * @@ -571,7 +571,7 @@ asmlinkage int irix_brk(unsigned long brk) * Check against existing mmap mappings. */ if (find_vma_intersection(mm, oldbrk, newbrk+PAGE_SIZE)) { - return -ENOMEM; + ret = -ENOMEM; goto out; } @@ -579,7 +579,7 @@ asmlinkage int irix_brk(unsigned long brk) * Check if we have enough memory.. */ if (!vm_enough_memory((newbrk-oldbrk) >> PAGE_SHIFT)) { - return -ENOMEM; + ret = -ENOMEM; goto out; } @@ -587,10 +587,7 @@ asmlinkage int irix_brk(unsigned long brk) * Ok, looks good - let it rip. */ mm->brk = brk; - do_mmap(NULL, oldbrk, newbrk-oldbrk, - PROT_READ|PROT_WRITE|PROT_EXEC, - MAP_FIXED|MAP_PRIVATE, 0); - + do_brk(oldbrk, newbrk-oldbrk); ret = 0; out: |