diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-08-21 22:19:10 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-08-21 22:19:10 +0000 |
commit | b5710aa33141544bf7cb9c3e509d587ff457a094 (patch) | |
tree | 40214b7ea9f82c8a48a9eaeb428c25c0565aee32 /arch/mips | |
parent | 892bf98f0c04e9297979936d973c85e62a3f0b96 (diff) |
Look ma - a tank has hit the MIPS sources ...
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/jazz/setup.c | 17 | ||||
-rw-r--r-- | arch/mips/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/kernel/init_task.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 5 | ||||
-rw-r--r-- | arch/mips/lib/strlen_user.S | 18 | ||||
-rw-r--r-- | arch/mips/lib/strncpy_user.S | 21 | ||||
-rw-r--r-- | arch/mips/lib/watch.S | 74 | ||||
-rw-r--r-- | arch/mips/mm/init.c | 47 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/setup.c | 14 | ||||
-rw-r--r-- | arch/mips/sni/setup.c | 15 |
10 files changed, 73 insertions, 142 deletions
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index 7ed33443a..e1120fe18 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.20 1999/02/25 21:57:47 tsbogend Exp $ +/* $Id: setup.c,v 1.21 1999/06/22 22:08:07 tsbogend Exp $ * * Setup pointers to hardware-dependent routines. * @@ -103,6 +103,21 @@ __initfunc(void jazz_setup(void)) ide_ops = &std_ide_ops; #endif conswitchp = &dummy_con; + +#warning "Somebody should check if screen_info is ok for Jazz." + + screen_info = (struct screen_info) { + 0, 0, /* orig-x, orig-y */ + 0, /* unused */ + 0, /* orig_video_page */ + 0, /* orig_video_mode */ + 160, /* orig_video_cols */ + 0, 0, 0, /* unused, ega_bx, unused */ + 64, /* orig_video_lines */ + 0, /* orig_video_isVGA */ + 16 /* orig_video_points */ + }; + rtc_ops = &jazz_rtc_ops; kbd_ops = &jazz_kbd_ops; fd_ops = &jazz_fd_ops; diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 58c4b85c2..89726e16d 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -72,8 +72,6 @@ endif # O_OBJS := $(sort $(O_OBJS)) -all: kernel.o head.o - entry.o: entry.S head.o: head.S diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c index 2ce7885c5..baad4538c 100644 --- a/arch/mips/kernel/init_task.c +++ b/arch/mips/kernel/init_task.c @@ -6,7 +6,7 @@ static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; -static struct files * init_fd_array[NR_OPEN] = { NULL, }; +static struct file * 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(init_mm); diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index fee47746d..4cc841d41 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1,4 +1,4 @@ -/* $Id: traps.c,v 1.23 1999/08/09 19:43:15 harald Exp $ +/* $Id: traps.c,v 1.24 1999/08/13 17:07:26 harald 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 @@ -324,7 +324,6 @@ static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode) return 0; } - void do_bp(struct pt_regs *regs) { unsigned int opcode, bcode; @@ -579,7 +578,7 @@ void set_except_vector(int n, void *addr) } } -__initfunc(void trap_init(void)) +void __init trap_init(void) { extern char except_vec0_nevada, except_vec0_r4000; extern char except_vec0_r4600, except_vec0_r2300; diff --git a/arch/mips/lib/strlen_user.S b/arch/mips/lib/strlen_user.S index 5f44c3eb4..a19e89d3c 100644 --- a/arch/mips/lib/strlen_user.S +++ b/arch/mips/lib/strlen_user.S @@ -1,13 +1,11 @@ -/* - * arch/mips/lib/strlen_user.S +/* $Id: strlen_user.S,v 1.2 1998/05/04 09:12:54 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) 1996, 1998 by Ralf Baechle - * - * $Id: strlen_user.S,v 1.3 1998/05/03 11:13:45 ralf Exp $ + * Copyright (c) 1996, 1998, 1999 by Ralf Baechle + * Copyright (c) 1999 Silicon Graphics, Inc. */ #include <asm/asm.h> #include <asm/offset.h> @@ -26,11 +24,11 @@ * Return 0 for error */ LEAF(__strlen_user_nocheck_asm) - lw v0, THREAD_CURDS($28) # pointer ok? - subu v0, zero, v0 - and v0, a0 - nor v0, zero, v0 - beqz v0, fault + LONG_L v0, THREAD_CURDS($28) # pointer ok? + LONG_SUBU v0, zero, v0 + and v0, a0 + not v0 + beqz v0, fault EXPORT(__strlen_user_asm) move v0, a0 1: EX(lb, t0, (v0), fault) diff --git a/arch/mips/lib/strncpy_user.S b/arch/mips/lib/strncpy_user.S index f3240475a..231ff8c9d 100644 --- a/arch/mips/lib/strncpy_user.S +++ b/arch/mips/lib/strncpy_user.S @@ -1,13 +1,10 @@ -/* - * arch/mips/lib/strncpy_user.S +/* $Id: strncpy_user.S,v 1.2 1998/05/04 09:12:54 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) 1996 by Ralf Baechle - * - * $Id: strncpy_user.S,v 1.3 1998/05/03 11:13:45 ralf Exp $ + * Copyright (c) 1996, 1999 by Ralf Baechle */ #include <linux/errno.h> #include <asm/asm.h> @@ -32,11 +29,11 @@ */ LEAF(__strncpy_from_user_asm) - lw v0, THREAD_CURDS($28) # pointer ok? - subu v0, zero, v0 - and v0, a1 - nor v0, zero, v0 - beqz v0, fault + LONG_L v0, THREAD_CURDS($28) # pointer ok? + LONG_SUBU v0, zero, v0 + and v0, a1 + not v0 + beqz v0, fault EXPORT(__strncpy_from_user_nocheck_asm) move v0,zero move v1,a1 @@ -55,9 +52,9 @@ EXPORT(__strncpy_from_user_nocheck_asm) jr ra # return n END(__strncpy_from_user_asm) -fault: li v0,-EFAULT +fault: li v0, -EFAULT jr ra .section __ex_table,"a" - PTR 1b,fault + PTR 1b, fault .previous diff --git a/arch/mips/lib/watch.S b/arch/mips/lib/watch.S index 351c734ff..ee9559522 100644 --- a/arch/mips/lib/watch.S +++ b/arch/mips/lib/watch.S @@ -1,12 +1,13 @@ -/* - * Kernel debug stuff to use the Watch registers. - * Useful to find stack overflows, dangling pointers etc. +/* $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. * - * Copyright (C) 1995, 1996 by Ralf Baechle + * Kernel debug stuff to use the Watch registers. + * Useful to find stack overflows, dangling pointers etc. + * + * Copyright (C) 1995, 1996, 1999 by Ralf Baechle */ #include <asm/asm.h> #include <asm/mipsregs.h> @@ -48,7 +49,6 @@ */ LEAF(__watch_reenable) lw t0,watch_savelo - jr ra mtc0 t0,CP0_WATCHLO END(__watch_reenable) @@ -59,67 +59,3 @@ .data watch_savelo: .word 0 .text - -/* - * The stuff below are just some kernel debugging gadgets. It is only here - * because it had to be somewhere and will go away. - */ - -/* - * Parameter: none - * Results : none - */ - LEAF(get_sp) - jr ra - move v0,sp - END(get_sp) - -/* - * Parameter: none - * Results : none - */ - LEAF(get_ra) - jr ra - move v0,ra - END(get_ra) - -/* - * Parameter: none - * Results : none - */ - LEAF(get_status) - jr ra - mfc0 v0,CP0_STATUS - END(get_status) - -/* - * Parameter: none - * Results : none - */ - NESTED(print_sp, ((5*SZREG)+ALSZ)&ALMASK, sp) - .mask 0x80000000,4*SZREG - PTR_SUBU sp,((5*SZREG)+ALSZ)&ALMASK - REG_S ra,4*SZREG(sp) - move a1,sp - PRINT("$sp == %08lx\n") - REG_L ra,4*SZREG(sp) - - jr ra - PTR_ADDU sp,((5*SZREG)+ALSZ)&ALMASK - END(print_sp) - -/* - * Parameter: none - * Results : none - */ - NESTED(print_st, ((5*SZREG)+ALSZ)&ALMASK, sp) - .mask 0x80000000,4*SZREG - PTR_SUBU sp,((5*SZREG)+ALSZ)&ALMASK - REG_S ra,4*SZREG(sp) - mfc0 a1,CP0_STATUS - PRINT("cp0_status == %08lx\n") - REG_L ra,4*SZREG(sp) - - jr ra - PTR_ADDU sp,((5*SZREG)+ALSZ)&ALMASK - END(print_st) diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index b694dd80c..a5f6037c7 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.16 1999/08/09 19:43:16 harald Exp $ +/* $Id: init.c,v 1.17 1999/08/20 21:59:02 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 @@ -176,43 +176,9 @@ int do_check_pgt_cache(int low, int high) pte_t * __bad_pagetable(void) { extern char empty_bad_page_table[PAGE_SIZE]; - unsigned long page; - unsigned long dummy1, dummy2; -#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) - unsigned long dummy3; -#endif + unsigned long page, dummy1, dummy2; page = (unsigned long) empty_bad_page_table; - /* - * As long as we only save the low 32 bit of the 64 bit wide - * R4000 registers on interrupt we cannot use 64 bit memory accesses - * to the main memory. - */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) - /* - * Use 64bit code even for Linux/MIPS 32bit on R4000 - */ - __asm__ __volatile__( - ".set\tnoreorder\n" - ".set\tnoat\n\t" - ".set\tmips3\n\t" - "dsll32\t$1,%2,0\n\t" - "dsrl32\t%2,$1,0\n\t" - "or\t%2,$1\n" - "1:\tsd\t%2,(%0)\n\t" - "subu\t%1,1\n\t" - "bnez\t%1,1b\n\t" - "addiu\t%0,8\n\t" - ".set\tmips0\n\t" - ".set\tat\n" - ".set\treorder" - :"=r" (dummy1), - "=r" (dummy2), - "=r" (dummy3) - :"0" (page), - "1" (PAGE_SIZE/8), - "2" (pte_val(BAD_PAGE))); -#else /* (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) */ __asm__ __volatile__( ".set\tnoreorder\n" "1:\tsw\t%2,(%0)\n\t" @@ -220,12 +186,9 @@ pte_t * __bad_pagetable(void) "bnez\t%1,1b\n\t" "addiu\t%0,4\n\t" ".set\treorder" - :"=r" (dummy1), - "=r" (dummy2) - :"r" (pte_val(BAD_PAGE)), - "0" (page), - "1" (PAGE_SIZE/4)); -#endif + :"=r" (dummy1), "=r" (dummy2) + :"r" (pte_val(BAD_PAGE)), "0" (page), "1" (PAGE_SIZE/4) + :"$1"); return (pte_t *)page; } diff --git a/arch/mips/sgi/kernel/setup.c b/arch/mips/sgi/kernel/setup.c index bc64424e2..477219826 100644 --- a/arch/mips/sgi/kernel/setup.c +++ b/arch/mips/sgi/kernel/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.23 1999/05/07 18:00:17 ulfc Exp $ +/* $Id: setup.c,v 1.24 1999/06/12 17:26:15 ulfc Exp $ * * setup.c: SGI specific setup, including init of the feature struct. * @@ -197,6 +197,18 @@ __initfunc(void sgi_setup(void)) #ifdef CONFIG_VT #ifdef CONFIG_SGI_NEWPORT_CONSOLE conswitchp = &newport_con; + + screen_info = (struct screen_info) { + 0, 0, /* orig-x, orig-y */ + 0, /* unused */ + 0, /* orig_video_page */ + 0, /* orig_video_mode */ + 160, /* orig_video_cols */ + 0, 0, 0, /* unused, ega_bx, unused */ + 64, /* orig_video_lines */ + 0, /* orig_video_isVGA */ + 16 /* orig_video_points */ + }; #else conswitchp = &dummy_con; #endif diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 0652c171b..e436cc77f 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.9 1998/08/25 09:14:51 ralf Exp $ +/* $Id: setup.c,v 1.10 1999/01/04 16:03:59 ralf Exp $ * * Setup pointers to hardware-dependent routines. * @@ -170,6 +170,19 @@ __initfunc(void sni_rm200_pci_setup(void)) ide_ops = &std_ide_ops; #endif conswitchp = &vga_con; + + screen_info = (struct screen_info) { + 0, 0, /* orig-x, orig-y */ + 0, /* unused */ + 52, /* orig_video_page */ + 3, /* orig_video_mode */ + 80, /* orig_video_cols */ + 4626, 3, 9, /* unused, ega_bx, unused */ + 50, /* orig_video_lines */ + 0x22, /* orig_video_isVGA */ + 16 /* orig_video_points */ + }; + rtc_ops = &std_rtc_ops; kbd_ops = &std_kbd_ops; #ifdef CONFIG_PSMOUSE |