diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/config.in | 36 | ||||
-rw-r--r-- | arch/mips/defconfig | 55 | ||||
-rw-r--r-- | arch/mips/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/mips_ksyms.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/ptrace.c | 6 | ||||
-rw-r--r-- | arch/mips/kernel/scall_o32.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/signal.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/syscall.c | 19 | ||||
-rw-r--r-- | arch/mips/kernel/sysirix.c | 54 | ||||
-rw-r--r-- | arch/mips/kernel/time.c | 28 | ||||
-rw-r--r-- | arch/mips/mm/init.c | 7 |
11 files changed, 133 insertions, 84 deletions
diff --git a/arch/mips/config.in b/arch/mips/config.in index 8c66ff8c9..298e3d760 100644 --- a/arch/mips/config.in +++ b/arch/mips/config.in @@ -175,33 +175,35 @@ if [ "$CONFIG_NET" = "y" ]; then fi if [ "$CONFIG_SGI" != "y" ]; then - source drivers/net/hamradio/Config.in + source drivers/net/hamradio/Config.in - mainmenu_option next_comment - comment 'ISDN subsystem' - tristate 'ISDN support' CONFIG_ISDN - if [ "$CONFIG_ISDN" != "n" ]; then - source drivers/isdn/Config.in - fi - endmenu + mainmenu_option next_comment + comment 'ISDN subsystem' - mainmenu_option next_comment - comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)' + if [ "$CONFIG_NET" != "n" ]; then + tristate 'ISDN support' CONFIG_ISDN + if [ "$CONFIG_ISDN" != "n" ]; then + source drivers/isdn/Config.in + fi + fi + endmenu - bool 'Support non-SCSI/IDE/ATAPI drives' CONFIG_CD_NO_IDESCSI - if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then - source drivers/cdrom/Config.in - fi - endmenu + + mainmenu_option next_comment + comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)' + + bool 'Support non-SCSI/IDE/ATAPI drives' CONFIG_CD_NO_IDESCSI + if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then + source drivers/cdrom/Config.in + fi + endmenu fi source drivers/char/Config.in source fs/Config.in -source fs/nls/Config.in - if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment comment 'Console drivers' diff --git a/arch/mips/defconfig b/arch/mips/defconfig index 1b9ec2d0d..0b3de2ffe 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig @@ -142,6 +142,7 @@ CONFIG_SCSI_CONSTANTS=y # SCSI low-level drivers # # CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 is not set # CONFIG_SCSI_AHA1740 is not set @@ -149,14 +150,16 @@ CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_DMA is not set # CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_EATA is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_NCR53C406A is not set # CONFIG_SCSI_NCR53C7xx is not set CONFIG_SCSI_NCR53C8XX=y @@ -210,6 +213,8 @@ CONFIG_PCNET32=y # CONFIG_NET_RADIO is not set # CONFIG_TR is not set # CONFIG_HOSTESS_SV11 is not set +# CONFIG_COSA is not set +# CONFIG_RCPCI is not set # CONFIG_WAN_DRIVERS is not set # CONFIG_LAPBETHER is not set # CONFIG_X25_ASY is not set @@ -250,9 +255,17 @@ CONFIG_SERIAL=m # CONFIG_MOUSE is not set # CONFIG_QIC02_TAPE is not set # CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set CONFIG_RTC=y + +# +# Video For Linux +# # CONFIG_VIDEO_DEV is not set -# CONFIG_NVRAM is not set + +# +# Joystick support +# # CONFIG_JOYSTICK is not set # @@ -264,35 +277,42 @@ CONFIG_RTC=y # Filesystems # CONFIG_QUOTA=y -CONFIG_MINIX_FS=m -CONFIG_EXT2_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y +CONFIG_AUTOFS_FS=m +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_UMSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_MINIX_FS=m +# CONFIG_NTFS_FS is not set +CONFIG_HPFS_FS=m CONFIG_PROC_FS=y +CONFIG_ROMFS_FS=m +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set CONFIG_NFS_FS=m -CONFIG_NFSD=m # CONFIG_NFSD_SUN is not set CONFIG_SUNRPC=m CONFIG_LOCKD=m -# CONFIG_CODA_FS is not set # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set -CONFIG_HPFS_FS=m -# CONFIG_NTFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -CONFIG_ROMFS_FS=m -CONFIG_AUTOFS_FS=m -# CONFIG_UFS_FS is not set + +# +# Partition Types +# # CONFIG_BSD_DISKLABEL is not set +# CONFIG_MAC_PARTITION is not set # CONFIG_SMD_DISKLABEL is not set # CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_MAC_PARTITION is not set CONFIG_NLS=y # @@ -323,6 +343,7 @@ CONFIG_NLS_ISO8859_6=m CONFIG_NLS_ISO8859_7=m CONFIG_NLS_ISO8859_8=m CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m # diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index cc4919bff..e7372fbc3 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c @@ -1,4 +1,4 @@ -/* $Id: irq.c,v 1.12 1998/06/30 00:21:49 ralf Exp $ +/* $Id: irq.c,v 1.13 1999/01/03 17:50:50 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 @@ -334,7 +334,7 @@ unsigned long probe_irq_on (void) } /* wait for spurious interrupts to mask themselves out again */ - for (delay = jiffies + HZ/10; delay > jiffies; ) + for (delay = jiffies + HZ/10; time_before(jiffies, delay); ) /* about 100ms delay */; /* now filter out any obviously spurious interrupts */ diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index 38bef5f56..302eee2b1 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c @@ -1,4 +1,4 @@ -/* $Id: mips_ksyms.c,v 1.13 1999/02/07 21:56:32 ulfc Exp $ +/* $Id: mips_ksyms.c,v 1.14 1999/02/09 22:54:10 adevries Exp $ * * Export MIPS-specific functions needed for loadable modules. * @@ -50,6 +50,7 @@ EXPORT_SYMBOL_NOVERS(strncat); EXPORT_SYMBOL_NOVERS(strnlen); EXPORT_SYMBOL_NOVERS(strrchr); EXPORT_SYMBOL_NOVERS(strtok); +EXPORT_SYMBOL_NOVERS(strpbrk); EXPORT_SYMBOL(clear_page); EXPORT_SYMBOL(__mips_bh_counter); diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index ac7bfb771..6fb6735fd 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -1,4 +1,4 @@ -/* $Id: ptrace.c,v 1.9 1998/09/19 19:16:16 ralf Exp $ +/* $Id: ptrace.c,v 1.10 1999/01/03 17:50:52 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 @@ -337,7 +337,9 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) case PTRACE_PEEKDATA: { unsigned long tmp; + down(&child->mm->mmap_sem); res = read_long(child, addr, &tmp); + up(&child->mm->mmap_sem); if (res < 0) goto out; res = put_user(tmp,(unsigned long *) data); @@ -406,7 +408,9 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) case PTRACE_POKETEXT: /* write the word at location addr. */ case PTRACE_POKEDATA: + down(&child->mm->mmap_sem); res = write_long(child,addr,data); + up(&child->mm->mmap_sem); goto out; case PTRACE_POKEUSR: { diff --git a/arch/mips/kernel/scall_o32.S b/arch/mips/kernel/scall_o32.S index 42cb4311d..b31a8b18e 100644 --- a/arch/mips/kernel/scall_o32.S +++ b/arch/mips/kernel/scall_o32.S @@ -44,6 +44,7 @@ NESTED(handle_sys, PT_SIZE, sp) beqz t2, illegal_syscall; subu t0, t3, 5 # 5 or more arguments? + sw a3, PT_R26(sp) # save a3 for syscall restarting bgez t0, stackargs stack_done: diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index bca8b228f..c9d832c92 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.16 1998/08/25 09:14:41 ralf Exp $ +/* $Id: signal.c,v 1.17 1998/08/28 23:29:05 tsbogend Exp $ * * linux/arch/mips/kernel/signal.c * @@ -392,6 +392,7 @@ static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) } /* fallthrough */ case ERESTARTNOINTR: /* Userland will reload $v0. */ + regs->regs[7] = regs->regs[26]; regs->cp0_epc -= 8; } @@ -525,6 +526,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) if (regs->regs[2] == ERESTARTNOHAND || regs->regs[2] == ERESTARTSYS || regs->regs[2] == ERESTARTNOINTR) { + regs->regs[7] = regs->regs[26]; regs->cp0_epc -= 8; } } diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 11415b79f..67e550cf3 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -1,10 +1,10 @@ -/* $Id: syscall.c,v 1.10 1998/08/20 14:38:40 ralf Exp $ +/* $Id: syscall.c,v 1.9 1998/08/25 09:14:41 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 * for more details. * - * Copyright (C) 1995 - 1998 by Ralf Baechle + * Copyright (C) 1995 - 1999 by Ralf Baechle * * TODO: Implement the compatibility syscalls. * Don't waste that much memory for empty entries in the syscall @@ -80,11 +80,10 @@ out: asmlinkage int sys_idle(void) { unsigned long start_idle = 0; - int ret = -EPERM; - lock_kernel(); if (current->pid != 0) - goto out; + return -EPERM; + /* endless idle loop with no priority at all */ current->priority = 0; current->counter = 0; @@ -110,10 +109,8 @@ asmlinkage int sys_idle(void) start_idle = 0; schedule(); } - ret = 0; -out: - unlock_kernel(); - return ret; + + return 0; } asmlinkage int sys_fork(struct pt_regs regs) @@ -121,9 +118,7 @@ asmlinkage int sys_fork(struct pt_regs regs) int res; save_static(®s); - lock_kernel(); res = do_fork(SIGCHLD, regs.regs[29], ®s); - unlock_kernel(); return res; } @@ -134,13 +129,11 @@ asmlinkage int sys_clone(struct pt_regs regs) int res; save_static(®s); - lock_kernel(); clone_flags = regs.regs[4]; newsp = regs.regs[5]; if (!newsp) newsp = regs.regs[29]; res = do_fork(clone_flags, newsp, ®s); - unlock_kernel(); return res; } diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index e6c27cd52..0c4503da5 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c @@ -1,4 +1,4 @@ -/* $Id: sysirix.c,v 1.14 1999/02/01 01:28:56 ralf Exp $ +/* $Id: sysirix.c,v 1.15 1999/02/06 05:12:57 adevries Exp $ * * sysirix.c: IRIX system call emulation. * @@ -2020,6 +2020,7 @@ out: asmlinkage int irix_ngetdents(unsigned int fd, void * dirent, unsigned int count, int *eob) { struct file *file; + struct dentry *dentry; struct inode *inode; struct irix_dirent32 *lastdirent; struct irix_dirent32_callback buf; @@ -2031,44 +2032,55 @@ asmlinkage int irix_ngetdents(unsigned int fd, void * dirent, unsigned int count current->pid, fd, dirent, count, eob); #endif error = -EBADF; - if (!(file = fget(fd))) + file = fget(fd); + if (!file) goto out; - /* Shouldn't it be ENOENT? */ - inode = file->f_dentry->d_inode; - if (!inode) - goto out_f; - - error = -ENOTDIR; - if (!file->f_op || !file->f_op->readdir) - goto out_f; + dentry = file->f_dentry; + if (!dentry) + goto out_putf; - error = -EFAULT; - if(!access_ok(VERIFY_WRITE, dirent, count) || - !access_ok(VERIFY_WRITE, eob, sizeof(*eob))) - goto out_f; + inode = dentry->d_inode; + if (!inode) + goto out_putf; - __put_user(0, eob); buf.current_dir = (struct irix_dirent32 *) dirent; buf.previous = NULL; buf.count = count; buf.error = 0; + error = -ENOTDIR; + if (!file->f_op || !file->f_op->readdir) + goto out_putf; + + /* + * Get the inode's semaphore to prevent changes + * to the directory while we read it. + */ + down(&inode->i_sem); error = file->f_op->readdir(file, &buf, irix_filldir32); + up(&inode->i_sem); if (error < 0) - goto out_f; + goto out_putf; + error = buf.error; lastdirent = buf.previous; - if (!lastdirent) { - error = buf.error; - goto out_f; + if (lastdirent) { + put_user(file->f_pos, &lastdirent->d_off); + error = count - buf.count; + } + + if (put_user(0, eob) < 0) { + error = EFAULT; + goto out_putf; } - lastdirent->d_off = (u32) file->f_pos; + + #ifdef DEBUG_GETDENTS printk("eob=%d returning %d\n", *eob, count - buf.count); #endif error = count - buf.count; -out_f: +out_putf: fput(file); out: unlock_kernel(); diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index cab6598db..1491da82d 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -1,4 +1,4 @@ -/* $Id: time.c,v 1.9 1999/01/04 16:03:49 ralf Exp $ +/* $Id: time.c,v 1.10 1999/02/01 01:26:32 ralf Exp $ * * Copyright (C) 1991, 1992, 1995 Linus Torvalds * Copyright (C) 1996, 1997, 1998 Ralf Baechle @@ -253,9 +253,11 @@ void do_settimeofday(struct timeval *tv) } xtime = *tv; - time_state = TIME_BAD; - time_maxerror = MAXPHASE; - time_esterror = MAXPHASE; + time_adjust = 0; /* stop active adjtime() */ + time_status |= STA_UNSYNC; + time_state = TIME_ERROR; /* p. 24, (a) */ + time_maxerror = NTP_PHASE_LIMIT; + time_esterror = NTP_PHASE_LIMIT; sti(); } @@ -265,6 +267,9 @@ void do_settimeofday(struct timeval *tv) * nowtime is written into the registers of the CMOS clock, it will * jump to the next second precisely 500 ms later. Check the Motorola * MC146818A or Dallas DS12887 data sheet for details. + * + * BUG: This routine does not handle hour overflow properly; it just + * sets the minutes. Usually you won't notice until after reboot! */ static int set_rtc_mmss(unsigned long nowtime) { @@ -301,8 +306,12 @@ static int set_rtc_mmss(unsigned long nowtime) } CMOS_WRITE(real_seconds,RTC_SECONDS); CMOS_WRITE(real_minutes,RTC_MINUTES); - } else - retval = -1; + } else { + printk(KERN_WARNING + "set_rtc_mmss: can't update from %d to %d\n", + cmos_minutes, real_minutes); + retval = -1; + } /* The following flags have to be released exactly in this order, * otherwise the DS12887 (popular MC146818A clone with integrated @@ -353,9 +362,10 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be * called as close as possible to 500 ms before the new second starts. */ - if (time_state != TIME_BAD && xtime.tv_sec > last_rtc_update + 660 && - xtime.tv_usec > 500000 - (tick >> 1) && - xtime.tv_usec < 500000 + (tick >> 1)) + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec >= 500000 - ((unsigned) tick) / 2 && + xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) if (set_rtc_mmss(xtime.tv_sec) == 0) last_rtc_update = xtime.tv_sec; else diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index f7fa99a37..5a9b651ff 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.9 1998/09/19 19:16:18 ralf Exp $ +/* $Id: init.c,v 1.10 1999/01/04 16:03:53 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 @@ -132,6 +132,7 @@ static inline unsigned long setup_zero_pages(void) pg = MAP_NR(empty_zero_page); while(pg < MAP_NR(empty_zero_page) + (1 << order)) { set_bit(PG_reserved, &mem_map[pg].flags); + atomic_set(&mem_map[pg].count, 0); pg++; } @@ -293,8 +294,9 @@ __initfunc(void mem_init(unsigned long start_mem, unsigned long end_mem)) #endif end_mem &= PAGE_MASK; - max_mapnr = num_physpages = MAP_NR(end_mem); + max_mapnr = MAP_NR(end_mem); high_memory = (void *)end_mem; + num_physpages = 0; /* mark usable pages in the mem_map[] */ start_mem = PAGE_ALIGN(start_mem); @@ -324,6 +326,7 @@ __initfunc(void mem_init(unsigned long start_mem, unsigned long end_mem)) datapages++; continue; } + num_physpages++; atomic_set(&mem_map[MAP_NR(tmp)].count, 1); #ifdef CONFIG_BLK_DEV_INITRD if (!initrd_start || (tmp < initrd_start || tmp >= |