From: Andy P. <at...@us...> - 2002-04-10 18:32:32
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22 In directory usw-pr-cvs1:/tmp/cvs-serv18937/mips64/sgi-ip22 Modified Files: ip22-berr.c ip22-hpc.c ip22-int.c ip22-irq.S ip22-mc.c ip22-reset.c ip22-rtc.c ip22-sc.c ip22-setup.c ip22-timer.c system.c time.c Log Message: synch 2.4.15 commit 38 Index: ip22-berr.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-berr.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-berr.c 14 Jan 2001 19:54:29 -0000 1.1.1.1 +++ ip22-berr.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. @@ -9,6 +8,9 @@ */ #include <linux/init.h> #include <linux/kernel.h> +#include <linux/module.h> + +#include <asm/module.h> #include <asm/uaccess.h> #include <asm/paccess.h> #include <asm/addrspace.h> @@ -41,16 +43,43 @@ return 0; } +extern spinlock_t modlist_lock; + static inline unsigned long search_dbe_table(unsigned long addr) { - unsigned long ret; + unsigned long ret = 0; +#ifndef CONFIG_MODULES /* There is only the kernel to search. */ ret = search_one_table(__start___dbe_table, __stop___dbe_table-1, addr); - if (ret) return ret; - - return 0; + return ret; +#else + unsigned long flags; + + /* The kernel is the last "module" -- no need to treat it special. */ + struct module *mp; + struct archdata *ap; + + spin_lock_irqsave(&modlist_lock, flags); + for (mp = module_list; mp != NULL; mp = mp->next) { + if (!mod_member_present(mp, archdata_end) || + !mod_archdata_member_present(mp, struct archdata, + dbe_table_end)) + continue; + ap = (struct archdata *)(mod->archdata_start); + + if (ap->dbe_table_start == NULL || + !(mp->flags & (MOD_RUNNING | MOD_INITIALIZING))) + continue; + ret = search_one_table(ap->dbe_table_start, + ap->dbe_table_end - 1, addr); + if (ret) + break; + } + spin_unlock_irqrestore(&modlist_lock, flags); + return ret; +#endif } void do_ibe(struct pt_regs *regs) Index: ip22-hpc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-hpc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-hpc.c 14 Jan 2001 19:54:29 -0000 1.1.1.1 +++ ip22-hpc.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,9 +1,8 @@ -/* $Id$ - * +/* * ip22-hpc.c: Routines for generic manipulation of the HPC controllers. * * Copyright (C) 1996 David S. Miller (dm...@en...) - * Copyright (C) 1998, 1999 Ralf Baechle + * Copyright (C) 1998, 1999, 2001 Ralf Baechle */ #include <linux/init.h> #include <linux/types.h> @@ -11,7 +10,6 @@ #include <asm/addrspace.h> #include <asm/sgi/sgihpc.h> #include <asm/sgi/sgint23.h> -#include <asm/sgialib.h> #include <asm/bootinfo.h> #undef DEBUG_SGIHPC Index: ip22-int.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-int.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- ip22-int.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ ip22-int.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -34,7 +34,6 @@ #include <asm/sgi/sgi.h> #include <asm/sgi/sgihpc.h> #include <asm/sgi/sgint23.h> -#include <asm/sgialib.h> /* * Linux has a controller-independent x86 interrupt architecture. @@ -287,9 +286,7 @@ irq_enter(cpu, irq); kstat.irqs[0][irq]++; - printk("Got irq %d, press a key.", irq); - prom_getchar(); - ArcEnterInteractiveMode(); + panic(KERN_DEBUG "Got irq %d, press a key.", irq); /* * mask and ack quickly, we don't want the irq controller Index: ip22-irq.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-irq.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-irq.S 14 Jan 2001 19:54:32 -0000 1.1.1.1 +++ ip22-irq.S 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: ip22-mc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-mc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-mc.c 14 Jan 2001 19:54:33 -0000 1.1.1.1 +++ ip22-mc.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,12 +1,10 @@ -/* $Id$ - * +/* * 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. * - * indy_mc.c: Routines for manipulating the INDY memory controller. - * * Copyright (C) 1996 David S. Miller (dm...@en...) + * Copyright (C) 2001 Ralf Baechle (ra...@gn...) */ #include <linux/init.h> #include <linux/kernel.h> @@ -15,7 +13,6 @@ #include <asm/ptrace.h> #include <asm/sgi/sgimc.h> #include <asm/sgi/sgihpc.h> -#include <asm/sgialib.h> /* #define DEBUG_SGIMC */ Index: ip22-reset.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-reset.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-reset.c 14 Jan 2001 19:54:33 -0000 1.1.1.1 +++ ip22-reset.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,12 +1,11 @@ -/* $Id$ - * +/* * 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. * * Reset an IP22. * - * Copyright (C) 1997, 1998, 1999 by Ralf Baechle + * Copyright (C) 1997, 1998, 1999, 2001 by Ralf Baechle */ #include <linux/kernel.h> #include <linux/sched.h> Index: ip22-rtc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-rtc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-rtc.c 14 Jan 2001 19:54:34 -0000 1.1.1.1 +++ ip22-rtc.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,12 +1,11 @@ -/* $Id$ - * +/* * 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. * * RTC routines for Indy style attached Dallas chip. * - * Copyright (C) 1998 by Ralf Baechle + * Copyright (C) 1998, 2001 by Ralf Baechle */ #include <linux/mc146818rtc.h> #include <asm/sgi/sgihpc.h> Index: ip22-sc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-sc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-sc.c 14 Jan 2001 19:54:34 -0000 1.1.1.1 +++ ip22-sc.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,6 +1,5 @@ -/* $Id$ - * - * indy_sc.c: Indy cache managment functions. +/* + * indy_sc.c: Indy cache management functions. * * Copyright (C) 1997 Ralf Baechle (ra...@gn...), * derived from r4xx0.c by David S. Miller (dm...@en...). @@ -16,7 +15,6 @@ #include <asm/pgtable.h> #include <asm/system.h> #include <asm/bootinfo.h> -#include <asm/sgialib.h> #include <asm/mmu_context.h> /* Secondary cache size in bytes, if present. */ @@ -31,17 +29,17 @@ static inline void indy_sc_wipe(unsigned long first, unsigned long last) { - __asm__ __volatile__(" - .set noreorder - or %0, %4 # first line to flush - or %1, %4 # last line to flush -1: sw $0, 0(%0) - bne %0, %1, 1b - daddu %0, 32 - .set reorder" - : "=r" (first), "=r" (last) - : "0" (first), "1" (last), "r" (0x9000000080000000) - : "$1"); + __asm__ __volatile__( + ".set\tnoreorder\n\t" + "or\t%0, %4\t\t\t# first line to flush\n\t" + "or\t%1, %4\t\t\t# last line to flush\n" + "1:\tsw $0, 0(%0)\n\t" + "bne\t%0, %1, 1b\n\t" + "daddu\t%0, 32\n\t" + ".set reorder" + : "=r" (first), "=r" (last) + : "0" (first), "1" (last), "r" (0x9000000080000000) + : "$1"); } static void indy_sc_wback_invalidate(unsigned long addr, unsigned long size) Index: ip22-setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-setup.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-setup.c 14 Jan 2001 19:54:35 -0000 1.1.1.1 +++ ip22-setup.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. @@ -145,7 +144,7 @@ * graphics console, it is set to "d" for the first serial * line and "d2" for the second serial line. */ - ctype = ArcArcGetEnvironmentVariable("console"); + ctype = ArcGetEnvironmentVariable("console"); if(*ctype == 'd') { if(*(ctype+1)=='2') console_setup ("ttyS1"); Index: ip22-timer.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/ip22-timer.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip22-timer.c 14 Jan 2001 19:54:36 -0000 1.1.1.1 +++ ip22-timer.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * indy_timer.c: Setting up the clock on the INDY 8254 controller. * * Copyright (C) 1996 David S. Miller (dm...@en...) @@ -238,9 +237,7 @@ irq_enter(cpu, irq); kstat.irqs[0][irq]++; - printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n"); - prom_getchar(); - ArcEnterInteractiveMode(); + panic("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n"); irq_exit(cpu, irq); } Index: system.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/system.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- system.c 14 Jan 2001 19:54:36 -0000 1.1.1.1 +++ system.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. @@ -7,6 +6,7 @@ * system.c: Probe the system type using ARCS prom interface library. * * Copyright (C) 1996 David S. Miller (dm...@en...) + * Copyright (C) 2000, 2001 Ralf Baechle (ra...@gn...) */ #include <linux/init.h> #include <linux/kernel.h> @@ -17,8 +17,6 @@ #include <asm/sgialib.h> #include <asm/bootinfo.h> -enum sgi_mach sgimach; - struct smatch { char *name; int type; @@ -46,10 +44,7 @@ if(!strcmp(s, sgi_cputable[i].name)) return sgi_cputable[i].type; } - prom_printf("\nYeee, could not determine MIPS cpu type <%s>\n", s); - prom_printf("press a key to reboot\n"); - prom_getchar(); - ArcEnterInteractiveMode(); + panic("\nYeee, could not determine MIPS cpu type <%s>", s); return 0; } @@ -74,23 +69,16 @@ int ncpus = 0; if(p->type == Cpu) { - if(++ncpus > 1) { - prom_printf("\nYeee, SGI MP not ready yet\n"); - prom_printf("press a key to reboot\n"); - prom_getchar(); - ArcEnterInteractiveMode(); - } + if (++ncpus > 1) + panic("\nYeee, SGI MP not ready yet"); printk("CPU: %s ", p->iname); cpup = p; cputype = string_to_cpu(cpup->iname); } p = ArcGetPeer(p); } - if(cputype == -1) { - prom_printf("\nYeee, could not find cpu ARCS component\n"); - prom_printf("press a key to reboot\n"); - prom_getchar(); - ArcEnterInteractiveMode(); + if (cputype == -1) { + panic("\nYeee, could not find cpu ARCS component"); } p = ArcGetChild(cpup); while(p) { Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/mips64/sgi-ip22/time.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- time.c 14 Jan 2001 19:54:36 -0000 1.1.1.1 +++ time.c 10 Apr 2002 14:43:22 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. |