You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
(66) |
Jul
(16) |
Aug
(2) |
Sep
(7) |
Oct
(17) |
Nov
(1) |
Dec
(220) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(154) |
Feb
(167) |
Mar
(159) |
Apr
(172) |
May
(35) |
Jun
(58) |
Jul
(97) |
Aug
(285) |
Sep
(139) |
Oct
(252) |
Nov
(8) |
Dec
(3) |
2004 |
Jan
(13) |
Feb
(159) |
Mar
(136) |
Apr
(33) |
May
(50) |
Jun
(42) |
Jul
(140) |
Aug
(42) |
Sep
(199) |
Oct
(31) |
Nov
(55) |
Dec
|
2005 |
Jan
|
Feb
(12) |
Mar
(214) |
Apr
(119) |
May
(21) |
Jun
(2) |
Jul
(127) |
Aug
(10) |
Sep
(3) |
Oct
(24) |
Nov
(1) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
(45) |
May
(13) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(26) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(35) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:43
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/arch/vax/boot Modified Files: cpu_sel.c Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: cpu_sel.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/cpu_sel.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- cpu_sel.c 2 Oct 2004 11:42:46 -0000 1.14 +++ cpu_sel.c 25 Apr 2005 22:25:04 -0000 1.15 @@ -1,8 +1,6 @@ /* * Boot-time CPU identification - requires virtual memory to be * turned off (MAPEN=0). - * - * $Id$ */ #include <asm/mtpr.h> /* Processor register definitions */ |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:38
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/arch/vax/kernel Modified Files: cpu_ka410.c cpu_ka42.c cpu_ka43.c cpu_ka46.c cpu_ka48.c cpu_ka55.c cpu_ka630.c cpu_ka640.c cpu_ka650.c early_printk.c process.c ptrace.c reboot.c regdump.c semaphore.c setup.c time.c Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/time.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- time.c 25 Apr 2005 13:11:56 -0000 1.20 +++ time.c 25 Apr 2005 22:25:05 -0000 1.21 @@ -1,17 +1,14 @@ /* - * $Id$ + * Copyright (C) 1995 Linus Torvalds + * VAX port copyright atp 1998. + * (C) 2000 Erik Mouw <J.A...@it...> * - * Copyright (C) 1995 Linus Torvalds - * VAX port copyright atp 1998. - * (C) 2000 Erik Mouw <J.A...@it...> - * - * 22-oct-2000: Erik Mouw - * Added some simple do_gettimeofday() and do_settimeofday() - * functions. Not tested due to lack of disk space. - * - * 24 Apr 2002: atp. Finally got round to doing this properly. - * We now use the CMOS clock. + * 22-oct-2000: Erik Mouw + * Added some simple do_gettimeofday() and do_settimeofday() + * functions. Not tested due to lack of disk space. * + * 24 Apr 2002: atp. Finally got round to doing this properly. + * We now use the CMOS clock. */ /* Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- cpu_ka650.c 25 Apr 2005 10:39:55 -0000 1.16 +++ cpu_ka650.c 25 Apr 2005 22:25:05 -0000 1.17 @@ -1,11 +1,8 @@ /* - * $Id$ - * - * Copyright (C) 2000 Kenn Humborg - * - * This file contains machine vector handlers for the - * KA650 CPU in the MicroVAX III series machines + * Copyright (C) 2000 Kenn Humborg * + * This file contains machine vector handlers for the + * KA650 CPU in the MicroVAX III series machines */ #include <linux/types.h> /* For NULL */ @@ -18,7 +15,7 @@ #include <asm/vaxcpu.h> #include <asm/clock.h> /* For clock_init routines */ -static unsigned int *ka650_cacr = (unsigned int *)0x20084000; +static unsigned int *ka650_cacr = (unsigned int *) 0x20084000; static void ka650_pre_vm_init(void) { Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/process.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- process.c 25 Apr 2005 13:11:56 -0000 1.27 +++ process.c 25 Apr 2005 22:25:05 -0000 1.28 @@ -1,6 +1,4 @@ /* - * $Id$ - * * This file contains the standard functions that the arch-independent * kernel expects for process handling and scheduling */ Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- cpu_ka46.c 25 Apr 2005 10:39:55 -0000 1.24 +++ cpu_ka46.c 25 Apr 2005 22:25:05 -0000 1.25 @@ -1,11 +1,8 @@ /* - * $Id$ - * - * Copyright (C) 2000 Kenn Humborg - * - * This file contains generic machine vector handlers for the - * KA46 CPU in the MARIAH-based VAXstation 4000/60 + * Copyright (C) 2000 Kenn Humborg * + * This file contains generic machine vector handlers for the + * KA46 CPU in the MARIAH-based VAXstation 4000/60 */ #include <linux/types.h> /* For NULL */ Index: reboot.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/reboot.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- reboot.c 25 Apr 2005 13:11:56 -0000 1.7 +++ reboot.c 25 Apr 2005 22:25:05 -0000 1.8 @@ -1,6 +1,4 @@ /* - * $Id$ - * * This file contains the standard functions that the arch-independent * kernel expects for halting, rebooting and powering off the machine. * It also contains the machine check dispatcher. Index: cpu_ka410.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka410.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- cpu_ka410.c 2 Oct 2004 11:42:46 -0000 1.13 +++ cpu_ka410.c 25 Apr 2005 22:25:05 -0000 1.14 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 2000 Kenn Humborg * * This file contains machine vector handlers for the Index: cpu_ka640.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka640.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- cpu_ka640.c 2 Oct 2004 11:42:47 -0000 1.11 +++ cpu_ka640.c 25 Apr 2005 22:25:05 -0000 1.12 @@ -1,11 +1,8 @@ /* - * $Id$ - * - * Copyright (C) 2000 Mattias Nordlund - * - * This file contains machine vector handlers for the - * KA640 CPU in the MicroVAX 3400 series machines + * Copyright (C) 2000 Mattias Nordlund * + * This file contains machine vector handlers for the + * KA640 CPU in the MicroVAX 3400 series machines */ #include <linux/types.h> /* For NULL */ Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/setup.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- setup.c 25 Apr 2005 13:11:56 -0000 1.18 +++ setup.c 25 Apr 2005 22:25:05 -0000 1.19 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 1995 Linus Torvalds * VAX port copyright atp 1998. */ Index: ptrace.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/ptrace.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ptrace.c 25 Mar 2005 01:14:01 -0000 1.13 +++ ptrace.c 25 Apr 2005 22:25:05 -0000 1.14 @@ -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. @@ -22,10 +21,6 @@ #include "interrupt.h" -#if 0 -#include <asm/fp.h> -#include <asm/mipsregs.h> -#endif #include <asm/pgtable.h> #include <asm/page.h> #include <asm/system.h> @@ -47,30 +42,29 @@ int i; // printk("child sp is %8lX\n", child->thread.pcb.ksp); - stack_top = child->thread_info +1; + stack_top = child->thread_info + 1; stack_top -= 4; /* jump down over PC and PSL which are always there */ /* hack attack - apologies to anyone who has just eaten * this is the worst code I've written since the code this code * is replacing ... - Dave. - */ + */ /* start after the PC/PSL, and look for an exception vector if we move to malloced vectors this is screwed */ - chk_excep_addr = (unsigned long *)*(unsigned long *)stack_top; - for (i=0; i<VAX_MAX_NUM_VALS_TO_CHECK; i++) - { - excep_addr = ((unsigned long *)stack_top)-i; - chk_excep_addr = (unsigned long *)*(unsigned long *)excep_addr; - if (chk_excep_addr>(unsigned long *)irqvectors && chk_excep_addr<(unsigned long *)(irqvectors+NR_IRQVECTORS)) - break; - } + chk_excep_addr = (unsigned long *) *(unsigned long *) stack_top; + for (i = 0; i<VAX_MAX_NUM_VALS_TO_CHECK; i++) { + excep_addr = ((unsigned long *) stack_top) - i; + chk_excep_addr = (unsigned long *) *(unsigned long *) excep_addr; + if (chk_excep_addr > (unsigned long *) irqvectors + && chk_excep_addr < (unsigned long *) (irqvectors + NR_IRQVECTORS)) + break; + } - if (i==VAX_MAX_NUM_VALS_TO_CHECK) - { - printk("Cannot find exception handler address\n"); - return NULL; - } + if (i == VAX_MAX_NUM_VALS_TO_CHECK) { + printk("Cannot find exception handler address\n"); + return NULL; + } num_execp_params = *chk_excep_addr; @@ -79,59 +73,57 @@ return regs_ptr; } -static int putreg(struct task_struct *child, - unsigned long regno, unsigned long value) +static int putreg(struct task_struct *child, unsigned long regno, + unsigned long value) { - struct pt_regs *regs_ptr; - - regs_ptr = ptrace_find_vax_regs(child); - if (!regs_ptr) - return 0; + struct pt_regs *regs_ptr; - if ((regno>>2) == PT_SP) - { - child->thread.pcb.usp = value; - return 0; - } - switch(regno >> 2) { - case 0 ... 16: - // retval = *(((unsigned long *)regs_ptr) + (regno>>2)); - *(((unsigned long *)regs_ptr) + (regno>>2)) = value; - // *(unsigned long *)((&child->thread.pcb)+4+(regno>>2))=value; - break; - default: - printk("putreg for %lu failed\n", regno); - break; - } - - return 0; + regs_ptr = ptrace_find_vax_regs(child); + if (!regs_ptr) + return 0; + + if ((regno >> 2) == PT_SP) { + child->thread.pcb.usp = value; + return 0; + } + + switch (regno >> 2) { + case 0 ... 16: + // retval = *(((unsigned long *)regs_ptr) + (regno>>2)); + *(((unsigned long *) regs_ptr) + (regno >> 2)) = value; + // *(unsigned long *)((&child->thread.pcb)+4+(regno>>2))=value; + break; + default: + printk("putreg for %lu failed\n", regno); + break; + } + return 0; } -static unsigned long getreg(struct task_struct *child, - unsigned long regno) +static unsigned long getreg(struct task_struct *child, unsigned long regno) { unsigned long retval = ~0UL; struct pt_regs *regs_ptr; - - /* call helper function to get registers for the VAX */ + + /* Call helper function to get registers for the VAX */ regs_ptr = ptrace_find_vax_regs(child); - if (!regs_ptr) - return 0; + if (!regs_ptr) + return 0; - if ((regno>>2) == PT_SP) - { + if ((regno >> 2) == PT_SP) { retval = child->thread.pcb.usp; return retval; } - switch(regno >> 2) { - case 0 ... 16: - retval = *(((unsigned long *)regs_ptr) + (regno>>2)); - break; - default: - printk("getreg for %lu failed\n", regno); - retval=0; - break; + + switch (regno >> 2) { + case 0 ... 16: + retval = *(((unsigned long *) regs_ptr) + (regno >> 2)); + break; + default: + printk("getreg for %lu failed\n", regno); + retval = 0; + break; } // printk("getreg for %ld returned %8lX\n", regno>>2, retval); return retval; @@ -194,9 +186,9 @@ (current->uid != child->euid) || (current->uid != child->suid) || (current->uid != child->uid) || - (current->gid != child->egid) || + (current->gid != child->egid) || (current->gid != child->sgid) || - (current->gid != child->gid) || + (current->gid != child->gid) || (!cap_issubset(child->cap_permitted, current->cap_permitted)) || (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) @@ -228,7 +220,7 @@ if (child->parent != current) goto out_tsk; switch (request) { - case PTRACE_PEEKTEXT: /* read word at location addr. */ + case PTRACE_PEEKTEXT: /* read word at location addr. */ case PTRACE_PEEKDATA: { unsigned long tmp; int copied; @@ -240,29 +232,29 @@ res = put_user(tmp,(unsigned long *) data); goto out; - } + } /* Read the word at location addr in the USER area. */ case PTRACE_PEEKUSR: { - unsigned long tmp; + unsigned long tmp; res = -EIO; - if ((addr & 3) || addr < 0 || addr > sizeof(struct user)-3) + if ((addr & 3) || addr < 0 || addr > sizeof(struct user) - 3) break; - + tmp=0; - if (addr < 16*sizeof(unsigned long)) + if (addr < 16 * sizeof(unsigned long)) tmp = getreg(child, addr); - + res = put_user(tmp, (unsigned long *) data); goto out; - } + } case PTRACE_POKETEXT: /* write the word at location addr. */ case PTRACE_POKEDATA: res = 0; if (access_process_vm(child, addr, &data, sizeof(data), 1) - == sizeof(data)) + == sizeof(data)) break; res = -EIO; goto out; @@ -271,11 +263,10 @@ // struct pt_regs *regs; int res = 0; res = -EIO; - if ((addr & 3) || addr < 0 || - addr > sizeof(struct user) - 3) + if ((addr & 3) || addr < 0 || addr > sizeof(struct user) - 3) break; - if (addr < 17*sizeof(long)) { + if (addr < 17 * sizeof(long)) { res = putreg(child, addr, data); break; } @@ -284,27 +275,27 @@ have to be selective about what portions we allow someone to modify. */ break; - } + } - case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ - case PTRACE_CONT: { /* restart after signal. */ + case PTRACE_SYSCALL: /* Continue and stop at next (return from) syscall */ + case PTRACE_CONT: { /* Restart after signal. */ res = -EIO; if ((unsigned long) data > _NSIG) break; - if (request == PTRACE_SYSCALL) { + if (request == PTRACE_SYSCALL) set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - } else { + else clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - } + child->exit_code = data; wake_up_process(child); res = 0; break; - } + } /* - * make the child exit. Best I can do is send it a sigkill. - * perhaps it should be put in the status that it wants to + * Make the child exit. Best I can do is send it a sigkill. + * perhaps it should be put in the status that it wants to * exit. */ case PTRACE_KILL: @@ -315,29 +306,29 @@ wake_up_process(child); break; - case PTRACE_SINGLESTEP: - { - unsigned long tmp; - struct psl_fields *psl; + case PTRACE_SINGLESTEP: { + unsigned long tmp; + struct psl_fields *psl; + res = -EIO; if ((unsigned long) data > _NSIG) break; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); if ((child->ptrace & PT_DTRACE)==0) child->ptrace |= PT_DTRACE; - + tmp = getreg(child, PT_PSL<<2); psl = (struct psl_fields *)&tmp; - psl->t=1; - putreg(child, PT_PSL<<2, *(unsigned long *)psl); + psl->t = 1; + putreg(child, PT_PSL << 2, *(unsigned long *) psl); // printk("tmp is %8lX, psl is now %8lX\n", tmp, *(unsigned long *)psl); - child->exit_code=data; wake_up_process(child); res = 0; break; - } + } + case PTRACE_DETACH: /* detach a process that was attached. */ res = ptrace_detach(child, data); break; Index: regdump.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/regdump.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- regdump.c 25 Apr 2005 13:11:56 -0000 1.10 +++ regdump.c 25 Apr 2005 22:25:05 -0000 1.11 @@ -1,6 +1,4 @@ /* - * $Id$ - * * This file contains functions for dumping register and stack * contents. */ Index: cpu_ka42.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka42.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- cpu_ka42.c 25 Apr 2005 10:39:55 -0000 1.19 +++ cpu_ka42.c 25 Apr 2005 22:25:05 -0000 1.20 @@ -1,12 +1,9 @@ /* - * $Id$ - * - * Copyright (C) 2000 Kenn Humborg - * - * This file contains generic machine vector handlers for the - * KA42 CPUs in the early CVAX-based VAXstation 3100 - * machines (models 10 to 48) + * Copyright (C) 2000 Kenn Humborg * + * This file contains generic machine vector handlers for the + * KA42 CPUs in the early CVAX-based VAXstation 3100 + * machines (models 10 to 48) */ #include <linux/types.h> /* For NULL */ Index: cpu_ka630.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka630.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- cpu_ka630.c 25 Apr 2005 10:39:55 -0000 1.13 +++ cpu_ka630.c 25 Apr 2005 22:25:05 -0000 1.14 @@ -1,11 +1,8 @@ /* - * $Id$ - * - * Copyright (C) 2000 Kenn Humborg - * - * This file contains machine vector handlers for the - * KA630 CPU in the MicroVAX II machines + * Copyright (C) 2000 Kenn Humborg * + * This file contains machine vector handlers for the + * KA630 CPU in the MicroVAX II machines */ #include <linux/types.h> /* For NULL */ Index: early_printk.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/early_printk.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- early_printk.c 17 Oct 2004 19:51:30 -0000 1.6 +++ early_printk.c 25 Apr 2005 22:25:05 -0000 1.7 @@ -1,13 +1,10 @@ /* - * $Id$ - * * Rudimentary console driver for early printk output. * This depends on the CPU's machine vector having a working * post_vm_putchar(). * If a CPU can support early printk, it should call one * of the init_early_printk_XXX() functions (at the bottom * of this file) from the mv->post_vm_init() function - * */ #include <linux/console.h> Index: semaphore.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/semaphore.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- semaphore.c 25 Apr 2005 13:11:56 -0000 1.6 +++ semaphore.c 25 Apr 2005 22:25:05 -0000 1.7 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Updated for new rwsem.h 2.4.4, Mar 2002 atp. * * VAX version (based on S390 version) Index: cpu_ka48.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka48.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- cpu_ka48.c 25 Apr 2005 10:39:55 -0000 1.10 +++ cpu_ka48.c 25 Apr 2005 22:25:05 -0000 1.11 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 2004 Bérczi Gábor (Gabucino) * Based on cpu_ka46.c Copyright (C) 2000 Kenn Humborg * Index: cpu_ka43.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka43.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- cpu_ka43.c 25 Apr 2005 10:39:55 -0000 1.23 +++ cpu_ka43.c 25 Apr 2005 22:25:05 -0000 1.24 @@ -1,16 +1,14 @@ /* - * $Id$ - * - * Copyright (C) 2000 Kenn Humborg + * Copyright (C) 2000 Kenn Humborg * - * This file contains generic machine vector handlers for the - * KA42 and KA43 CPUs in the RIGEL-based VAXstation 3100 + * This file contains generic machine vector handlers for the + * KA42 and KA43 CPUs in the RIGEL-based VAXstation 3100 * - * 2000/04/01 Mattias Nordlund - * Fixed the cache initializing, added the functions - * ka43_cache_disbale/enable/clear and moved some stuff around. - * atp jun 2001 - machine check implementation - * atp Jul 2001 - diagmem remap functions + * 2000/04/01 Mattias Nordlund + * Fixed the cache initializing, added the functions + * ka43_cache_disbale/enable/clear and moved some stuff around. + * atp jun 2001 - machine check implementation + * atp Jul 2001 - diagmem remap functions */ #include <linux/types.h> /* For NULL */ Index: cpu_ka55.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka55.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- cpu_ka55.c 8 Apr 2005 08:25:43 -0000 1.14 +++ cpu_ka55.c 25 Apr 2005 22:25:05 -0000 1.15 @@ -1,11 +1,8 @@ /* - * $Id$ - * - * Copyright (C) 2000 Kenn Humborg - * - * This file contains generic machine vector handlers for the - * KA5 CPU in the NVAX-based MicroVAX 3100 Model 85 + * Copyright (C) 2000 Kenn Humborg * + * This file contains generic machine vector handlers for the + * KA5 CPU in the NVAX-based MicroVAX 3100 Model 85 */ #include <linux/types.h> /* For NULL */ |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:32
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/include/asm-vax Modified Files: cacheflush.h uaccess.h Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: uaccess.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/uaccess.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- uaccess.h 18 Nov 2004 09:30:31 -0000 1.7 +++ uaccess.h 25 Apr 2005 22:25:07 -0000 1.8 @@ -35,7 +35,7 @@ #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) -extern inline int verify_area(int type, const void * addr, unsigned long size) +extern inline int __deprecated verify_area(int type, const void * addr, unsigned long size) { return access_ok(type,addr,size) ? 0 : -EFAULT; } Index: cacheflush.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/cacheflush.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cacheflush.h 25 Apr 2005 12:53:31 -0000 1.6 +++ cacheflush.h 25 Apr 2005 22:25:07 -0000 1.7 @@ -34,7 +34,7 @@ * an interrupt, and then REI. */ __asm__ ( - " movpsl -(%%sp) \n" + " movpsl -(%sp) \n" " pushab 1f \n" " rei \n" "1: \n"); |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:30
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/arch/vax/lib Modified Files: checksum.c clear_user.S copy_tofrom_user.S negdi.c string.c string_user.c strncpy_user.S strnlen_user.S Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: string.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/string.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- string.c 3 Mar 2004 20:18:35 -0000 1.6 +++ string.c 25 Apr 2005 22:25:05 -0000 1.7 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 1991, 1992 Linus Torvalds */ @@ -10,12 +8,9 @@ * often) or if speed doesn't matter (overhead of a function call), * just drop them here. */ - #include <linux/string.h> - - -void * memset(void * s, int c , __kernel_size_t count) +void *memset(void *s, int c , __kernel_size_t count) { asm ( " movl %2, %%r6 \n" /* R6 holds bytes left */ @@ -30,7 +25,7 @@ "last_chunk: \n" " movc5 $0, 0, %1, %%r6, (%%r3) " : /* no outputs */ - : "g" (s), "g" (c), "g" (count) + : "g"(s), "g"(c), "g"(count) : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7"); return s; Index: strncpy_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/strncpy_user.S,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- strncpy_user.S 15 Jun 2003 22:33:56 -0000 1.7 +++ strncpy_user.S 25 Apr 2005 22:25:05 -0000 1.8 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 2001, Dave Airlie * * VAX Assembly implementation of strncpy_from_user @@ -9,8 +7,8 @@ #include <asm/errno.h> #include <linux/linkage.h> -/* int __strncpy_from_user(char *dst, const char *src, long count) - * Returns number of bytes copied +/* int __strncpy_from_user(char *dst, const char *src, long count) + * Returns number of bytes copied */ #define EX(insn, addr, reg, handler) \ @@ -18,8 +16,8 @@ .section __ex_table, "a"; \ .align 2 ; \ .long 9b, handler; \ - .previous - + .previous + .text ENTRY(__strncpy_from_user) .word 0x3e @@ -35,7 +33,8 @@ sobgtr %r1, 1b 2: subl2 %r1, %r0 ret - .section .fixup, "ax" + .section .fixup, "ax" fault: movl $-EFAULT, %r0 ret .previous + Index: strnlen_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/strnlen_user.S,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- strnlen_user.S 15 Jun 2003 22:33:56 -0000 1.6 +++ strnlen_user.S 25 Apr 2005 22:25:05 -0000 1.7 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 2001, Dave Airlie * * VAX Assembly implementation of strnlen @@ -18,14 +16,14 @@ .align 2 ; \ .long 9b, handler; \ .previous - + .text ENTRY(__strnlen_user) .word 0x3e movl 4(%ap), %r0 movl 8(%ap), %r1 movl %r0, %r2 - + 1: EX(movb, (%r0)+, %r3, fault) cmpb $0, %r3 beql 2f @@ -33,7 +31,8 @@ incl %r0 2: subl2 %r2, %r0 ret - + .section .fixup,"ax" fault: movl $0, %r0 ret + Index: negdi.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/negdi.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- negdi.c 20 May 2002 00:33:33 -0000 1.4 +++ negdi.c 25 Apr 2005 22:25:05 -0000 1.5 @@ -1,8 +1,6 @@ /* - * $Id$ - * * Copyright (C) 2001, Kenn Humborg - * + * * This is a temporary implementation of GCCs negdi2 primitive. * Once we get native support in the compiler, this will be * removed from here @@ -21,3 +19,4 @@ return x; } + Index: checksum.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/checksum.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- checksum.c 1 Oct 2003 00:15:12 -0000 1.2 +++ checksum.c 25 Apr 2005 22:25:05 -0000 1.3 @@ -1,18 +1,15 @@ /* - * $Id$ - * * Dave Airlie wrote the original IP checksum code for Linux/VAX * in assembler (transliterating from the i386 version). * * In 2.5.69, the NFS client code was changed to use zero-copy * which leads to this function being called with odd-byte-aligned * buffers, which broke Dave's code. - * + * * While fixing this, I re-wrote it in C, only using assembler for * the carry-handling that is impossible to do in C. Some inspiration * came from NetBSD :-) The generated looks as good as Dave's. * - Kenn Humborg, 2003-10-01 - * */ #include <asm/checksum.h> @@ -146,8 +143,10 @@ } if (odd) { - /* Need to byte-swap - just roll everything around - through 8 bits */ + /* + * Need to byte-swap - just roll everything around + *through 8 bits. + */ __asm__ __volatile ( "rotl $8, %0, %0 " : "=r" (sum) Index: clear_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/clear_user.S,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- clear_user.S 15 Jun 2003 22:33:56 -0000 1.6 +++ clear_user.S 25 Apr 2005 22:25:05 -0000 1.7 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 2001, Dave Airlie * * VAX Assembly implementation of clear_user @@ -9,7 +7,7 @@ #include <asm/errno.h> #include <linux/linkage.h> -/* unsigned long __clear_user(void *addr, unsigned long size); +/* unsigned long __clear_user(void *addr, unsigned long size); * number of bytes not cleared is returned */ @@ -18,7 +16,7 @@ .section __ex_table, "a"; \ .align 2 ; \ .long 9b, handler; \ - .previous + .previous .text ENTRY(__clear_user) @@ -33,3 +31,4 @@ .section .fixup, "ax" fault: ret .previous + Index: copy_tofrom_user.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/copy_tofrom_user.S,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- copy_tofrom_user.S 15 Jun 2003 22:33:56 -0000 1.6 +++ copy_tofrom_user.S 25 Apr 2005 22:25:05 -0000 1.7 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright (C) 2001, Dave Airlie * * VAX Assembly implementation of copy_tofrom_user @@ -18,7 +16,7 @@ .align 2 ; \ .long 9b, handler; \ .previous - + .text ENTRY(__copy_tofrom_user) .word 0x3e @@ -32,6 +30,6 @@ ret .section .fixup,"ax" .align 4 -l_fixup: +l_fixup: s_fixup: ret .previous Index: string_user.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/lib/string_user.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- string_user.c 20 May 2002 00:33:33 -0000 1.4 +++ string_user.c 25 Apr 2005 22:25:05 -0000 1.5 @@ -1,13 +1,10 @@ /* - * $Id$ + * Copyright (C) 2001, Kenn Humborg * - * Copyright (C) 2001, Kenn Humborg - * - * These functions are used to do string operations on user memory + * These functions are used to do string operations on user memory */ #include <linux/string.h> - #include <linux/kernel.h> /* for panic() */ unsigned long __clear_user(void *addr, unsigned long size) |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:15
|
Update of /cvsroot/linux-vax/kernel-2.5/drivers/vax/serial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/drivers/vax/serial Modified Files: ipr.c Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: ipr.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/serial/ipr.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ipr.c 25 Apr 2005 13:00:46 -0000 1.9 +++ ipr.c 25 Apr 2005 22:25:07 -0000 1.10 @@ -1,6 +1,4 @@ /* - * $Id$ - * * UART driver for the internal console port in most VAX CPUs * * Most VAX CPU implementations have a serial console port which |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:15
|
Update of /cvsroot/linux-vax/kernel-2.5/drivers/vax/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/drivers/vax/net Modified Files: delqa.c Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: delqa.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/net/delqa.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- delqa.c 25 Apr 2005 09:37:12 -0000 1.11 +++ delqa.c 25 Apr 2005 22:25:06 -0000 1.12 @@ -1,26 +1,23 @@ - -/* $Id$ - - Quick-and-dirty driver for DELQA/DESQA (Q-bus ethernet adapters) - - (C) 2002-2004, Kenn Humborg - - TODO: Pre-allocate the Q-bus mapping registers for TX at init time and - re-use them, rather than allocating them for each packet. This - would remove the only failure possibility from delqa_start_xmit(). - - TODO: Allow multiple DELQAs at different base addresses. - - TODO: Reset DELQA on q-bus memory access error (is this the right - thing to do?). - - TODO: Implement delqa_tx_timeout(). - - TODO: Handle multicast addresses and PROMISC flag in format_setup_frame(). - - TODO: Implement delqa_close(). -*/ - +/* + * Quick-and-dirty driver for DELQA/DESQA (Q-bus ethernet adapters) + * + * (C) 2002-2004, Kenn Humborg + * + * TODO: Pre-allocate the Q-bus mapping registers for TX at init time and + * re-use them, rather than allocating them for each packet. This + * would remove the only failure possibility from delqa_start_xmit(). + * + * TODO: Allow multiple DELQAs at different base addresses. + * + * TODO: Reset DELQA on q-bus memory access error (is this the right + * thing to do?). + * + * TODO: Implement delqa_tx_timeout(). + * + * TODO: Handle multicast addresses and PROMISC flag in format_setup_frame(). + * + * TODO: Implement delqa_close(). + */ #include <linux/init.h> #include <linux/netdevice.h> |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:15
|
Update of /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/drivers/vax/bus Modified Files: cqbic.c qbus.c vsbus-ka4x.c vsbus.c Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: cqbic.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/cqbic.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cqbic.c 25 Apr 2005 09:37:11 -0000 1.4 +++ cqbic.c 25 Apr 2005 22:25:06 -0000 1.5 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Support for the CQBIC (which I guess stands for something like * CVAX QBus Interface Chip). * Index: qbus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/qbus.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- qbus.c 25 Apr 2005 09:37:11 -0000 1.10 +++ qbus.c 25 Apr 2005 22:25:06 -0000 1.11 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Support for the QBUS bus type. This represents the common * features of all QBUS devices, for the purposes of the driver * model. Index: vsbus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/vsbus.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vsbus.c 25 Apr 2005 09:37:11 -0000 1.4 +++ vsbus.c 25 Apr 2005 22:25:06 -0000 1.5 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Support for the VSBUS pseudo-bus type. * * As far as I can make out, VAXstation 3100, MicroVAX 3100 and @@ -20,7 +18,6 @@ * * Differences in logic due to differences in the hardware are in * vsbus-ka*.c - * */ #include <linux/init.h> Index: vsbus-ka4x.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/vsbus-ka4x.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vsbus-ka4x.c 25 Apr 2005 09:37:11 -0000 1.4 +++ vsbus-ka4x.c 25 Apr 2005 22:25:06 -0000 1.5 @@ -1,6 +1,4 @@ /* - * $Id$ - * * Support for the VSBUS pseudo bus adapter in the KA410, KA42, * KA43, KA46 and KA48 CPUs. * |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 22:25:14
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/arch/vax/mm Modified Files: init.c ioremap.c pgalloc.c pgtable.c Log Message: - Removal of $Id$ - Touchup for ptrace.c -- there's probably another round needed, tough... Index: pgtable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/pgtable.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pgtable.c 25 Apr 2005 15:59:24 -0000 1.6 +++ pgtable.c 25 Apr 2005 22:25:05 -0000 1.7 @@ -1,7 +1,5 @@ /* - * $Id$ - * - * handle bits of VAX memory management + * Handle bits of VAX memory management * atp 2000 */ Index: pgalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/pgalloc.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- pgalloc.c 25 Apr 2005 15:59:24 -0000 1.8 +++ pgalloc.c 25 Apr 2005 22:25:05 -0000 1.9 @@ -1,15 +1,13 @@ /* - * $Id$ - * * pgalloc.c Routines from include/asm-vax/mm/pgalloc.h * Allocation of page table entries and so forth. * * This is the main part of the VAX specific memory layer. * - * Copyright atp Jun 2001 - complete rewrite. - * atp aug 2001 - add in stuff for vmalloc to work (pmd_alloc_kernel) - * fix mistake in pte_alloc_kernel. - * atp 21 aug 01 - make TASK_WSMAX what was intended, add in segv stuff. + * Copyright atp Jun 2001 - complete rewrite. + * atp aug 2001 - add in stuff for vmalloc to work (pmd_alloc_kernel) + * fix mistake in pte_alloc_kernel. + * atp 21 aug 01 - make TASK_WSMAX what was intended, add in segv stuff. * * License: GNU GPL */ Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/init.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- init.c 25 Apr 2005 15:50:42 -0000 1.17 +++ init.c 25 Apr 2005 22:25:05 -0000 1.18 @@ -1,5 +1,5 @@ -/* $Id$ - * initialise the VM system. +/* + * Initialise the VM system. * Copyright atp Nov 1998 * GNU GPL */ Index: ioremap.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/ioremap.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ioremap.c 25 Apr 2005 09:18:48 -0000 1.8 +++ ioremap.c 25 Apr 2005 22:25:05 -0000 1.9 @@ -1,12 +1,9 @@ /* - * $Id$ - * - * Copyright (C) 2000 Kenn Humborg - * - * This file contains the functions for mapping specific physical - * addresses into virtual memory, normally used to memory map - * device registers in IO space. + * Copyright (C) 2000 Kenn Humborg * + * This file contains the functions for mapping specific physical + * addresses into virtual memory, normally used to memory map + * device registers in IO space. */ /* The i386 code maps a physical range by allocating a new vm area |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 15:59:34
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10486 Modified Files: pgalloc.c pgtable.c Log Message: - More polishing. Index: pgtable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/pgtable.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- pgtable.c 30 May 2004 20:46:56 -0000 1.5 +++ pgtable.c 25 Apr 2005 15:59:24 -0000 1.6 @@ -1,7 +1,7 @@ -/* +/* * $Id$ * - * handle bits of VAX memory management + * handle bits of VAX memory management * atp 2000 */ Index: pgalloc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/pgalloc.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pgalloc.c 30 May 2004 21:09:21 -0000 1.7 +++ pgalloc.c 25 Apr 2005 15:59:24 -0000 1.8 @@ -1,15 +1,16 @@ -/* $Id$ - * - * pgalloc.c Routines from include/asm-vax/mm/pgalloc.h - * Allocation of page table entries and so forth. - * +/* + * $Id$ + * + * pgalloc.c Routines from include/asm-vax/mm/pgalloc.h + * Allocation of page table entries and so forth. + * * This is the main part of the VAX specific memory layer. - * + * * Copyright atp Jun 2001 - complete rewrite. - * atp aug 2001 - add in stuff for vmalloc to work (pmd_alloc_kernel) - * fix mistake in pte_alloc_kernel. - * atp 21 aug 01 - make TASK_WSMAX what was intended, add in segv stuff. - * + * atp aug 2001 - add in stuff for vmalloc to work (pmd_alloc_kernel) + * fix mistake in pte_alloc_kernel. + * atp 21 aug 01 - make TASK_WSMAX what was intended, add in segv stuff. + * * License: GNU GPL */ @@ -20,7 +21,7 @@ #include <asm/pgalloc.h> #include <asm/mmu_context.h> -extern void vaxpanic(char *reason); +extern void vaxpanic(char *reason); #undef VAX_MM_PGALLOC_DEBUG @@ -45,7 +46,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) { /* - * This is rather wasteful, as only a few longwords are + * This is rather wasteful, as only a few longwords are * used in the entire 4kb page. Perhaps we can do something * smarter here by using the quicklists to pack the pgds into * a single page. @@ -55,7 +56,7 @@ /* Grab a pgd off the cache */ pgd = get_pgd_fast(); - + if (!pgd) { /* Check if we have run out of balance slots */ if (pgd_free_list.slots_used >= TASK_MAXUPRC) @@ -63,7 +64,7 @@ pgd = kmalloc(sizeof(pgd_t) * PTRS_PER_PGD, GFP_KERNEL); if (!pgd) - return NULL; + return NULL; memset(pgd, 0, sizeof(pgd_t) * PTRS_PER_PGD); @@ -73,10 +74,9 @@ pgd[0].pmd = 0; /* These are blank */ pgd[1].pmd = 0; - } else { /* pgd_clear keeps this */ - taskslot=pgd->slot; + taskslot = pgd->slot; } if (pgd) { @@ -84,7 +84,7 @@ /* Set the values of the base + length registers */ pgd[0].br = taskslot + P0PTE_OFFSET; /* skip the PMD */ pgd[0].lr = 0x0; - /* this comes in handy later */ + /* This comes in handy later */ pgd[0].slot = taskslot; /* p1br points at what would be page mapping 0x40000000 (i.e. the _end_ of the slot)*/ pgd[1].br = taskslot+ (P1PTE_OFFSET) - 0x800000 ; @@ -95,10 +95,10 @@ pgd[0].segment = 0; pgd[1].segment = 1; -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM:pgd_alloc: p0: %8lX, %8lX, p1: %8lX, %8lx, slot %ld, taskslot %8lx\n", pgd[0].br, pgd[0].lr, pgd[1].br, pgd[1].lr, pgd_free_list.slots_used-1, pgd[0].slot); #endif - /* set the s0 region, from the master copy in swapper_pg_dir */ + /* Set the s0 region, from the master copy in swapper_pg_dir */ memcpy(pgd + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); } @@ -108,11 +108,11 @@ void pgd_clear(pgd_t * pgdp) { /* Wipe a pgd structure carefully -- this is probably overkill */ - pgdp->pmd=0; + pgdp->pmd = 0; if (pgdp->segment) { /* p1br points at what would be page mapping 0x40000000 */ - pgdp->br = pgdp->slot+ (P1PTE_OFFSET) - 0x800000 ; + pgdp->br = pgdp->slot+ (P1PTE_OFFSET) - 0x800000; /* This is the unmapped number of PTEs */ pgdp->lr = 0x40000; } else { @@ -121,7 +121,6 @@ } } - /* * Remap a given page to be part of a contiguous page table for p0/1 space. * @@ -155,7 +154,7 @@ /* Locate the S0 pte that describes the page pointed to by s0addr */ s0pte = GET_SPTE_VIRT(s0addr); -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG /* Is it already pointing somewhere? */ if (pte_present(*s0pte)) printk(KERN_DEBUG "VAXMM: S0 pte %8p already valid in " @@ -164,9 +163,9 @@ #endif /* zap the map */ set_pte(s0pte,mk_pte(page, __pgprot(_PAGE_VALID|_PAGE_KW))); - + flush_tlb_all(); -} +} /* * Invalidate the S0 pte that was remapped to point at this page in the @@ -184,7 +183,7 @@ /* Locate the S0 pte that describes the page pointed to by pte_page */ s0pte = GET_SPTE_VIRT(page); -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "unmap_pgtable_page: s0addr %p, s0pte %p\n", page, s0pte); #endif @@ -218,7 +217,7 @@ * Updated atp Mar 2002. pgd_populate, remove PGD_SPECIAL botch. */ unsigned int is_p1 = pgd->segment; - pmd_t *s0addr; + pmd_t *s0addr; #ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM: Calling pgd_populate with (mm=%8p, pgd=%8p, " @@ -251,14 +250,15 @@ clear_page(pmd); remap_pgtable_page(s0addr, virt_to_page(pmd)); -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM: pmd_alloc: pgd %8p, pgd->br %8lx, pgd->lr " - "%8lx, \n\tpgd->pmd %8p\n",pgd,pgd->br, pgd->lr, pgd->pmd); -#endif + "%8lx, \n\tpgd->pmd %8p\n", + pgd,pgd->br, pgd->lr, pgd->pmd); +#endif return; } -/* +/* * pmd_populate is called when the MM core wants to make a page in * a process page table valid. The core has already allocated a * page for this, and it now wants for us to use this page to @@ -273,9 +273,9 @@ * We used to check against WSMAX and STKMAX here, but we now do this * check in pte_alloc_one(), where it's easier to check (since pte_alloc_one() * is handed the user address). - * + * * We make use of the knowledge that the pmd is a single block, to work back - * to the pgd, which is where the base and length register values are held. + * to the pgd, which is where the base and length register values are held. * * FIXMES: page table locking. */ @@ -291,7 +291,7 @@ pgd_t *pgd_entry; /* Find the start of the page middle directory containing this PMD entry */ - pmd_base = (pmd_t *)((unsigned long)pmd & PTE_TASK_MASK); /* base of the pmd */ + pmd_base = (pmd_t *) ((unsigned long)pmd & PTE_TASK_MASK); /* base of the pmd */ /* The process page table page that we want to remap is at offset pmd_index into the relevant page middle directory */ @@ -313,12 +313,12 @@ page in the process page table */ pte_addr = (pte_t *)(pgd_entry->br + (pmd_index << PAGE_SHIFT)); -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM: pmd_populate: mm %p br %08lx lr %04lx " "pmd %p page %p pte_addr %p reg %d index %04lx\n", mm, pgd_entry->br, pgd_entry->lr, pmd, pte_page, pte_addr, pspace, pmd_index); -#endif +#endif /* Double-map the newly-allocated page to this S0 address */ remap_pgtable_page(pte_addr, pte_page); @@ -351,9 +351,9 @@ pgd_entry->lr = page_index; } -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM: pmd_populate: new lr %04lx\n", pgd_entry->lr); -#endif +#endif /* * If all this work is for the current process, then we need to @@ -361,18 +361,18 @@ */ if (pspace == 0) { if (current->thread.pcb.p0br == pgd_entry->br) { -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM: pmd_populate: updating hardware regs\n"); -#endif +#endif current->thread.pcb.p0lr = pgd_entry->lr * 8; set_vaxmm_regs_p0(pgd_entry); } } else { if (current->thread.pcb.p1br == pgd_entry->br) { -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM: pmd_populate: updating hardware regs\n"); -#endif +#endif current->thread.pcb.p1lr = pgd_entry->lr * 8; set_vaxmm_regs_p1(pgd_entry); } @@ -397,7 +397,7 @@ { pte_t *pte; pte = pmd->pte_page + ((address>>PAGE_SHIFT) & (PTRS_PER_PTE-1)); -#ifdef VAX_MM_PGALLOC_DEBUG +#ifdef VAX_MM_PGALLOC_DEBUG printk(KERN_DEBUG "VAXMM:pte_offset: pmd %p, address %8lx, " "pte_pte %p\n", pmd, address, pte); #endif |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 15:51:33
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6158 Modified Files: init.c Log Message: - Touchup. Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/init.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- init.c 2 Sep 2004 22:37:44 -0000 1.16 +++ init.c 25 Apr 2005 15:50:42 -0000 1.17 @@ -1,6 +1,6 @@ /* $Id$ * initialise the VM system. - * Copyright atp Nov 1998 + * Copyright atp Nov 1998 * GNU GPL */ @@ -18,94 +18,99 @@ #define VAX_INIT_DEBUG -unsigned long empty_zero_page[PAGE_SIZE / - sizeof(unsigned long)] - __attribute__ ((__aligned__(PAGE_SIZE))); +unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] + __attribute__ ((__aligned__(PAGE_SIZE))); pte_t *pg0; struct pgd_cache pgd_free_list; -/* We don't use the TLB shootdown stuff yet, but we need this to keep - the generic TLB shootdown code happy */ - +/* + * We don't use the TLB shootdown stuff yet, but we need this to keep + * the generic TLB shootdown code happy. + */ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); -/* This is task 0's PGD structure. Entries 4 and 5 will be filled with - the system page table base and size by head.S. The remaining - entries (0 to 3) will be left at zero as there is no valid user - context in task 0. */ - +/* + * This is task 0's PGD structure. Entries 4 and 5 will be filled with + * the system page table base and size by head.S. The remaining + * entries (0 to 3) will be left at zero as there is no valid user + * context in task 0. + */ pgd_t swapper_pg_dir[PTRS_PER_PGD]; pmd_t swapper_pm_dir[2048] __attribute__ ((__aligned__(8192))); /* two pages for the kernel S0 pmd */ /* * In other architectures, paging_init sets up the kernel's page tables. - * In Linux/VAX, this is already done by the early boot code. For the - * physical RAM. In this routine we initialise the remaining areas of + * In Linux/VAX, this is already done by the early boot code. For the + * physical RAM. In this routine we initialise the remaining areas of * the memory, and system page table. */ void __init paging_init(void) { - hwpte_t *pte, *lastpte; - unsigned int ii; - - /* sort out page table. */ - pg0 = (pte_t *)SPT_BASE; - - /* set up pmd */ - swapper_pg_dir[2].pmd = swapper_pm_dir; - - /* FIXME: This is where the VMALLOC stuff from head.S should go */ - - printk("VAXMM: Initialising mm layer for %d tasks of size %dMB\n",TASK_MAXUPRC,(TASK_WSMAX>>20)); - /* - * Size the process page table slots. See asm/mm/task.h for details - * The _START and _END macros are from pgtable.h - * This is all in PAGELETS and HWPTES, hence no set_pte - */ - pte = (hwpte_t *)GET_SPTE_VIRT(VMALLOC_END); - lastpte = (hwpte_t *)GET_SPTE_VIRT(TASKPTE_START); - ii=0; - /* clear this area */ - while (pte<lastpte) { - *pte++ = __hwpte(0x00000000); - ii++; - } - /* this is stored in hwptes */ - SPT_LEN += ii; - - pte = (hwpte_t *)GET_SPTE_VIRT(TASKPTE_START); - lastpte = pte + SPT_HWPTES_TASKPTE; - /* clear this area */ - while (pte<lastpte) { - *pte++ = __hwpte(0x00000000); - } - /* this is stored in hwptes */ - SPT_LEN += SPT_HWPTES_TASKPTE; - __mtpr(SPT_LEN, PR_SLR); - flush_tlb(); + hwpte_t *pte, *lastpte; + unsigned int ii; - printk("VAXMM: system page table base %8lx, length (bytes) %8lx length (ptes) %8lx\n",SPT_BASE,SPT_SIZE,SPT_LEN); + /* Sort out page table. */ + pg0 = (pte_t *) SPT_BASE; + + /* Set up pmd */ + swapper_pg_dir[2].pmd = swapper_pm_dir; + + /* FIXME: This is where the VMALLOC stuff from head.S should go */ + printk("VAXMM: Initialising mm layer for %d tasks of size %dMB\n", + TASK_MAXUPRC, TASK_WSMAX >> 20); + + /* + * Size the process page table slots. See asm/mm/task.h for details + * The _START and _END macros are from pgtable.h + * This is all in PAGELETS and HWPTES, hence no set_pte + */ + pte = (hwpte_t *) GET_SPTE_VIRT(VMALLOC_END); + lastpte = (hwpte_t *) GET_SPTE_VIRT(TASKPTE_START); + ii = 0; + + /* Clear this area */ + while (pte < lastpte) { + *pte++ = __hwpte(0x00000000); + ii++; + } + /* This is stored in hwptes */ + SPT_LEN += ii; + + pte = (hwpte_t *) GET_SPTE_VIRT(TASKPTE_START); + lastpte = pte + SPT_HWPTES_TASKPTE; + /* Clear this area */ + while (pte < lastpte) + *pte++ = __hwpte(0x00000000); + + /* This is stored in hwptes */ + SPT_LEN += SPT_HWPTES_TASKPTE; + __mtpr(SPT_LEN, PR_SLR); + flush_tlb(); + + printk("VAXMM: system page table base %8lx, length (bytes) %8lx length (PTEs) %8lx\n", + SPT_BASE, SPT_SIZE, SPT_LEN); } #if DEBUG_POISON static void kill_page(unsigned long pg) { - unsigned long *p = (unsigned long *) pg; - unsigned long i = PAGE_SIZE, v = 0xdeadbeefdeadbeef; - do { - p[0] = v; - p[1] = v; - p[2] = v; - p[3] = v; - p[4] = v; - p[5] = v; - p[6] = v; - p[7] = v; - i -= 64; - p += 8; - } while (i != 0); + unsigned long *p = (unsigned long *) pg; + unsigned long i = PAGE_SIZE, v = 0xdeadbeefdeadbeef; + + do { + p[0] = v; + p[1] = v; + p[2] = v; + p[3] = v; + p[4] = v; + p[5] = v; + p[6] = v; + p[7] = v; + i -= 64; + p += 8; + } while (i != 0); } #else #define kill_page(pg) @@ -113,29 +118,30 @@ void mem_init(void) { - max_mapnr = num_physpages = max_low_pfn; + max_mapnr = num_physpages = max_low_pfn; - /* clear the zero-page */ - memset(empty_zero_page, 0, PAGE_SIZE); - - /* this will put all low memory onto the freelists */ - - totalram_pages += free_all_bootmem(); - high_memory = (void *) __va((max_low_pfn) * PAGE_SIZE); + /* Clear the zero-page */ + memset(empty_zero_page, 0, PAGE_SIZE); - printk("Memory: %luk/%luk available\n", - (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), max_mapnr << (PAGE_SHIFT-10)); + /* This will put all low memory onto the freelists */ + totalram_pages += free_all_bootmem(); + high_memory = (void *) __va((max_low_pfn) * PAGE_SIZE); - return; + printk("Memory: %luk/%luk available\n", + (unsigned long) nr_free_pages() << (PAGE_SHIFT - 10), + max_mapnr << (PAGE_SHIFT - 10)); + + return; } static void free_reserved_mem(void *start, void *end) { void *__start = start; + for (; __start < end; __start += PAGE_SIZE) { ClearPageReserved(virt_to_page(__start)); set_page_count(virt_to_page(__start), 1); - free_page((long)__start); + free_page((long) __start); totalram_pages++; } } @@ -144,39 +150,39 @@ { extern char __init_begin, __init_end; - free_reserved_mem(&__init_begin, &__init_end); + free_reserved_mem(&__init_begin, &__init_end); printk("Freeing unused kernel memory: %dk freed\n", - (&__init_end - &__init_begin) >> 10); + (&__init_end - &__init_begin) >> 10); } void show_mem(void) { - long i,free = 0,total = 0,reserved = 0; + long i, free = 0, total = 0, reserved = 0; long shared = 0, cached = 0; printk("\nMem-info:\n"); show_free_areas(); - printk("Free swap: %6ldkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); + printk("Free swap: %6ldkB\n", nr_swap_pages << (PAGE_SHIFT - 10)); i = max_mapnr; while (i-- > 0) { total++; - if (PageReserved(mem_map+i)) + if (PageReserved(mem_map + i)) reserved++; - else if (PageSwapCache(mem_map+i)) + else if (PageSwapCache(mem_map + i)) cached++; - else if (!page_count(mem_map+i)) + else if (!page_count(mem_map + i)) free++; else shared += page_count(mem_map + i) - 1; } - printk("%ld pages of RAM\n",total); - printk("%ld free pages\n",free); - printk("%ld reserved pages\n",reserved); - printk("%ld pages shared\n",shared); - printk("%ld pages swap cached\n",cached); - printk("%ld pages in PGD cache\n",pgd_free_list.size); + printk("%ld pages of RAM\n", total); + printk("%ld free pages\n", free); + printk("%ld reserved pages\n", reserved); + printk("%ld pages shared\n", shared); + printk("%ld pages swap cached\n", cached); + printk("%ld pages in PGD cache\n", pgd_free_list.size); } |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 15:41:00
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31564 Modified Files: fault.c Log Message: - Whitespace only. - In page_fault_handler(), why isn't 'active' set to one? Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/fault.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- fault.c 10 Oct 2003 21:06:57 -0000 1.7 +++ fault.c 25 Apr 2005 15:40:32 -0000 1.8 @@ -2,9 +2,9 @@ * linux/arch/alpha/mm/fault.c * * Copyright (C) 1995 Linus Torvalds - * + * * Copyright (C) 2001 Kenn Humborg, Andy Phillips, David Airlie - * (Vax Porting team) + * (VAX Porting Team) */ #include <linux/sched.h> @@ -31,8 +31,8 @@ /* - * This routine handles page faults and access violations. It - * determines the address, and the problem, and then passes + * This routine handles page faults and access violations. It + * determines the address, and the problem, and then passes * it off to handle_mm_fault(). * * reason: @@ -47,10 +47,10 @@ #define REASON_PPTEREF (1<<1) #define REASON_WRITE (1<<2) -#undef VAX_MM_DEBUG +#undef VAX_MM_DEBUG #define VAX_MM_DEBUG_USER_FAULTS -static void +static void do_page_fault(struct accvio_info *info, struct pt_regs *regs) { unsigned long address = info->addr; @@ -60,28 +60,33 @@ struct mm_struct *mm = NULL; const struct exception_table_entry *fixup; -#ifdef VAX_MM_DEBUG - printk("mmfault: pid %d fault at %8x, pc %8x, psl %8x, reason %8x\n",current->pid,info->addr, info->pc, info->psl, info->reason); - printk("mmfault:p0br %8lx, p0lr %8lx, p1br %8lx, p1lr %8lx\n",Xmfpr(PR_P0BR),Xmfpr(PR_P0LR),Xmfpr(PR_P1BR),Xmfpr(PR_P1LR)); -#endif - /* This check, and the mm != NULL checks later, will be removed - later, once we actually have a 'current' properly defined */ - if (tsk != NULL) { +#ifdef VAX_MM_DEBUG + printk("mmfault: pid %d fault at %8x, pc %8x, psl %8x, reason %8x\n", + current->pid, info->addr, info->pc, info->psl, info->reason); + printk("mmfault:p0br %8lx, p0lr %8lx, p1br %8lx, p1lr %8lx\n", + Xmfpr(PR_P0BR), Xmfpr(PR_P0LR), Xmfpr(PR_P1BR), Xmfpr(PR_P1LR)); +#endif + /* + * This check, and the mm != NULL checks later, will be removed + * later, once we actually have a 'current' properly defined. + */ + if (tsk != NULL) mm = tsk->mm; - } - /* If we're in an interrupt context, or have no user context, - we must not take the fault. */ + /* + * If we're in an interrupt context, or have no user context, + * we must not take the fault. + */ if (in_interrupt() || !mm) goto no_context; - + down_read (&mm->mmap_sem); vma = find_vma(mm, address); - + if (!vma) goto bad_area; - + if (vma->vm_start <= address) goto good_area; @@ -90,11 +95,11 @@ if (expand_stack(vma, address)) goto bad_area; - -/* - * Ok, we have a good vm_area for this memory access, so - * we can handle it.. - */ + + /* + * Ok, we have a good vm_area for this memory access, so + * we can handle it.. + */ good_area: if (reason & REASON_WRITE) { @@ -120,75 +125,68 @@ default: BUG(); } - + up_read(&mm->mmap_sem); return; -/* - * Something tried to access memory that isn't in our memory map.. - * Fix it, but check if it's kernel or user first.. - */ + /* + * Something tried to access memory that isn't in our memory map.. + * Fix it, but check if it's kernel or user first.. + */ bad_area: - up_read(&mm->mmap_sem); if (user_mode(regs)) { -#ifdef VAX_MM_DEBUG_USER_FAULTS - printk(KERN_ALERT "Unable to do USER paging request: " - "pid %d, virtual address %08lx, reason mask %08x, " - "PC %08x, PSL %08x\n", - current->pid, address, reason, info->pc, info->psl); - - show_regs(regs); - show_cpu_regs(); - printk("\nStack dump\n"); - hex_dump( (void *)(regs->fp&~0xf), 512); - - printk("do_page_fault: sending SIGSEGV\n"); -#endif +#ifdef VAX_MM_DEBUG_USER_FAULTS + printk(KERN_ALERT "Unable to do USER paging request: " + "pid %d, virtual address %08lx, " + "reason mask %08x, PC %08x, PSL %08x\n", + current->pid, address, reason, info->pc, + info->psl); + show_regs(regs); + show_cpu_regs(); + printk("\nStack dump\n"); + hex_dump((void *) (regs->fp & ~0xf), 512); + printk(KERN_ALERT "do_page_fault: sending SIGSEGV\n"); +#endif force_sig(SIGSEGV, current); return; } no_context: - - /* Are we prepared to handle this fault as an exception? */ + /* Are we prepared to handle this fault as an exception? */ if ((fixup = search_exception_tables(regs->pc)) != NULL) { regs->pc = fixup->fixup; return; } -/* - * Oops. The kernel tried to access some bad page. We'll have to - * terminate things with extreme prejudice. - */ - + /* + * Oops. The kernel tried to access some bad page. We'll have to + * terminate things with extreme prejudice. + */ printk(KERN_ALERT "Unable to handle kernel paging request at " - "virtual address %08lx, reason mask %08x, " - "PC %08x, PSL %08x\n", - address, reason, info->pc, info->psl); - printk("\nStack dump\n"); - hex_dump((void *)(regs->sp), 256); + "virtual address %08lx, reason mask %08x, " + "PC %08x, PSL %08x\n", + address, reason, info->pc, info->psl); + printk("\nStack dump\n"); + hex_dump((void *) regs->sp, 256); show_stack(current, NULL); - show_regs(regs); - show_cpu_regs(); + show_regs(regs); + show_cpu_regs(); machine_halt(); - -/* - * We ran out of memory, or some other thing happened to us that made - * us unable to handle the page fault gracefully. - */ + /* + * We ran out of memory, or some other thing happened to us that made + * us unable to handle the page fault gracefully. + */ out_of_memory: - if (current->pid == 1) - { + if (current->pid == 1) { yield(); goto survive; } up_read(&mm->mmap_sem); - if (user_mode(regs)) - { + if (user_mode(regs)) { printk("VM: killing process %s\n", current->comm); do_exit(SIGKILL); } @@ -206,32 +204,32 @@ /* Kernel mode? Handle exceptions or die */ if (!user_mode(regs)) goto no_context; - } -/* This is the access violation handler */ - +/* + * This is the access violation handler. + */ void accvio_handler(struct pt_regs *regs, void *excep_info) { - struct accvio_info *info = (struct accvio_info *)excep_info; + struct accvio_info *info = (struct accvio_info *) excep_info; static int active; - /* This active flag is just a temporary hack to help catch - accvios in the page fault handler. It will have to - go eventually as it's not SMP safe */ + /* + * This active flag is just a temporary hack to help catch + * accvios in the page fault handler. It will have to + * go eventually as it's not SMP safe. + */ if (!active) { active = 1; do_page_fault(info, regs); active = 0; - } else { - printk("\nNested access violation: reason mask %02x, " "addr %08x, PC %08x, PSL %08x\n", info->reason, info->addr, info->pc, info->psl); printk("\nStack dump\n"); - hex_dump((void *)(regs->sp), 256); + hex_dump((void *) regs->sp, 256); show_stack(current, NULL); show_regs(regs); show_cpu_regs(); @@ -240,33 +238,34 @@ } } -/* This is the page fault handler */ - +/* + * This is the page fault handler. + */ void page_fault_handler(struct pt_regs *regs, void *excep_info) { struct accvio_info *info = (struct accvio_info *)excep_info; static int active; - - /* This active flag is just a temporary hack to help catch - accvios in the page fault handler. It will have to - go eventually as it's not SMP safe */ + /* + * This active flag is just a temporary hack to help catch + * accvios in the page fault handler. It will have to + * go eventually as it's not SMP safe. + */ if (!active) { + /* FIXME: Why is this commented out? */ /* active = 1;*/ do_page_fault(info, regs); -#ifdef VAX_MM_DEBUG +#ifdef VAX_MM_DEBUG printk("finished fault\n"); -#endif +#endif active = 0; - } else { - printk("\nNested page fault: reason mask %02x, " "addr %08x, PC %08x, PSL %08x\n", info->reason, info->addr, info->pc, info->psl); printk("\nStack dump\n"); - hex_dump((void *)(regs->sp), 256); + hex_dump((void *) regs->sp, 256); show_stack(current, NULL); show_regs(regs); show_cpu_regs(); @@ -274,3 +273,4 @@ machine_halt(); } } + |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 15:30:09
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26368 Modified Files: mkbootblk.c Log Message: - Touchup Index: mkbootblk.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/tools/mkbootblk.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mkbootblk.c 6 Oct 2003 01:00:05 -0000 1.1 +++ mkbootblk.c 25 Apr 2005 15:29:43 -0000 1.2 @@ -63,11 +63,12 @@ block.hdr.imgdesc.blk_count = (kernelstat.st_size + 511) / 512; block.hdr.imgdesc.load_offset = 0; block.hdr.imgdesc.start_offset = 0; - block.hdr.imgdesc.checksum = block.hdr.imgdesc.blk_count + - block.hdr.imgdesc.load_offset + - block.hdr.imgdesc.start_offset; + block.hdr.imgdesc.checksum = block.hdr.imgdesc.blk_count + + block.hdr.imgdesc.load_offset + + block.hdr.imgdesc.start_offset; fwrite(&block, sizeof(block), 1, stdout); return 0; } + |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 15:27:57
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25710 Modified Files: setcmdline.c Log Message: - Touchup. Index: setcmdline.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/tools/setcmdline.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- setcmdline.c 13 Oct 2003 01:04:50 -0000 1.2 +++ setcmdline.c 25 Apr 2005 15:27:49 -0000 1.3 @@ -7,62 +7,67 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#define COMMAND_LINE_SIZE 256 -#define COMMAND_LINE_OFFSET 0x204 +#define COMMAND_LINE_SIZE 256 +#define COMMAND_LINE_OFFSET 0x204 -int called_as(char *str1, char *str2) -{ - char *tmp; - - tmp = strrchr(str1,'/'); - if (tmp==NULL) tmp=str1; else tmp++; -// printf("%s %s, %s\n",str1,str2,tmp); - return (!strncmp(tmp,str2,strlen(str2))); +static int called_as(char *str1, char *str2) { + char *tmp; + + tmp = strrchr(str1,'/'); + if (!tmp) + tmp = str1; + else + tmp++; + + return !strncmp(tmp, str2, strlen(str2)); } -int main (int argc, char *argv[]) -{ - int kern_fd; - char buffer[COMMAND_LINE_SIZE]; - - if (called_as(argv[0],"showcmdline")) { - if (argc < 2) { - printf ("usage: showcmdline kernel_image\n"); - exit(1); - } - }else { - if (argc < 3) { - printf ("usage: setcmdline kernel_image \"command line\"\n"); - exit(1); - } - } - - if ((kern_fd=open(argv[1], O_RDWR))<0) { - perror(argv[1]); - exit(1); - } - memset(buffer,0,COMMAND_LINE_SIZE); +int main (int argc, char *argv[]) { + int kern_fd; + char buffer[COMMAND_LINE_SIZE]; - if (called_as(argv[0],"setcmdline")) { - - if (strlen(argv[2])>=COMMAND_LINE_SIZE) { - printf("Warning: Command Line truncated to %d bytes!\n",COMMAND_LINE_SIZE-1); - } - strncpy(buffer,argv[2],(COMMAND_LINE_SIZE-1)); - lseek(kern_fd,COMMAND_LINE_OFFSET,SEEK_SET); - -/* printf("\n\nSetting kernel command line to:\n\t%s\n\n",buffer); */ - write(kern_fd,buffer,strlen(buffer)); - write(kern_fd,"\0",1); - } else { - lseek(kern_fd,COMMAND_LINE_OFFSET,SEEK_SET); - read(kern_fd,buffer,(COMMAND_LINE_SIZE-1)); - printf("\nKernel command line is:\n\t%s\n",buffer); - } - close(kern_fd); + if (called_as(argv[0], "showcmdline")) { + if (argc < 2) { + printf ("usage: showcmdline kernel_image\n"); + exit(EXIT_FAILURE); + } + } else { + if (argc < 3) { + printf ("usage: setcmdline kernel_image \"command line\"\n"); + exit(EXIT_FAILURE); + } + } - return 0; + kern_fd = open(argv[1], O_RDWR); + if (kern_fd < 0) { + perror(argv[1]); + exit(EXIT_FAILURE); + } + + memset(buffer, 0, COMMAND_LINE_SIZE); + + if (called_as(argv[0], "setcmdline")) { + /* + * setcmdline + */ + if (strlen(argv[2]) >= COMMAND_LINE_SIZE) { + printf("Warning: Command Line truncated to %d bytes!\n", + COMMAND_LINE_SIZE - 1); + } + strncpy(buffer, argv[2], COMMAND_LINE_SIZE - 1); + lseek(kern_fd, COMMAND_LINE_OFFSET, SEEK_SET); + write(kern_fd,buffer,strlen(buffer)); + write(kern_fd,"\0",1); + } else { + /* + * showcmdline + */ + lseek(kern_fd, COMMAND_LINE_OFFSET, SEEK_SET); + read(kern_fd,buffer, COMMAND_LINE_SIZE - 1); + printf("\nKernel command line is:\n\t%s\n", buffer); + } + + close(kern_fd); + return 0; } - - |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 14:43:11
|
Update of /cvsroot/linux-vax/kernel-2.5/Documentation/vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv718/Documentation/vax Modified Files: keep_an_eye_on.txt Log Message: - __iomem and verify_area() should now be done. Index: keep_an_eye_on.txt =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/Documentation/vax/keep_an_eye_on.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- keep_an_eye_on.txt 5 Apr 2005 12:12:02 -0000 1.3 +++ keep_an_eye_on.txt 25 Apr 2005 14:42:43 -0000 1.4 @@ -7,12 +7,6 @@ - Mar 4, 2005: "Re: [PATCH] new driver for ITM Touch touchscreen" Use input_set_abs_params() to set the coordinate range for the digitizer. -- Mar 4, 2005, "[PATCH][0/10] verify_area cleanup" - Check if we're using verify_area() anywhere and change it over to - access_ok(): - - if (verify_area(VERIFY_WRITE, buf, count)) - + if (!access_ok(VERIFY_WRITE, buf, count)) - - Mar 7, 2005: "[0/many] Acrypto - asynchronous crypto layer for linux kernel 2.6" If the asynchronous crypto stuff is accepted, don't forget to add 'source "acrypto/Kconfig"' into ./arch/vax/Kconfig, somewhere between @@ -30,8 +24,3 @@ - schedule_timeout(30*HZ/100); + msleep(300); -- Apr 5, 2005: __iomem markers - The result of ioremap() and pci_iomap() etc. shall be assigned to variables - like "void __iomem *ioaddr;". This helps the "sparse" tool to find - pointer access errors. - |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 14:35:31
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27961/kernel Modified Files: clock.c interrupt.c signal.c Log Message: - Numerous touchups. - verify_area() -> access_ok() - Deprecate verify_area() Index: clock.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/clock.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- clock.c 25 Apr 2005 09:18:48 -0000 1.7 +++ clock.c 25 Apr 2005 14:35:02 -0000 1.8 @@ -33,7 +33,7 @@ /* this does nothing, and is a placeholder */ void generic_clock_init(void) { - printk (KERN_WARN "No RTC used\n"); + printk (KERN_WARNING "No RTC used\n"); return; } Index: signal.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/signal.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- signal.c 18 Nov 2004 09:29:32 -0000 1.14 +++ signal.c 25 Apr 2005 14:35:02 -0000 1.15 @@ -2,7 +2,7 @@ * linux/arch/vax/kernel/signal.c * * From arch/cris/kernel/signal.c - * + * * Based on arch/i386/kernel/signal.c by * Copyright (C) 1991, 1992 Linus Torvalds * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson * @@ -14,7 +14,7 @@ * Authors: Bjorn Wesen (bj...@ax...) * VAX port at...@pe.... * + David Airlie Copyright (C) 2003 - * See syscall.c for details of the call stack layout etc... + * See syscall.c for details of the call stack layout etc... */ #include <linux/sched.h> @@ -38,7 +38,7 @@ #undef DEBUG_SIG /* FIXME: Check this & fixup other regs, like r0 */ -#define RESTART_VAX_SYSCALL(regs) { (regs)->pc -= 4; } +#define RESTART_VAX_SYSCALL(regs) { (regs)->pc -= 4; } #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) @@ -70,8 +70,8 @@ } /* - * atp - it is a little confusing, looking at other ports, as to what the arguments to - * this function are. I'm assuming two args, plus our pushed pt_regs set up by syscall + * atp - it is a little confusing, looking at other ports, as to what the arguments to + * this function are. I'm assuming two args, plus our pushed pt_regs set up by syscall */ int sys_rt_sigsuspend(struct pt_regs *regs,sigset_t *unewset, size_t sigsetsize) @@ -101,18 +101,18 @@ } } -int +int sys_sigaction(int sig, const struct old_sigaction *act, - struct old_sigaction *oact) + struct old_sigaction *oact) { struct k_sigaction new_ka, old_ka; int ret; if (act) { old_sigset_t mask; - if (verify_area(VERIFY_READ, act, sizeof(*act)) || - __get_user(new_ka.sa.sa_handler, &act->sa_handler) || - __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) + if (!access_ok(VERIFY_READ, act, sizeof(*act)) || + __get_user(new_ka.sa.sa_handler, &act->sa_handler) || + __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) return -EFAULT; __get_user(new_ka.sa.sa_flags, &act->sa_flags); __get_user(mask, &act->sa_mask); @@ -122,9 +122,9 @@ ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); if (!ret && oact) { - if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || - __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || - __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) + if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || + __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || + __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) return -EFAULT; __put_user(old_ka.sa.sa_flags, &oact->sa_flags); __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); @@ -137,24 +137,23 @@ sys_sigaltstack(const stack_t *uss, stack_t *uoss) { struct pt_regs *regs = (struct pt_regs *) &uss; - return do_sigaltstack(uss, uoss, regs->sp ); + + return do_sigaltstack(uss, uoss, regs->sp); } /* * Do a signal return; undo the signal stack. */ - struct sigframe { - int sig; + int sig; struct sigcontext sc; unsigned long extramask[_NSIG_WORDS-1]; unsigned char retcode[20]; /* trampoline code */ }; - struct rt_sigframe { - int sig; + int sig; struct siginfo *pinfo; void *puc; struct siginfo info; @@ -162,32 +161,34 @@ unsigned char retcode[20]; /* trampoline code */ }; - static int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) { unsigned int err = 0; - /* restore the regs from &sc->regs (same as sc, since regs is first) + /* + * Restore the regs from &sc->regs (same as sc, since regs is first) * (sc is already checked for VERIFY_READ since the sigframe was - * checked in sys_sigreturn previously) + * checked in sys_sigreturn previously). */ if (__copy_from_user(regs, sc, sizeof(struct pt_regs))) - goto badframe; + goto badframe; /* FIXME: check user mode flag in restored regs PSW */ - - /* restore the old USP as it was before we stacked the sc etc. + + /* + * Restore the old USP as it was before we stacked the sc etc. * (we cannot just pop the sigcontext since we aligned the sp and - * stuff after pushing it) + * stuff after pushing it). */ - - /* FIXME: check process stack */ - - /* TODO: the other ports use regs->orig_XX to disable syscall checks + + /* FIXME: check process stack */ + + /* + * TODO: the other ports use regs->orig_XX to disable syscall checks * after this completes, but we don't use that mechanism. maybe we can - * use it now ? + * use it now ? */ return err; @@ -199,23 +200,23 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs) { - struct sigframe *frame = (struct sigframe *)(regs->sp); + struct sigframe *frame = (struct sigframe *) (regs->sp); sigset_t set; /* * Since we stacked the signal on a dword boundary, - * then frame should be dword aligned here. If it's + * then frame should be dword aligned here. If it's * not, then the user is trying to mess with us. */ - if (((long)frame) & 3) + if (((long) frame) & 3) goto badframe; - if (verify_area(VERIFY_READ, frame, sizeof(*frame))) + if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.oldmask) - || (_NSIG_WORDS > 1 - && __copy_from_user(&set.sig[1], &frame->extramask, - sizeof(frame->extramask)))) + || (_NSIG_WORDS > 1 + && __copy_from_user(&set.sig[1], &frame->extramask, + sizeof(frame->extramask)))) goto badframe; sigdelsetmask(&set, ~_BLOCKABLE); @@ -223,7 +224,7 @@ current->blocked = set; recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - + if (restore_sigcontext(regs, &frame->sc)) goto badframe; @@ -234,24 +235,24 @@ badframe: force_sig(SIGSEGV, current); return 0; -} +} asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) { - struct rt_sigframe *frame = (struct rt_sigframe *)(regs->sp-8); + struct rt_sigframe *frame = (struct rt_sigframe *) (regs->sp-8); sigset_t set; stack_t st; /* * Since we stacked the signal on a dword boundary, - * then frame should be dword aligned here. If it's + * then frame should be dword aligned here. If it's * not, then the user is trying to mess with us. */ - if (((long)frame) & 3) + if (((long) frame) & 3) goto badframe; - if (verify_area(VERIFY_READ, frame, sizeof(*frame))) + if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) goto badframe; @@ -261,14 +262,16 @@ current->blocked = set; recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - + if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) goto badframe; if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) goto badframe; - /* It is more difficult to avoid calling this function than to - call it and ignore errors. */ + /* + * It is more difficult to avoid calling this function than to + * call it and ignore errors. + */ do_sigaltstack(&st, NULL, (regs->sp)); return regs->r0; @@ -276,12 +279,11 @@ badframe: force_sig(SIGSEGV, current); return 0; -} +} /* * Set up a signal frame. */ - static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, unsigned long mask) { @@ -301,7 +303,7 @@ /* figure out where we want to put the new signal frame - usually on the stack */ static inline void * -get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) +get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) { unsigned long sp = regs->sp; @@ -312,38 +314,36 @@ } /* make sure the frame is dword-aligned */ - + sp &= ~3; return (void *)(sp - frame_size); } -/* grab and setup a signal frame. - * - * basically we stack a lot of state info, and arrange for the +/* Grab and setup a signal frame. + * + * Basically we stack a lot of state info, and arrange for the * user-mode program to return to the kernel using either a * trampoline which performs the syscall sigreturn, or a provided * user-mode trampoline. */ - static void setup_frame(int sig, struct k_sigaction *ka, - sigset_t *set, struct pt_regs * regs) + sigset_t *set, struct pt_regs *regs) { struct sigframe *frame; int err = 0; frame = get_sigframe(ka, regs, sizeof(*frame)); - - -#ifdef DEBUG_SIG + +#ifdef DEBUG_SIG printk("setup_frame: pid %d, sig %d, regs %p, regs->sp %p, frame %p, sigaction %p\n",current->pid,sig,regs,regs->sp,frame,ka); show_regs(regs); -#endif +#endif if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; /* write the signal onto the stack */ - err |= __put_user(sig, (unsigned int *)&frame->sig); + err |= __put_user(sig, (unsigned int *) &frame->sig); err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); if (err) goto give_sigsegv; @@ -355,49 +355,56 @@ if (err) goto give_sigsegv; - /* Set up to return from userspace. If provided, use a stub - already in userspace. */ - - /* We do this differently to other ports. Each function has a two byte RSM. - * (due to the calling convention). Each sighandler will expect to be - * CALLS'd and will RET from that. So we cant just muck about with PC's on the - * stack like the i386. So we use the trampoline code on the stack a bit more. - * The easiest way to skip around all this is to calls the signal - * handler, and then either calls the restorer, or chmk to sys_sigreturn */ - - /* CALLS $1, */ - err |= __put_user(0xfb, (char *)(frame->retcode+0)); - err |= __put_user(0x01, (char *)(frame->retcode+1)); - /* (absolute address)*/ - err |= __put_user(0x9f, (char *)(frame->retcode+2)); - /* sighandler */ - err |= __put_user(((unsigned long) ka->sa.sa_handler), (unsigned long *)(frame->retcode + 3)); - + /* + * Set up to return from userspace. If provided, use a stub + * already in userspace. + * + * We do this differently to other ports. Each function has a two + * byte RSM (due to the calling convention). Each sighandler will + * expect to be CALLS'd and will RET from that. So we cant just muck + * about with PC's on the stack like the i386. So we use the + * trampoline code on the stack a bit more. The easiest way to skip + * around all this is to calls the signal handler, and then either + * calls the restorer, or chmk to sys_sigreturn. + */ + + /* CALLS $1, */ + err |= __put_user(0xfb, (char *) (frame->retcode + 0)); + err |= __put_user(0x01, (char *) (frame->retcode + 1)); + /* (absolute address)*/ + err |= __put_user(0x9f, (char *) (frame->retcode + 2)); + /* sighandler */ + err |= __put_user(((unsigned long) ka->sa.sa_handler), + (unsigned long *) (frame->retcode + 3)); + if (ka->sa.sa_flags & SA_RESTORER) { - /* CALLS $0,*/ - err |= __put_user(0xfb, (char *)(frame->retcode+7)); - err |= __put_user(0x00, (char *)(frame->retcode+8)); - /* (absolute address)*/ - err |= __put_user(0x9f, (char *)(frame->retcode+9)); - /* restorer */ - err |= __put_user(((unsigned long) ka->sa.sa_restorer), (unsigned long *)(frame->retcode + 10)); + /* CALLS $0,*/ + err |= __put_user(0xfb, (char *) (frame->retcode + 7)); + err |= __put_user(0x00, (char *) (frame->retcode + 8)); + /* (absolute address)*/ + err |= __put_user(0x9f, (char *) (frame->retcode + 9)); + /* restorer */ + err |= __put_user(((unsigned long) ka->sa.sa_restorer), + (unsigned long *) (frame->retcode + 10)); /* plus a halt */ - err |= __put_user(0x00, (char *)(frame->retcode+14)); + err |= __put_user(0x00, (char *) (frame->retcode + 14)); } else { - /* perform a syscall to sys_sigreturn. First set up the - * argument list to avoid confusing it */ - - /* pushl $0x0 */ - err |= __put_user(0xdd, (char *)(frame->retcode+7)); - err |= __put_user(0x00, (char *)(frame->retcode+8)); + /* + * Perform a syscall to sys_sigreturn. First set up the + * argument list to avoid confusing it. + */ + + /* pushl $0x0 */ + err |= __put_user(0xdd, (char *) (frame->retcode + 7)); + err |= __put_user(0x00, (char *) (frame->retcode + 8)); /* movl sp, ap */ - err |= __put_user(0xd0, (char *)(frame->retcode+9)); - err |= __put_user(0x5e, (char *)(frame->retcode+10)); - err |= __put_user(0x5c, (char *)(frame->retcode+11)); + err |= __put_user(0xd0, (char *) (frame->retcode + 9)); + err |= __put_user(0x5e, (char *) (frame->retcode + 10)); + err |= __put_user(0x5c, (char *) (frame->retcode + 11)); /* chmk __NR_sigreturn; */ - err |= __put_user(0xbc, (char *)(frame->retcode+12)); - err |= __put_user(0x8f, (char *)(frame->retcode+13)); - err |= __put_user(__NR_sigreturn, (short *)(frame->retcode+14)); + err |= __put_user(0xbc, (char *) (frame->retcode + 12)); + err |= __put_user(0x8f, (char *) (frame->retcode + 13)); + err |= __put_user(__NR_sigreturn, (short *) (frame->retcode + 14)); /* plus a halt */ err |= __put_user(0x00, (char *)(frame->retcode+16)); } @@ -405,79 +412,85 @@ if (err) goto give_sigsegv; -#ifdef DEBUG_SIG - printk("setup_frame: pid %d, frame->retcode %p, sa_handler %p\n",current->pid,frame->retcode,ka->sa.sa_handler); +#ifdef DEBUG_SIG + printk("setup_frame: pid %d, frame->retcode %p, sa_handler %p\n", + current->pid, + frame->retcode, + ka->sa.sa_handler); #endif - /* Set up registers for signal handler */ - - regs->pc = (unsigned long) frame->retcode; /* what we enter NOW */ - regs->fp = regs->sp; - regs->sp = (unsigned int)frame; - __mtpr(frame,PR_USP); /* and into to the register, ready for REI */ + /* Set up registers for signal handler. */ + regs->pc = (unsigned long) frame->retcode; /* What we enter NOW. */ + regs->fp = regs->sp; + regs->sp = (unsigned int) frame; + __mtpr(frame,PR_USP); /* and into to the register, ready for REI */ -#ifdef DEBUG_SIG - printk("setup_frame: pid %d, regs->pc %8lx, regs->sp %8lx, regs->ap %8lx\n",current->pid,regs->pc,regs->sp,regs->ap); - { - unsigned char c[4]; - __get_user(c[0], (char *)&frame->sig); - __get_user(c[1], (char *)&frame->sig+1); - __get_user(c[2], (char *)&frame->sig+2); - __get_user(c[3], (char *)&frame->sig+3); - printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", - &frame->sig, c[0], - &frame->sig+1, c[1], - &frame->sig+2, c[2], - &frame->sig+3, c[3]); - } - { - unsigned char c[4]; - __get_user(c[0], (char *)frame->retcode); - __get_user(c[1], (char *)frame->retcode+1); - __get_user(c[2], (char *)frame->retcode+2); - __get_user(c[3], (char *)frame->retcode+3); - printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", - frame->retcode, c[0], - frame->retcode+1, c[1], - frame->retcode+2, c[2], - frame->retcode+3, c[3]); - } - { - unsigned char c[4]; - __get_user(c[0], (char *)frame->retcode+4); - __get_user(c[1], (char *)frame->retcode+5); - __get_user(c[2], (char *)frame->retcode+6); - __get_user(c[3], (char *)frame->retcode+7); - printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", - frame->retcode+4, c[0], - frame->retcode+5, c[1], - frame->retcode+6, c[2], - frame->retcode+7, c[3]); - } - { - unsigned char c[4]; - __get_user(c[0], (char *)frame->retcode+8); - __get_user(c[1], (char *)frame->retcode+9); - __get_user(c[2], (char *)frame->retcode+10); - __get_user(c[3], (char *)frame->retcode+11); - printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", - frame->retcode+8, c[0], - frame->retcode+9, c[1], - frame->retcode+10, c[2], - frame->retcode+11, c[3]); - } - { - unsigned char c[4]; - __get_user(c[0], (char *)frame->retcode+12); - __get_user(c[1], (char *)frame->retcode+13); - __get_user(c[2], (char *)frame->retcode+14); - __get_user(c[3], (char *)frame->retcode+15); - printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", - frame->retcode+12, c[0], - frame->retcode+13, c[1], - frame->retcode+14, c[2], - frame->retcode+15, c[3]); - } -#endif +#ifdef DEBUG_SIG + printk("setup_frame: pid %d, regs->pc %8lx, regs->sp %8lx, regs->ap %8lx\n", + current->pid, + regs->pc, + regs->sp, + regs->ap); + { + unsigned char c[4]; + __get_user(c[0], (char *) &frame->sig + 0); + __get_user(c[1], (char *) &frame->sig + 1); + __get_user(c[2], (char *) &frame->sig + 2); + __get_user(c[3], (char *) &frame->sig + 3); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + &frame->sig + 0, c[0], + &frame->sig + 1, c[1], + &frame->sig + 2, c[2], + &frame->sig + 3, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *) frame->retcode + 0); + __get_user(c[1], (char *) frame->retcode + 1); + __get_user(c[2], (char *) frame->retcode + 2); + __get_user(c[3], (char *) frame->retcode + 3); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode + 0, c[0], + frame->retcode + 1, c[1], + frame->retcode + 2, c[2], + frame->retcode + 3, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *) frame->retcode + 4); + __get_user(c[1], (char *) frame->retcode + 5); + __get_user(c[2], (char *) frame->retcode + 6); + __get_user(c[3], (char *) frame->retcode + 7); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode + 4, c[0], + frame->retcode + 5, c[1], + frame->retcode + 6, c[2], + frame->retcode + 7, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *) frame->retcode + 8); + __get_user(c[1], (char *) frame->retcode + 9); + __get_user(c[2], (char *) frame->retcode + 10); + __get_user(c[3], (char *) frame->retcode + 11); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode + 8, c[0], + frame->retcode + 9, c[1], + frame->retcode + 10, c[2], + frame->retcode + 11, c[3]); + } + { + unsigned char c[4]; + __get_user(c[0], (char *) frame->retcode + 12); + __get_user(c[1], (char *) frame->retcode + 13); + __get_user(c[2], (char *) frame->retcode + 14); + __get_user(c[3], (char *) frame->retcode + 15); + printk("setup_frame: %p %1x %p %1x %p %1x %p %1x\n", + frame->retcode + 12, c[0], + frame->retcode + 13, c[1], + frame->retcode + 14, c[2], + frame->retcode + 15, c[3]); + } +#endif return; give_sigsegv: @@ -487,17 +500,17 @@ } static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, - sigset_t *set, struct pt_regs * regs) + sigset_t *set, struct pt_regs * regs) { struct rt_sigframe *frame; int err = 0; frame = get_sigframe(ka, regs, sizeof(*frame)); -#ifdef DEBUG_SIG +#ifdef DEBUG_SIG printk("setup_rt_frame: pid %d, sig %d, regs %p, regs->sp %p, frame %p, sigaction %p\n",current->pid,sig,regs,regs->sp,frame,ka); show_regs(regs); -#endif +#endif if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; @@ -511,59 +524,64 @@ /* Clear all the bits of the ucontext we don't use. */ err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext)); - err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); - err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); - if (err) goto give_sigsegv; - /* Set up to return from userspace. If provided, use a stub - already in userspace. */ + /* + * Set up to return from userspace. If provided, use a stub + * already in userspace. + */ - /* We do this differently to other ports. Each function has a two byte RSM. - * (due to the calling convention). Each sighandler will expect to be + /* + * We do this differently to other ports. Each function has a two byte RSM. + * (due to the calling convention). Each sighandler will expect to be * CALLS'd and will RET from that. So we cant just muck about with PC's on the * stack like the i386. So we use the trampoline code on the stack a bit more. * The easiest way to skip around all this is to calls the signal - * handler, and then either calls the restorer, or chmk to sys_sigreturn */ - - /* CALLS $3, */ - err |= __put_user(0xfb, (char *)(frame->retcode+0)); - err |= __put_user(0x03, (char *)(frame->retcode+1)); - /* (absolute address)*/ - err |= __put_user(0x9f, (char *)(frame->retcode+2)); - /* sighandler */ - err |= __put_user(((unsigned long) ka->sa.sa_handler), (unsigned long *)(frame->retcode + 3)); - + * handler, and then either calls the restorer, or chmk to sys_sigreturn. + */ + + /* CALLS $3, */ + err |= __put_user(0xfb, (char *) (frame->retcode + 0)); + err |= __put_user(0x03, (char *) (frame->retcode + 1)); + /* (absolute address)*/ + err |= __put_user(0x9f, (char *) (frame->retcode + 2)); + /* sighandler */ + err |= __put_user(((unsigned long) ka->sa.sa_handler), + (unsigned long *) (frame->retcode + 3)); + if (ka->sa.sa_flags & SA_RESTORER) { - /* CALLS $0,*/ - err |= __put_user(0xfb, (char *)(frame->retcode+7)); - err |= __put_user(0x00, (char *)(frame->retcode+8)); - /* (absolute address)*/ - err |= __put_user(0x9f, (char *)(frame->retcode+9)); - /* restorer */ - err |= __put_user(((unsigned long) ka->sa.sa_restorer), (unsigned long *)(frame->retcode + 10)); + /* CALLS $0,*/ + err |= __put_user(0xfb, (char *) (frame->retcode + 7)); + err |= __put_user(0x00, (char *) (frame->retcode + 8)); + /* (absolute address)*/ + err |= __put_user(0x9f, (char *) (frame->retcode + 9)); + /* restorer */ + err |= __put_user(((unsigned long) ka->sa.sa_restorer), + (unsigned long *) (frame->retcode + 10)); /* plus a halt */ - err |= __put_user(0x00, (char *)(frame->retcode+14)); + err |= __put_user(0x00, (char *) (frame->retcode + 14)); } else { - /* perform a syscall to sys_sigreturn. First set up the - * argument list to avoid confusing it */ - - /* pushl $0x0 */ - err |= __put_user(0xdd, (char *)(frame->retcode+7)); - err |= __put_user(0x00, (char *)(frame->retcode+8)); + /* + * Perform a syscall to sys_sigreturn. First set up the + * argument list to avoid confusing it. + */ + + /* pushl $0x0 */ + err |= __put_user(0xdd, (char *) (frame->retcode + 7)); + err |= __put_user(0x00, (char *) (frame->retcode + 8)); /* movl sp, ap */ - err |= __put_user(0xd0, (char *)(frame->retcode+9)); - err |= __put_user(0x5e, (char *)(frame->retcode+10)); - err |= __put_user(0x5c, (char *)(frame->retcode+11)); + err |= __put_user(0xd0, (char *) (frame->retcode + 9)); + err |= __put_user(0x5e, (char *) (frame->retcode + 10)); + err |= __put_user(0x5c, (char *) (frame->retcode + 11)); /* chmk __NR_sigreturn; */ - err |= __put_user(0xbc, (char *)(frame->retcode+12)); - err |= __put_user(0x8f, (char *)(frame->retcode+13)); - err |= __put_user(__NR_rt_sigreturn, (short *)(frame->retcode+14)); + err |= __put_user(0xbc, (char *) (frame->retcode + 12)); + err |= __put_user(0x8f, (char *) (frame->retcode + 13)); + err |= __put_user(__NR_rt_sigreturn, (short *) (frame->retcode + 14)); /* plus a halt */ - err |= __put_user(0x00, (char *)(frame->retcode+16)); + err |= __put_user(0x00, (char *) (frame->retcode + 16)); } if (err) @@ -571,8 +589,12 @@ /* TODO what is the current->exec_domain stuff and invmap ? */ -#ifdef DEBUG_SIG - printk("setup_rt_frame: pid %d, frame->retcode %p, sa_handler %p usp %8lX\n",current->pid,frame->retcode,ka->sa.sa_handler,__mfpr(PR_USP)); +#ifdef DEBUG_SIG + printk("setup_rt_frame: pid %d, frame->retcode %p, sa_handler %p usp %8lX\n", + current->pid, + frame->retcode, + ka->sa.sa_handler, + __mfpr(PR_USP)); #endif /* Set up registers for signal handler */ regs->pc = (unsigned long) frame->retcode; /* what we enter NOW */ @@ -589,12 +611,11 @@ } /* - * OK, we're invoking a handler - */ - + * OK, we're invoking a handler. + */ static inline void handle_signal(int canrestart, unsigned long sig, struct k_sigaction *ka, - siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) + siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) { /* Are we from a system call? */ if (canrestart) { @@ -622,14 +643,14 @@ case -ERESTARTNOINTR: /* ERESTARTNOINTR means that the syscall should be called again after the signal handler returns. */ - RESTART_VAX_SYSCALL(regs); + RESTART_VAX_SYSCALL(regs); } } /* Set up the stack frame */ -#ifdef DEBUG_SIG +#ifdef DEBUG_SIG printk("handle_signal: setup_frame(sig=%d,flags=%d,ka=%p,oldset=%d,regs=%p)\n",sig,ka->sa.sa_flags,ka,oldset,regs); -#endif +#endif if (ka->sa.sa_flags & SA_SIGINFO) setup_rt_frame(sig, ka, info, oldset, regs); else @@ -669,14 +690,14 @@ return 1; /* FIXME: */ - canrestart=regs->r0; -#ifdef DEBUG_SIG + canrestart=regs->r0; +#ifdef DEBUG_SIG printk("do_signal: pid %d,canrestart %d, current->sigpending %d,current->blocked %d ", current->pid,canrestart,current->sigpending,current->blocked); -#endif +#endif if (!oldset) oldset = ¤t->blocked; - + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { /* Whee! Actually deliver the signal. */ @@ -687,11 +708,13 @@ /* Did we come from a system call? */ if (canrestart) { /* Restart the system call - no handlers present */ - if (regs->r0 == -ERESTARTNOHAND || - regs->r0 == -ERESTARTSYS || - regs->r0 == -ERESTARTNOINTR) { + if (regs->r0 == -ERESTARTNOHAND + || regs->r0 == -ERESTARTSYS + || regs->r0 == -ERESTARTNOINTR) { RESTART_VAX_SYSCALL(regs); } } + return 0; } + Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/interrupt.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- interrupt.c 28 Mar 2005 16:26:14 -0000 1.28 +++ interrupt.c 25 Apr 2005 14:35:02 -0000 1.29 @@ -32,17 +32,19 @@ union scb_and_device_vectors __attribute__((__aligned__(PAGE_SIZE))) scb; -/* Statically-defined pool of irqvector structures. This will go once - we have a working kmalloc()/kfree(). - - Actually, it's not that simple... trap_init() is called before the - slab caches are initialized so we can't call kmalloc() this early - in initialization. What we could do is statically allocate a small - number of irqvectors here (enough for trap_init() and friends) and - then kmalloc() vectors on demand later. - - An entry in the list is free if the dest_addr field is zero, and - is in use if non-zero */ +/* + * Statically-defined pool of irqvector structures. This will go once + * we have a working kmalloc()/kfree(). + * + * Actually, it's not that simple... trap_init() is called before the + * slab caches are initialized so we can't call kmalloc() this early + * in initialization. What we could do is statically allocate a small + * number of irqvectors here (enough for trap_init() and friends) and + * then kmalloc() vectors on demand later. + * + * An entry in the list is free if the dest_addr field is zero, and + * is in use if non-zero. + */ struct irqvector irqvectors[NR_IRQVECTORS]; /* Default handlers for each SCB vector */ @@ -58,8 +60,10 @@ unsigned long base_pfn; pte_t *base_pte_addr; - /* Do we need more than a page for the int stack? - Yes, if we want a guard page. */ + /* + * Do we need more than a page for the int stack? + * Yes, if we want a guard page. + */ if (INT_STACK_SIZE <= PAGE_SIZE) { printk("Interrupt stack too small, must be > PAGE_SIZE\n"); machine_halt(); @@ -69,11 +73,12 @@ base_pfn = MAP_NR(stack_base); base_pte_addr = GET_SPTE_VIRT(stack_base); - - /* Set first page of interrupt stack area to kernel read, thus - trapping any writes to this page. This will catch attempts - to overflow the interrupt stack before they can do any damage. */ + /* + * Set first page of interrupt stack area to kernel read, thus + * trapping any writes to this page. This will catch attempts + * to overflow the interrupt stack before they can do any damage. + */ set_pte(base_pte_addr, pfn_pte(base_pfn, __pgprot(_PAGE_KR|_PAGE_VALID))); __flush_tlb_one(stack_base); @@ -96,7 +101,7 @@ flush_icache(); } -/* Register the machine check handler. */ +/* Register the machine check handler. */ void register_mcheck_handler(void) { extern void machine_check_handler(struct pt_regs *regs, void *unused); @@ -141,7 +146,7 @@ { SCB_MEMCORR, "Memory corrected read (SCB_MEMCORR: corrected_read_handler)", corrected_read_handler, 0, 0, }, { SCB_RESINSTR, "Reserved instruction (SCB_RESINSTR: reserved_instr_handler)", reserved_instr_handler, 0, 0, }, { SCB_TRANS_INVAL, "Translation not valid (SCB_TRANS_INVAL: page_fault_handler)", page_fault_handler, 2, 0, }, - }; + }; int i; /* @@ -183,32 +188,34 @@ /* Nothing to do... Already done by trap_init */ } -/* This is the handler for reserved operand faults and aborts. - Eventually this will have to check if the fault was from user - mode or kernel mode and either throw a SIGILL or panic. */ - +/* + * This is the handler for reserved operand faults and aborts. + * Eventually this will have to check if the fault was from user + * mode or kernel mode and either throw a SIGILL or panic. + */ void reserved_operand_handler(struct pt_regs *regs, void *unused) { printk("\nReserved operand fault at PC=%08lx\n", regs->pc); - - printk("\nStack dump\n"); + + printk("\nStack dump\n"); hex_dump((void *)(regs->sp), 256); - show_regs(regs); - show_cpu_regs(); + show_regs(regs); + show_cpu_regs(); - if (user_mode(regs)) { - force_sig(SIGILL,current); - return; + if (user_mode(regs)) { + force_sig(SIGILL,current); + return; } machine_halt(); } -/* This is the handler for reserved instruction exceptions. - Eventually this will have to check if the fault was from user - mode or kernel mode and either throw a SIGILL or panic. */ - +/* + * This is the handler for reserved instruction exceptions. + * Eventually this will have to check if the fault was from user + * mode or kernel mode and either throw a SIGILL or panic. + */ void reserved_instr_handler(struct pt_regs *regs, void *unused) { unsigned short instr = *(unsigned short *)(regs->pc); @@ -218,17 +225,18 @@ } else { printk("\nReserved instruction at PC=%08lx\n", regs->pc); } - - printk("\nStack dump\n"); + + printk("\nStack dump\n"); hex_dump((void *)(regs->sp), 256); dump_stack(); - show_regs(regs); - show_cpu_regs(); + show_regs(regs); + show_cpu_regs(); - if (user_mode(regs)) { - force_sig(SIGILL,current); - return; + if (user_mode(regs)) { + force_sig(SIGILL,current); + return; } + machine_halt(); } @@ -241,21 +249,21 @@ printk("\nBreakpoint at PC=%08lx at %08lX\n", regs->pc, ®s->pc); - printk("\nStack dump\n"); + printk("\nStack dump\n"); hex_dump((void *)(regs->sp), 256); - show_regs(regs); - show_cpu_regs(); + show_regs(regs); + show_cpu_regs(); #endif if (user_mode(regs)) { info.si_signo = SIGTRAP; info.si_errno = 0; info.si_code = TRAP_BRKPT; - info.si_addr = (void *)(regs->pc); + info.si_addr = (void *) (regs->pc); force_sig_info(SIGTRAP, &info,current); - return; + return; } - machine_halt(); + machine_halt(); force_sig(SIGTRAP, current); } @@ -264,57 +272,60 @@ { siginfo_t info; - regs->psl.t=0; + regs->psl.t = 0; #if 0 printk("\ntpend sending SIGTRAP\n"); printk("\nTrace Pending at PC=%08lx at %08lX\n", regs->pc, ®s->pc); printk("\nStack dump\n"); hex_dump((void *)(regs->sp), 256); - show_regs(regs); - show_cpu_regs(); + show_regs(regs); + show_cpu_regs(); #endif if (user_mode(regs)) { info.si_signo = SIGTRAP; info.si_errno = 0; info.si_code = TRAP_BRKPT; - info.si_addr = (void *)(regs->pc); - force_sig_info(SIGTRAP,&info,current); + info.si_addr = (void *) (regs->pc); + force_sig_info(SIGTRAP, &info, current); return; } + machine_halt(); force_sig(SIGTRAP, current); } -/* This is the handler for reserved addressing mode exceptions. - Eventually this will have to check if the fault was from user - mode or kernel mode and either throw a SIGILL or panic. */ +/* + * This is the handler for reserved addressing mode exceptions. + * Eventually this will have to check if the fault was from user + * mode or kernel mode and either throw a SIGILL or panic. + */ void resam_handler(struct pt_regs *regs, void *unused) { - unsigned short instr = *(unsigned short *)(regs->pc); + unsigned short instr = * (unsigned short *) (regs->pc); if ((instr == 0xfeff) || (instr == 0xfdff)) { printk("\nKernel bugcheck at PC=%08lx\n", regs->pc); } else { printk("\nReserved addressing mode fault at PC=%08lx\n", regs->pc); } - - printk("\nStack dump\n"); + + printk("\nStack dump\n"); hex_dump((void *)(regs->sp), 256); dump_stack(); - show_regs(regs); - show_cpu_regs(); + show_regs(regs); + show_cpu_regs(); if (user_mode(regs)) { force_sig(SIGILL,current); - return; + return; } + machine_halt(); } /* This is the handler for corrected memory read errors */ - void corrected_read_handler(struct pt_regs *regs, void *unused) { printk("Corrected memory read error. " @@ -349,24 +360,25 @@ } } -/* This function gets called from irqvec_stray when we get an exception or - interrupt that doesn't have a handler in the SCB. The argument is the - saved PC value from the JSB instruction in the stray_handler structure. - From this value, we can find the address of the struct stray_handler, - and thus the vector number. - - This will also be used to auto-probe interrupt vectors. probe_irq_on() - will clear the STRAY_EXCEPTION_FIRED flag on each stray handler above 64 - (adapter and device vectors). Then probe_irq_off() will look for a - vector with this bit set. */ - +/* + * This function gets called from irqvec_stray when we get an exception or + * interrupt that doesn't have a handler in the SCB. The argument is the + * saved PC value from the JSB instruction in the stray_handler structure. + * From this value, we can find the address of the struct stray_handler, + * and thus the vector number. + * + * This will also be used to auto-probe interrupt vectors. probe_irq_on() + * will clear the STRAY_EXCEPTION_FIRED flag on each stray handler above 64 + * (adapter and device vectors). Then probe_irq_off() will look for a + * vector with this bit set. + */ int unhandled_exception(unsigned char *retaddr) { struct stray_handler *handler; unsigned int vec_num; - handler = (struct stray_handler *)(retaddr - - offsetof(struct stray_handler, flags)); + handler = (struct stray_handler *) (retaddr + - offsetof(struct stray_handler, flags)); vec_num = handler - stray_handlers; @@ -375,8 +387,8 @@ return 0; } - printk("\nUnhandled interrupt or exception number 0x%04x (SCB offset 0x%04x)\n", - vec_num, vec_num*4); + printk("\nUnhandled interrupt or exception number 0x%04x (SCB offset 0x%04x)\n", + vec_num, vec_num * 4); printk("\nStack dump:\n"); vax_dump_stack(DUMP_STACK_CALLER); @@ -388,10 +400,11 @@ } -/* This is the equivalent of handle_IRQ_event() on x86. There is no - need to walk the list of irqactions as in x86 because we don't have - shared interrupts on the VAX */ - +/* + * This is the equivalent of handle_IRQ_event() on x86. There is no + * need to walk the list of irqactions as in x86 because we don't have + * shared interrupts on the VAX. + */ static inline void dispatch_irq(struct pt_regs *regs, struct irqvector *vec) { struct irqaction *action; @@ -407,9 +420,10 @@ add_interrupt_randomness(vec_num); } -/* This is called once we know that an interrupt or exception is actually - an interrupt. */ - +/* + * This is called once we know that an interrupt or exception is actually + * an interrupt. + */ static inline void do_irq(struct pt_regs *regs, struct irqvector *vec) { int flags; @@ -419,16 +433,16 @@ hardware capabilities... */ irq_enter(); - + local_irq_save(flags); dispatch_irq(regs, vec); irq_exit(); local_irq_restore(flags); - if (local_softirq_pending()) { + + if (local_softirq_pending()) do_softirq(); - } } static inline void do_exception(struct pt_regs *regs, struct irqvector *vec, void *excep_info) @@ -451,12 +465,14 @@ { struct irqvector *vec; - vec = (struct irqvector *)(inside_vec - - offsetof(struct irqvector, excep_info_size)); + vec = (struct irqvector *) (inside_vec + - offsetof(struct irqvector, excep_info_size)); - /* If the excep_handler field of the irqvector is NULL, - then this is an interrupt vector. Dispatch it via the - irqaction struct */ + /* + * If the excep_handler field of the irqvector is NULL, + * then this is an interrupt vector. Dispatch it via the + * irqaction struct. + */ if (vec->excep_handler != NULL) { // printk("exception: vec=%p handler %p excep_info=%p(%d)\n",vec,vec->excep_handler,excep_info,*(int *)excep_info); do_exception(regs, vec, excep_info); @@ -478,9 +494,8 @@ goto ret_with_reschedule; ret_from_exception: - if (local_softirq_pending()) { + if (local_softirq_pending()) do_softirq(); - } ret_from_intr: if (__psl.prevmode == 0) { @@ -523,7 +538,7 @@ for (i=0, vec=irqvectors; i<NR_IRQVECTORS; i++, vec++) { if (vec->dest_addr == NULL) { - vec->dest_addr = (void *)0xffffffff; + vec->dest_addr = (void *) 0xffffffff; local_irq_restore(flags); return vec; } @@ -565,7 +580,7 @@ if (!scb_vec_free(vec_num)) { local_irq_restore(flags); - printk("hook_scb_vector: SCB vector %04x (%p) already in use\n", + printk("hook_scb_vector: SCB vector %04x (%p) already in use\n", vec_num, SCB_VECTOR(vec_num)); return -EBUSY; } @@ -581,8 +596,10 @@ new_vector = &vec->inst_jsb; if (use_interrupt_stack) { - /* LSB set in SCB vector tells CPU to service event - on interrupt stack regardless of current stack */ + /* + * LSB set in SCB vector tells CPU to service event + * on interrupt stack regardless of current stack. + */ new_vector++; } @@ -647,10 +664,10 @@ /* We must mask off the bottom two bits. They have meaning to to the hardware, and are not part of the actual target address */ - inside_vec = (unsigned char *) ((unsigned long)(inside_vec) & ~0x3); + inside_vec = (unsigned char *) ((unsigned long) (inside_vec) & ~0x3); - vector = (struct irqvector *)(inside_vec - - offsetof(struct irqvector, inst_jsb)); + vector = (struct irqvector *) (inside_vec + - offsetof(struct irqvector, inst_jsb)); if (dev_id != vector->action.dev_id) { local_irq_restore(flags); @@ -679,13 +696,13 @@ int i; int flags; - local_irq_save(flags); + local_irq_save(flags); for (i = FIRST_ADAPTER_VECTOR; i < NR_IRQS; i++) stray_handlers[i].flags &= ~STRAY_EXCEPTION_FIRED; - autoprobing=1; - local_irq_restore(flags); + autoprobing = 1; + local_irq_restore(flags); return 1; } @@ -700,7 +717,7 @@ nr_vecs = 0; vec_found = 0; - local_irq_save(flags); + local_irq_save(flags); for (i = FIRST_ADAPTER_VECTOR; i < NR_IRQS; i++) { if (stray_handlers[i].flags & STRAY_EXCEPTION_FIRED) { @@ -709,7 +726,7 @@ } } autoprobing=0; - local_irq_restore(flags); + local_irq_restore(flags); if (nr_vecs > 1) { vec_found = -vec_found; @@ -738,7 +755,7 @@ vector->excep_info_size = exception_info_size; vector->excep_handler = handler; vector->action.name = exception_name; /* Needed to stop get_irq_list dying */ - /* FIXME: This doesn't set dev_id or other members of the irqaction structure... */ + /* FIXME: This doesn't set dev_id or other members of the irqaction structure... */ retval = hook_scb_vector(vec_num, vector, use_interrupt_stack); @@ -750,11 +767,11 @@ int show_interrupts(struct seq_file *p, void *v) { - int i = *(loff_t *) v; + int i = * (loff_t *) v; struct irqvector *vector; unsigned char *inside_vec; - - if ((i < NR_IRQS) && !scb_vec_free (i)) { + + if (i < NR_IRQS && !scb_vec_free (i)) { inside_vec = SCB_VECTOR (i); /* @@ -762,9 +779,9 @@ * meaning to the hardware, and are not part of * the actual target address */ - inside_vec = (unsigned char *) ((unsigned long)(inside_vec) & ~0x3); - vector = (struct irqvector *)(inside_vec - - offsetof (struct irqvector, inst_jsb)); + inside_vec = (unsigned char *) ((unsigned long) (inside_vec) & ~0x3); + vector = (struct irqvector *) (inside_vec + - offsetof (struct irqvector, inst_jsb)); if (vector->action.name == NULL) seq_printf (p, "%4d: %8d no interrupt vector name\n", vector->vec_num, 0); else |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 14:27:50
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24145 Modified Files: pgtable.h Log Message: - Add () around expression Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mm/pgtable.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- pgtable.h 25 Apr 2005 14:20:48 -0000 1.14 +++ pgtable.h 25 Apr 2005 14:27:40 -0000 1.15 @@ -60,11 +60,11 @@ /* * Macros to get page table addresses + offsets. * - * if they are 4k ptes then set_pte needs to be used on the results, + * If they are 4K PTEs then set_pte needs to be used on the results, */ /* macro to get linear page table entry for a physical address */ -#define GET_HWSPTE_PHYS(x) ((hwpte_t *)(SPT_BASE + ( ((x) >> PAGELET_SHIFT) << SIZEOF_PTR_LOG2) )) +#define GET_HWSPTE_PHYS(x) ((hwpte_t *) (SPT_BASE + ( ((x) >> PAGELET_SHIFT) << SIZEOF_PTR_LOG2) )) /* this is like it is for a reason - we need to wipe out the lower bits, the old * calculation using page_shift-sizeof_pte_log2 gave the wrong answer sometimes */ @@ -76,7 +76,7 @@ #define GET_SPTE_VIRT(x) GET_SPTE_PHYS(((unsigned long)x) - PAGE_OFFSET) /* macro to get the virtual address represented by an SPTE, given the address of the SPTE */ -#define SPTE_TO_VIRT(p) (void *)((((unsigned long)p - (unsigned long)swapper_pg_dir[2].br) << (PAGE_SHIFT-SIZEOF_PTE_LOG2)) + PAGE_OFFSET) +#define SPTE_TO_VIRT(p) ((void *)((((unsigned long)p - (unsigned long)swapper_pg_dir[2].br) << (PAGE_SHIFT-SIZEOF_PTE_LOG2)) + PAGE_OFFSET)) #ifndef __ASSEMBLY__ /* Other architectures put a virtual hole between the end of |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 14:20:57
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21003 Modified Files: pgtable.h Log Message: - remap_page_range() -> remap_pfn_range() Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mm/pgtable.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- pgtable.h 20 Apr 2005 19:02:02 -0000 1.13 +++ pgtable.h 25 Apr 2005 14:20:48 -0000 1.14 @@ -1,14 +1,14 @@ /* (c) 2001 Vax Porting Project, atp, kenn, airlied */ /* FIXME: this is a mess its confusing and badly documented - * - needs cleaning up atp jul 2001 */ + * - needs cleaning up atp jul 2001 */ #ifndef _VAX_MM_PGTABLE_H #define _VAX_MM_PGTABLE_H #ifndef __ASSEMBLY__ #include <linux/config.h> #include <linux/types.h> -#include <asm/mm/virtmap.h> +#include <asm/mm/virtmap.h> #endif /* !__ASSEMBLY__ */ #include <asm/mtpr.h> @@ -22,7 +22,7 @@ /* TASK address space sizing, for sizing SPT and so forth */ #include <asm/mm/task.h> -/* +/* * See Documentation/vax/memory.txt * for up to date memory layout */ @@ -33,11 +33,11 @@ /* * How many extra entries in the system page table for I/O space * and vmalloc mappings? The SPT_MAX_xxx macros define the max - * space (in kB) that we'll allocate for each purpose. The + * space (in kB) that we'll allocate for each purpose. The * SPT_ENTRIES_xxx macros are then calculated accordingly. * * The IOMAP limit isn't necessarily a hard limit. Once we run out - * of IOMAP entries in the SPT, we could use get_free_page() to + * of IOMAP entries in the SPT, we could use get_free_page() to * alloc a real page of RAM and hijack its SPTE. */ @@ -47,7 +47,7 @@ #define SPT_HWPTES_IOMAP (SPT_MAX_IOMAP<<1) #define SPT_PTES_IOMAP (SPT_MAX_IOMAP >> 2) /*/>> (PAGE_SHIFT-10)) */ -/* FIXME: (PAGE_SHIFT-10) is hardwired here to 2. asm bug in head.S */ +/* FIXME: (PAGE_SHIFT-10) is hardwired here to 2. asm bug in head.S */ #define SPT_HWPTES_VMALLOC (SPT_MAX_VMALLOC << 1) #define SPT_PTES_VMALLOC (SPT_MAX_VMALLOC >> 2) @@ -59,53 +59,53 @@ /* * Macros to get page table addresses + offsets. - * + * * if they are 4k ptes then set_pte needs to be used on the results, */ /* macro to get linear page table entry for a physical address */ #define GET_HWSPTE_PHYS(x) ((hwpte_t *)(SPT_BASE + ( ((x) >> PAGELET_SHIFT) << SIZEOF_PTR_LOG2) )) -/* this is like it is for a reason - we need to wipe out the lower bits, the old +/* this is like it is for a reason - we need to wipe out the lower bits, the old * calculation using page_shift-sizeof_pte_log2 gave the wrong answer sometimes */ #define GET_SPTE_PHYS(x) ((pte_t *)(SPT_BASE + ( ((x) >> PAGE_SHIFT) << SIZEOF_PTE_LOG2))) -/* macro to get linear page table entry for a virtual address +/* macro to get linear page table entry for a virtual address (only works for addresses in S0 space) */ #define GET_HWSPTE_VIRT(x) GET_HWSPTE_PHYS(((unsigned long)x) - PAGE_OFFSET) #define GET_SPTE_VIRT(x) GET_SPTE_PHYS(((unsigned long)x) - PAGE_OFFSET) /* macro to get the virtual address represented by an SPTE, given the address of the SPTE */ #define SPTE_TO_VIRT(p) (void *)((((unsigned long)p - (unsigned long)swapper_pg_dir[2].br) << (PAGE_SHIFT-SIZEOF_PTE_LOG2)) + PAGE_OFFSET) - + #ifndef __ASSEMBLY__ /* Other architectures put a virtual hole between the end of mapped physical memory and lowest address that vmalloc() will hand out. This isn't really practical on the VAX, since the system page table must be contiguous, so virtual holes in S0 - space waste precious SPTEs. + space waste precious SPTEs. */ /* the previous definition of VMALLOC START relied on the - * VAX phy memory being an exact 4k multiple, + * VAX phy memory being an exact 4k multiple, * my VAX has 7f1f hw-pages so isn't aligned on 4K * workout the VMALLOC_START from the vmallocmap_base and the - * system base register.- + * system base register.- */ -/* VMALLOC_OFFSET is the gap between the end of mapping of physical +/* VMALLOC_OFFSET is the gap between the end of mapping of physical * ram and the start of VMALLOC ?? */ #define VMALLOC_OFFSET (SPT_MAX_IOMAP * 1024) #define VMALLOC_START (PAGE_OFFSET+((vmallocmap_base-swapper_pg_dir[2].br)<<(PAGELET_SHIFT-2))) #define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (VMALLOC_START + (SPT_MAX_VMALLOC * 1024)) -/* Start of task page table area - the variables this is based on +/* Start of task page table area - the variables this is based on * are defined in asm-vax/mm/task.h */ /* address in S0 space of where the process page table area starts and ends.*/ -#define TASKPTE_START PTE_TASK_ALIGN(VMALLOC_END) -#define TASKPTE_END (TASKPTE_START+(PTE_TASK_SLOTSIZE * TASK_MAXUPRC)) +#define TASKPTE_START PTE_TASK_ALIGN(VMALLOC_END) +#define TASKPTE_END (TASKPTE_START+(PTE_TASK_SLOTSIZE * TASK_MAXUPRC)) /* the number of hwptes to map this space */ #define SPT_HWPTES_TASKPTE (((PTE_TASK_SLOTSIZE)>>PAGELET_SHIFT)*TASK_MAXUPRC) #define SPT_PTES_TASKPTE (SPT_HWPTES_TASKPTE >> 3) @@ -115,7 +115,7 @@ /* page table for 0-4MB for everybody */ -/* This is a c reference to the start of the system page table +/* This is a c reference to the start of the system page table * (see arch/vax/boot/head.S). The spt is initialised to cover physical * memory by early boot code, based on VMB supplied information. Further * expansion happens later in the boot sequence in paging_init */ @@ -172,10 +172,10 @@ #endif /*! assembly */ -/* Needs to be defined here and not in linux/mm.h, as it is arch dependent +/* Needs to be defined here and not in linux/mm.h, as it is arch dependent * This is used on sparc processors to implement memory holes */ -#define PageSkip(page) (0) -#define kern_addr_valid(addr) (1) +#define PageSkip(page) 0 +#define kern_addr_valid(addr) 1 /* * No page table caches to initialise or prune @@ -183,6 +183,7 @@ #define pgtable_cache_init() do { } while (0) #define check_pgt_cache() do { } while (0) -#define io_remap_page_range remap_page_range +#define io_remap_page_range(vma, vaddr, paddr, size, prot) \ + remap_pfn_range (vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) #endif |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 14:09:46
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15151 Modified Files: diag_led.h Log Message: - Add base-address definitions. Index: diag_led.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/diag_led.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- diag_led.h 3 Oct 2004 11:21:47 -0000 1.5 +++ diag_led.h 25 Apr 2005 14:09:21 -0000 1.6 @@ -18,10 +18,12 @@ * removed after dz11 hacking is finished. --jbglaw */ -#define DIAG_LED_KA46_BASE 0x20080010 #define DIAG_LED_KA42_BASE 0x20080010 +#define DIAG_LED_KA43_BASE 0x20080010 +#define DIAG_LED_KA46_BASE 0x20080010 #define DIAG_LED_KA48_BASE 0x20080010 #define DIAG_LED_KA49_BASE 0x25800004 +#define DIAG_LED_KA670_BASE 0x20140030 #define DIAG_LED_VXT_BASE 0x200c1000 extern int diag_led_set_state (unsigned char state); |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 13:12:05
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15096 Modified Files: entry.S init_task.c module.c process.c reboot.c regdump.c semaphore.c setup.c syscall.c time.c Log Message: - Whitespace - Place some while(1) /* nothing */; purely for readability. - I admit I start *liking* portions of the code. - I admit I still hate portions of the code (esp. clock.c and cpu_generic.c) Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/time.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- time.c 25 Mar 2005 01:14:37 -0000 1.19 +++ time.c 25 Apr 2005 13:11:56 -0000 1.20 @@ -210,7 +210,7 @@ return IRQ_HANDLED; } -/* +/* * Function to compensate the time offset caused by calling this * function (I think so, yes). This function definatively needs a real * implementation, but it works for now. -- Erik @@ -314,15 +314,14 @@ mon = CMOS_READ(RTC_MONTH); year = CMOS_READ(RTC_YEAR); } while (sec != CMOS_READ(RTC_SECONDS)); - if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) - { - BCD_TO_BIN(sec); - BCD_TO_BIN(min); - BCD_TO_BIN(hour); - BCD_TO_BIN(day); - BCD_TO_BIN(mon); - BCD_TO_BIN(year); - } + if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year); + } spin_unlock(&rtc_lock); if ((year += 1900) < 1970) year += 100; Index: syscall.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/syscall.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- syscall.c 24 Aug 2004 08:00:13 -0000 1.12 +++ syscall.c 25 Apr 2005 13:11:56 -0000 1.13 @@ -384,8 +384,8 @@ * * This is really horribly ugly. */ -int sys_ipc (uint call, int first, int second, - int third, void *ptr, long fifth) +int sys_ipc (uint call, int first, int second, int third, void *ptr, + long fifth) { #ifdef CONFIG_SYSVIPC int ret; @@ -404,23 +404,21 @@ if (get_user(fourth.__pad, (void **) ptr)) return -EFAULT; return sys_semctl (first, second, third, fourth); - } + } case MSGSND: - return sys_msgsnd (first, (struct msgbuf *) ptr, - second, third); + return sys_msgsnd (first, (struct msgbuf *) ptr, second, third); break; case MSGRCV: - return sys_msgrcv (first, - (struct msgbuf *) ptr, - second, fifth, third); + return sys_msgrcv (first, (struct msgbuf *) ptr, second, fifth, + third); case MSGGET: return sys_msgget ((key_t) first, second); case MSGCTL: return sys_msgctl (first, second, (struct msqid_ds *) ptr); - + case SHMAT: { ulong raddr; ret = do_shmat (first, (char *) ptr, second, &raddr); @@ -429,21 +427,20 @@ return put_user (raddr, (ulong *) third); } - case SHMDT: + case SHMDT: return sys_shmdt ((char *)ptr); case SHMGET: return sys_shmget (first, second, third); case SHMCTL: - return sys_shmctl (first, second, - (struct shmid_ds *) ptr); + return sys_shmctl (first, second, (struct shmid_ds *) ptr); default: return -EINVAL; } - + return -EINVAL; #else /* CONFIG_SYSVIPC */ return -ENOSYS; @@ -453,12 +450,15 @@ int sys_uname(struct old_utsname * name) { int err; + if (!name) return -EFAULT; + down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); + err = copy_to_user(name, &system_utsname, sizeof (*name)); up_read(&uts_sem); - return err?-EFAULT:0; + + return err? -EFAULT: 0; } unsigned long sys_mmap(unsigned long addr, size_t len, int prot, @@ -478,6 +478,7 @@ error = do_mmap(file, addr, len, prot, flags, offset); if (file) fput(file); + out: unlock_kernel(); return error; @@ -505,6 +506,7 @@ if (file) fput(file); + out: return error; } @@ -515,3 +517,4 @@ { return do_mmap2(addr, len, prot, flags, fd, pgoff); } + Index: reboot.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/reboot.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- reboot.c 14 Jun 2004 12:53:42 -0000 1.6 +++ reboot.c 25 Apr 2005 13:11:56 -0000 1.7 @@ -1,21 +1,19 @@ -/* - $Id$ - - This file contains the standard functions that the arch-independent - kernel expects for halting, rebooting and powering off the machine. - - It also contains the machine check dispatcher - - The real work will be done by cpu-specific code via the machine - vector. Eventually... - -*/ +/* + * $Id$ + * + * This file contains the standard functions that the arch-independent + * kernel expects for halting, rebooting and powering off the machine. + * It also contains the machine check dispatcher. + * + * The real work will be done by cpu-specific code via the machine + * vector. Eventually... + */ -#include <linux/types.h> /* For NULL */ -#include <linux/reboot.h> /* For machine_xxx declarations */ +#include <linux/types.h> +#include <linux/reboot.h> #include <asm/mv.h> -#include <asm/system.h> /* For HALT */ +#include <asm/system.h> extern void show_cpu_regs(void); @@ -25,6 +23,8 @@ printk("machine_halt: cpu-specific halt not implemented" " - HALTing\n"); HALT; + while (1) + /* wait */; } mv->halt(); @@ -51,6 +51,8 @@ printk("machine_power_off: cpu-specific halt not implemented" " - HALTing\n"); HALT; + while (1) + /* wait */; } mv->halt(); @@ -59,17 +61,17 @@ } /* - * This is called directly, from entry.S - * It checks for a cpu specific machine check handler and hands over to it. - * Otherwise it will just halt, as there is no way to recover without a - * sensible cpu specific routine + * This is called directly, from entry.S + * It checks for a cpu specific machine check handler and hands over to it. + * Otherwise it will just halt, as there is no way to recover without a + * sensible cpu specific routine */ void machine_check(void *stkframe) { if (!mv->mcheck) { - printk("machine check - CPU specific handler not implemented - halting\n"); - show_cpu_regs(); - machine_halt(); + printk("Machine Check - CPU specific handler not implemented - halting\n"); + show_cpu_regs(); + machine_halt(); } mv->mcheck(stkframe); Index: module.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/module.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- module.c 26 Feb 2004 15:59:08 -0000 1.2 +++ module.c 25 Apr 2005 13:11:56 -0000 1.3 @@ -133,7 +133,7 @@ return -ENOEXEC; } -extern void apply_alternatives(void *start, void *end); +extern void apply_alternatives(void *start, void *end); int module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, @@ -144,13 +144,13 @@ const Elf_Shdr *s; char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; - /* look for .altinstructions to patch */ - for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { - void *seg; + /* look for .altinstructions to patch */ + for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { + void *seg; if (strcmp(".altinstructions", secstrings + s->sh_name)) continue; - seg = (void *)s->sh_addr; - apply_alternatives(seg, seg + s->sh_size); + seg = (void *)s->sh_addr; + apply_alternatives(seg, seg + s->sh_size); } #endif /* 0 */ return 0; Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/setup.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- setup.c 7 Apr 2005 22:35:50 -0000 1.17 +++ setup.c 25 Apr 2005 13:11:56 -0000 1.18 @@ -29,7 +29,7 @@ #include <asm/setup.h> -extern char *kernel_cmd_line; /* kernel command line from head.S */ +extern char *kernel_cmd_line; /* Kernel command line from head.S */ char command_line[COMMAND_LINE_SIZE]; /* Defined in arch/vax/mm/init.c */ @@ -62,7 +62,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) { - return (void*)(*pos == 0); + return (void*)(*pos == 0); } static void *c_next(struct seq_file *m, void *v, loff_t *pos) @@ -104,21 +104,21 @@ notifier_chain_register(&panic_notifier_list, &vax_panic_block); - /* - * save the command line from the boot block, before it gets - * stomped on. + /* + * Save the command line from the boot block, before it gets + * stomped on. */ memcpy(command_line, kernel_cmd_line,(COMMAND_LINE_SIZE-1)); *cmdline_p = command_line; /* Save unparsed command line copy for /proc/cmdline */ - memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE-1); - saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; + memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE-1); + saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; printk("kernel_cmd_line %8p\n%s\n",kernel_cmd_line,kernel_cmd_line); /* Get the SID */ vax_cpu.sid = __mfpr(PR_SID); - /* We expand the system page table in paging_init, so + /* We expand the system page table in paging_init, so * it comes before the bootmem allocator. */ paging_init(); @@ -137,43 +137,46 @@ #define PAGEALIGNUP(x) (((x) + PAGE_SIZE-1) & ~(PAGE_SIZE-1)) #define PAGEALIGNDN(x) ((x) & ~(PAGE_SIZE-1)) #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) - + bootmap_size = init_bootmem(0, max_pfn); - + printk("bootmap size = %8.8lx\n", bootmap_size); - - /* Available memory is now the region from the end of the - bootmem bitmap to the start of the kernel and from the - end of the SPT to the end of memory */ - + + /* + * Available memory is now the region from the end of the + * bootmem bitmap to the start of the kernel and from the + * end of the SPT to the end of memory + */ region_start = PAGEALIGNUP(bootmap_size); region_len = PAGEALIGNDN(KERNEL_START_PHYS) - region_start; - printk("calling free_bootmem(start=%08lx, len=%08lx)\n", + printk("Calling free_bootmem(start=%08lx, len=%08lx)\n", region_start, region_len); free_bootmem(region_start, region_len); region_start = PAGEALIGNUP(__pa(SPT_BASE + SPT_SIZE)); region_len = PAGEALIGNDN((max_pfn << PAGE_SHIFT)) - region_start; - printk("calling free_bootmem(start=%08lx, len=%08lx)\n", + printk("calling free_bootmem(start=%08lx, len=%08lx)\n", region_start, region_len); free_bootmem(region_start, region_len); - + max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; - - /* max_pfn is the number of 4k ptes */ + + /* max_pfn is the number of 4K PTEs */ if (max_pfn < max_dma) { - zones_size[ZONE_DMA] = max_pfn; - } else { - zones_size[ZONE_DMA] = max_dma; - zones_size[ZONE_NORMAL] = max_pfn - max_dma; - } + zones_size[ZONE_DMA] = max_pfn; + } else { + zones_size[ZONE_DMA] = max_dma; + zones_size[ZONE_NORMAL] = max_pfn - max_dma; + } free_area_init(zones_size); - /* Set up the initial PCB. We can refer to current because head.S - has already set us up on the kernel stack of task 0. */ + /* + * Set up the initial PCB. We can refer to current because head.S + * has already set us up on the kernel stack of task 0. + */ __mtpr(__pa(¤t->thread.pcb), PR_PCBB); memset(¤t->thread.pcb, 0, sizeof(current->thread.pcb)); @@ -185,9 +188,11 @@ /* No root filesystem yet */ ROOT_DEV = Root_NFS; - /* Inserted by D.A. - 8 Jun 2001 - THIS IS NECESSARY - if not correct */ - flush_tlb(); + /* + * Inserted by D.A. - 8 Jun 2001 - THIS IS NECESSARY + * if not correct. + */ + flush_tlb(); /* * Identify the flock of penguins. @@ -208,4 +213,3 @@ #endif } - Index: regdump.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/regdump.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- regdump.c 8 Oct 2003 16:32:11 -0000 1.9 +++ regdump.c 25 Apr 2005 13:11:56 -0000 1.10 @@ -1,10 +1,9 @@ -/* - $Id$ - - This file contains functions for dumping register and stack - contents. - -*/ +/* + * $Id$ + * + * This file contains functions for dumping register and stack + * contents. + */ #include <linux/types.h> #include <linux/kernel.h> @@ -24,35 +23,35 @@ static char *modes = "KESU"; printk("\n r0 %08lx r1 %08lx r2 %08lx r3 %08lx\n", - regs->r0, regs->r1, regs->r2, regs->r3); + regs->r0, regs->r1, regs->r2, regs->r3); printk(" r4 %08lx r5 %08lx r6 %08lx r7 %08lx\n", - regs->r4, regs->r5, regs->r6, regs->r7); + regs->r4, regs->r5, regs->r6, regs->r7); printk(" r8 %08lx r9 %08lx r10 %08lx r11 %08lx\n", - regs->r8, regs->r9, regs->r10, regs->r11); + regs->r8, regs->r9, regs->r10, regs->r11); printk(" ap %08lx fp %08lx sp %08lx pc %08lx\n", - regs->ap, regs->fp, regs->sp, regs->pc); + regs->ap, regs->fp, regs->sp, regs->pc); raw_psl = RAW_PSL(regs->psl); psl = ®s->psl; printk(" psl %08x ipl %d mode %c (prev %c) %s%s%s%s%s%s%s%s%s%s%s%s\n", - raw_psl, psl->ipl, - modes[psl->accmode], modes[psl->prevmode], - psl->cm ? "CM " : "", - psl->tp ? "TP " : "", - psl->fpd ? "FPD " : "", - psl->is ? "IS " : "", - psl->dv ? "DV " : "", - psl->fu ? "FU " : "", - psl->iv ? "IV " : "", - psl->t ? "T " : "", - psl->n ? "N " : "", - psl->z ? "Z " : "", - psl->v ? "V " : "", - psl->c ? "C " : ""); + raw_psl, psl->ipl, + modes[psl->accmode], modes[psl->prevmode], + psl->cm ? "CM " : "", + psl->tp ? "TP " : "", + psl->fpd ? "FPD " : "", + psl->is ? "IS " : "", + psl->dv ? "DV " : "", + psl->fu ? "FU " : "", + psl->iv ? "IV " : "", + psl->t ? "T " : "", + psl->n ? "N " : "", + psl->z ? "Z " : "", + psl->v ? "V " : "", + psl->c ? "C " : ""); if (raw_psl & PSL_MBZ_MASK) { printk(" *** PSL MBZ fields not zero: %08x ***\n", @@ -84,19 +83,19 @@ unsigned int usp = __mfpr(PR_USP); printk("\n p0br %08x sbr %08x astlvl %08x\n", - p0br, sbr, astlvl); + p0br, sbr, astlvl); printk(" p0lr %08x slr %08x sisr %08x\n", - p0lr, slr, sisr); + p0lr, slr, sisr); printk(" p1br %08x pcbb %08x mapen %08x\n", - p1br, pcbb, mapen); + p1br, pcbb, mapen); printk(" p1lr %08x scbb %08x sid %08x\n\n", - p1lr, scbb, sid); + p1lr, scbb, sid); printk(" isp %08x ksp %08x esp %08x ssp %08x usp %08x\n", - isp, ksp, esp, ssp, usp); + isp, ksp, esp, ssp, usp); } void hex_dump(void *addr, unsigned int bytes) @@ -125,19 +124,6 @@ } } -#if 0 -/* FIXME: new as of 2.4.15. Not 100% sure what this is supposed to do, - * but I suspect its the equivalent of our dump_stack() routine, on - * an arbitrary task's kernel stack */ -void show_trace_task(struct task_struct * tsk) -{ - unsigned long int ksp; - ksp = tsk->thread.pcb.ksp; - hex_dump((void *)ksp, 256); - return; -} -#endif - void show_stack(struct task_struct *task, unsigned long *stack) { unsigned long addr; @@ -146,7 +132,7 @@ stack = (unsigned long *) &stack; printk("Call Trace:\n"); - + while (((long) stack & (THREAD_SIZE-1)) != 0) { addr = *stack++; if (kernel_text_address (addr)) { @@ -154,7 +140,7 @@ print_symbol("%s\n", addr); } } - + printk("\n"); return; @@ -278,15 +264,17 @@ show_regs(®s); } -/* little convenience function -- temporary debugging aid - atp */ +/* Little convenience function -- temporary debugging aid - atp */ void vaxpanic(char *reason) { - if (reason) printk(KERN_CRIT "panic: %s\n",reason); - - printk(KERN_CRIT "\nStack dump\n"); - hex_dump((void *)__mfpr(PR_KSP), 256); - show_stack (current, NULL); - dump_cur_regs(1); /* us and parent */ - show_cpu_regs(); - machine_halt(); + if (reason) + printk(KERN_CRIT "panic: %s\n", reason); + + printk(KERN_CRIT "\nStack dump\n"); + hex_dump((void *)__mfpr(PR_KSP), 256); + show_stack (current, NULL); + dump_cur_regs(1); /* us and parent */ + show_cpu_regs(); + machine_halt(); } + Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/process.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- process.c 18 Nov 2004 09:28:15 -0000 1.26 +++ process.c 25 Apr 2005 13:11:56 -0000 1.27 @@ -1,10 +1,9 @@ -/* - $Id$ - - This file contains the standard functions that the arch-independent - kernel expects for process handling and scheduling - -*/ +/* + * $Id$ + * + * This file contains the standard functions that the arch-independent + * kernel expects for process handling and scheduling + */ #define __KERNEL_SYSCALLS__ #include <stdarg.h> @@ -32,7 +31,7 @@ /* Endless idle loop with no priority at all */ while (1) { - /* Although we are an idle CPU, we do not want to + /* Although we are an idle CPU, we do not want to get into the scheduler unnecessarily. */ if (need_resched()) { schedule(); @@ -48,26 +47,26 @@ struct task_struct *__switch_to(struct task_struct* prev, struct task_struct* next) { - unsigned long pcbb; /* physical address of new pcb */ + unsigned long pcbb; /* physical address of new pcb */ #ifdef VAX_PROCESS_DEBUG printk("vax_switch_to: switching %p, pid %d, state %ld -> %p, pid %d, state %ld, pc %08lx\n", - prev, prev->pid, prev->state, next, next->pid, next->state, next->thread.pcb.pc); + prev, prev->pid, prev->state, next, next->pid, next->state, next->thread.pcb.pc); #endif - - /* We should check that __pa((prev)->thread.pcb) == PR_PCBB */ + /* We should check that __pa((prev)->thread.pcb) == PR_PCBB */ - /* Get phys address of next process pcb */ - pcbb = virt_to_phys(&next->thread.pcb); - - /* When 'next' starts running, R0 will hold the task pointer - for the process we just switched away from. This will end - up in R0 at ret_from_fork, for new processes and will be - the return value from this function for existing processes */ + /* Get phys address of next process pcb */ + pcbb = virt_to_phys(&next->thread.pcb); + + /* + * When 'next' starts running, R0 will hold the task pointer + * for the process we just switched away from. This will end + * up in R0 at ret_from_fork, for new processes and will be + * the return value from this function for existing processes + */ next->thread.pcb.r0 = (unsigned long) prev; /* svpctx should deal with writing the stuff into *prev */ - asm( " movpsl -(%%sp) \n" " pushab 1f \n" @@ -87,16 +86,18 @@ return NULL; } -/* This _must_ match the stack layout in effect at ret_from_syscall - in entry.S. - - We do a bit of a hack here. The handler_PC (i.e. the saved PC - value from the JSB in the irqvector structure) normally points - to the excep_info_size member of the irqvector. When we build - the fake stack frame for the new thread, we don't have an - irqvector available. So what we do is pretend we have one longword - of exception info, we put the value 1 into this longword and we - point the handler_PC field at this 'exception info'. */ +/* + * This _must_ match the stack layout in effect at ret_from_syscall + * in entry.S. + * + * We do a bit of a hack here. The handler_PC (i.e. the saved PC + * value from the JSB in the irqvector structure) normally points + * to the excep_info_size member of the irqvector. When we build + * the fake stack frame for the new thread, we don't have an + * irqvector available. So what we do is pretend we have one longword + * of exception info, we put the value 1 into this longword and we + * point the handler_PC field at this 'exception info'. + */ struct new_thread_stack { struct pt_regs regs; @@ -110,7 +111,7 @@ /* Defined in entry.S */ extern void ret_from_fork(void); -int copy_thread(int unused1, unsigned long clone_flags, unsigned long usp, +int copy_thread(int unused1, unsigned long clone_flags, unsigned long usp, unsigned long unused2, struct task_struct *p, struct pt_regs *regs) { @@ -123,10 +124,10 @@ child_stack = (struct new_thread_stack *)(stack_top) - 1; -#ifdef VAX_PROCESS_DEBUG +#ifdef VAX_PROCESS_DEBUG printk("copy_thread: pid %d, task 0x%08lx, kstack_top %p, " - "usp 0x%08lx, ksp %p\n", p->pid, (unsigned long)p, - stack_top, usp, child_stack); + "usp 0x%08lx, ksp %p\n", p->pid, (unsigned long) p, + stack_top, usp, child_stack); #endif child_regs = &child_stack->regs; @@ -168,12 +169,13 @@ void flush_thread(void) { - /* I don't really know what's supposed to go in here. It - gets called just after exec(), so I guess we reset any - VAX-specific thread state here */ + /* + * I don't really know what's supposed to go in here. It + * gets called just after exec(), so I guess we reset any + * VAX-specific thread state here + */ } - static ATTRIB_NORET void kernel_thread_exit(int exitcode) { __chmk(__NR_exit); @@ -182,7 +184,7 @@ /* * Create a kernel thread */ -pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) +pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) { asm( " clrl -(%%sp) \n" @@ -198,13 +200,15 @@ : "g"(flags | CLONE_VM), "g"(__NR_clone) : "r0", "ap"); - /* In child. At this point SP points to the very top of - our kernel stack, so we cannot pop anything off. That - means that we can never return from here. */ -#ifdef VAX_PROCESS_DEBUG + /* + * In child. At this point SP points to the very top of + * our kernel stack, so we cannot pop anything off. That + * means that we can never return from here. + */ +#ifdef VAX_PROCESS_DEBUG printk("kernel_thread: task %p, pid %d, calling thread function at %08lx\n", - current, current->pid, (unsigned long)fn); -#endif + current, current->pid, (unsigned long) fn); +#endif kernel_thread_exit(fn(arg)); } @@ -212,12 +216,12 @@ { int retval; - if (!newsp) { + if (!newsp) newsp = regs->sp; - } + #ifdef VAX_PROCESS_DEBUG printk("sys_clone: calling do_fork(0x%08lx, 0x%08lx, 0x%p)\n", - clone_flags, newsp, regs); + clone_flags, newsp, regs); #endif retval = do_fork(clone_flags, newsp, regs, 0, NULL, NULL); @@ -266,10 +270,12 @@ return 0; } -void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned long new_sp) +void start_thread(struct pt_regs *regs, unsigned long new_pc, + unsigned long new_sp) { #ifdef VAX_PROCESS_DEBUG - printk("PID %d: starting thread %8lX %8lX %8lX\n", current->pid, new_pc, new_sp, regs->sp); + printk("PID %d: starting thread %8lX %8lX %8lX\n", current->pid, new_pc, + new_sp, regs->sp); #endif set_fs(USER_DS); regs->pc = new_pc + 2; Index: semaphore.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/semaphore.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- semaphore.c 12 Dec 2002 01:04:29 -0000 1.5 +++ semaphore.c 25 Apr 2005 13:11:56 -0000 1.6 @@ -2,7 +2,7 @@ * $Id$ * * Updated for new rwsem.h 2.4.4, Mar 2002 atp. - * + * * VAX version (based on S390 version) * Copyright (C) 2001, Kenn Humborg * @@ -57,7 +57,7 @@ static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED; -void __down(struct semaphore * sem) +void __down(struct semaphore *sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); @@ -90,7 +90,7 @@ wake_up(&sem->wait); } -int __down_interruptible(struct semaphore * sem) +int __down_interruptible(struct semaphore *sem) { int retval = 0; struct task_struct *tsk = current; @@ -145,7 +145,7 @@ * Trylock failed - make sure we correct for * having decremented the count. */ -int __down_trylock(struct semaphore * sem) +int __down_trylock(struct semaphore *sem) { unsigned long flags; int sleepers; Index: init_task.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/init_task.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- init_task.c 4 Aug 2003 23:39:01 -0000 1.8 +++ init_task.c 25 Apr 2005 13:11:56 -0000 1.9 @@ -8,7 +8,7 @@ #include <asm/processor.h> /* INIT_MMAP */ -/* This is copied from i386 for now. I don't know what we'll +/* This is copied from i386 for now. I don't know what we'll need to change yet. KPH 2000-04-25 */ static struct fs_struct init_fs = INIT_FS; @@ -27,11 +27,11 @@ * Note that once we drop from IPL 31 to IPL 0 during init, we'll * be using the stack inside this union as the kernel stack. */ -union thread_union init_thread_union - __attribute__((__section__(".data.init_task"))) = - { INIT_THREAD_INFO(init_task) }; - -/* +union thread_union init_thread_union + __attribute__((__section__(".data.init_task"))) = + { INIT_THREAD_INFO(init_task) }; + +/* * Initial task structure. * * All other task structs will be allocated on slabs in fork.c Index: entry.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/entry.S,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- entry.S 29 Jul 2004 20:59:19 -0000 1.17 +++ entry.S 25 Apr 2005 13:11:55 -0000 1.18 @@ -232,7 +232,7 @@ pushr $0x3fff /* Save FP to R0 */ pushl 56(%sp) /* copy return address (handler_PC) */ calls $1, unhandled_exception - + /* * If unhandled_exception() returns, then we must be * autoprobing interrupt vectors, and this exception |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 13:01:03
|
Update of /cvsroot/linux-vax/kernel-2.5/drivers/vax/serial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9944/serial Modified Files: ipr.c Log Message: - Whitespace Index: ipr.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/serial/ipr.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ipr.c 18 Aug 2004 23:34:13 -0000 1.8 +++ ipr.c 25 Apr 2005 13:00:46 -0000 1.9 @@ -2,7 +2,7 @@ * $Id$ * * UART driver for the internal console port in most VAX CPUs - * + * * Most VAX CPU implementations have a serial console port which * can be driven via 4 internal processor registers (IPRs), without * having to care about the underlying hardware implementation. @@ -250,7 +250,7 @@ static void iprcons_set_termios(struct uart_port *port, struct termios *termios, struct termios *old) { - /* This port is not software configurable. It is fixed in + /* This port is not software configurable. It is fixed in hardware to 9600, 8 bits, no parity, one stop bit. (Actually - not completely true. The KA650 console has a physical rotary switch for selecting the baud rate. But |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 12:55:29
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7664 Modified Files: cpu_ka49.c Log Message: - Use flush_icache() Index: cpu_ka49.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka49.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- cpu_ka49.c 25 Apr 2005 10:39:55 -0000 1.7 +++ cpu_ka49.c 25 Apr 2005 12:55:03 -0000 1.8 @@ -91,13 +91,9 @@ __mtpr (0, start); /* - * Flush The Pipe (via REI) + * Flush Cache */ - __asm__ __volatile__ ( - " movpsl -(%sp) \n" - " movab 1f,-(%sp) \n" - " rei \n" - "1: \n"); + flush_icache (); /* * Enable Primary Cache |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 12:53:56
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7101 Modified Files: cacheflush.h Log Message: - Whitespace Index: cacheflush.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/cacheflush.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cacheflush.h 28 Jul 2004 23:52:49 -0000 1.5 +++ cacheflush.h 25 Apr 2005 12:53:31 -0000 1.6 @@ -1,11 +1,11 @@ -#ifndef __VAX_CACHEFLUSH_H +#ifndef __VAX_CACHEFLUSH_H #define __VAX_CACHEFLUSH_H #include <linux/mm.h> -/* +/* * cacheflush.h. Definitions for cache structures/routines. - * Copyright atp Jan 2001 + * Copyright atp Jan 2001 */ @@ -29,23 +29,24 @@ static inline void flush_icache(void) { - /* Push a PC/PSL onto the stack so it looks like we got - an interrupt, and then REI */ + /* + * Push a PC/PSL onto the stack so it looks like we got + * an interrupt, and then REI. + */ __asm__ ( - " movpsl -(%%sp) \n" - " pushab 1f \n" - " rei \n" - "1: " : : ); + " movpsl -(%%sp) \n" + " pushab 1f \n" + " rei \n" + "1: \n"); } - -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { memcpy(dst, src, len); \ - flush_icache_user_range(vma, page, vaddr, len); \ +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + do { \ + memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ } while (0) -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ memcpy(dst, src, len) - #endif /* __VAX_MM_CACHE_H */ |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 12:11:33
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20735 Modified Files: vax_dev_init.c Log Message: - Whitespace Index: vax_dev_init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/vax_dev_init.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vax_dev_init.c 3 Mar 2004 07:03:03 -0000 1.6 +++ vax_dev_init.c 25 Apr 2005 12:10:58 -0000 1.7 @@ -1,10 +1,10 @@ -/* vax_dev_init.c - * atp Feb 2001 - * +/* vax_dev_init.c + * atp Feb 2001 + * * Called from initial do_basic_setup in linux/init/main.c * Initialise devices according to mv. - * - * Add any other vax device specific initialisation stuff here. + * + * Add any other vax device specific initialisation stuff here. */ #include <linux/types.h> /* For NULL */ #include <linux/kernel.h> /* For printk */ |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 10:40:04
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9088 Modified Files: cpu_ka42.c cpu_ka43.c cpu_ka46.c cpu_ka48.c cpu_ka49.c cpu_ka630.c cpu_ka650.c cpu_vxt.c Log Message: - Use is_kaXXX() instead of manual mv comparison. Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- cpu_ka650.c 2 Oct 2004 11:42:47 -0000 1.15 +++ cpu_ka650.c 25 Apr 2005 10:39:55 -0000 1.16 @@ -17,7 +17,7 @@ #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/clock.h> /* For clock_init routines */ - + static unsigned int *ka650_cacr = (unsigned int *)0x20084000; static void ka650_pre_vm_init(void) @@ -26,7 +26,7 @@ * Disable the level 1 and level 2 caches. My docs say that the * caches are disabled automatically at power up and when DCOK * is negated when the processor is halted. The firmware BOOT - * command might also do this, but I can't find any docs to + * command might also do this, but I can't find any docs to * prove this. */ __mtpr(0, PR_CADR); @@ -112,9 +112,8 @@ static int __init ka650_platform_device_init(void) { - if (mv != &mv_ka650) { + if (!is_ka650()) return -ENODEV; - } platform_device_register(&ka650_cqbic_device); platform_device_register(&ka650_iprcons_device); Index: cpu_vxt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_vxt.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- cpu_vxt.c 4 Oct 2004 06:51:50 -0000 1.18 +++ cpu_vxt.c 25 Apr 2005 10:39:55 -0000 1.19 @@ -3,9 +3,9 @@ * VXT CPU in the VXT2000 machines. * * From mailing list messages the SID is 14000006 but NetBSD uses 14000008. - * + * * This may work for other ka48 based systems, - * + * * may 2002. It looks as if the 20040058 address is right for prom output. */ @@ -66,12 +66,13 @@ static int __init vxt_platform_device_init (void) { - if (!is_vxt ()) + if (!is_vxt()) return -ENODEV; platform_device_register (&vxt_diag_led_device); return 0; } + arch_initcall (vxt_platform_device_init); Index: cpu_ka630.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka630.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- cpu_ka630.c 2 Oct 2004 11:42:47 -0000 1.12 +++ cpu_ka630.c 25 Apr 2005 10:39:55 -0000 1.13 @@ -14,7 +14,7 @@ #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/clock.h> /* For clock_init routines */ - + static const char *ka630_cpu_type_str(void) { return "KA630"; Index: cpu_ka49.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka49.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cpu_ka49.c 8 Oct 2004 19:40:19 -0000 1.6 +++ cpu_ka49.c 25 Apr 2005 10:39:55 -0000 1.7 @@ -16,7 +16,7 @@ #include <asm/vaxcpu.h> #include <asm/clock.h> /* for clock_init routines */ #include <asm/bus/vsbus.h> - + static void ka49_post_vm_init(void) { int start, slut; @@ -93,11 +93,11 @@ /* * Flush The Pipe (via REI) */ - asm ( - "movpsl -(%sp);" - "movab 1f,-(%sp);" - "rei;" - "1:;"); + __asm__ __volatile__ ( + " movpsl -(%sp) \n" + " movab 1f,-(%sp) \n" + " rei \n" + "1: \n"); /* * Enable Primary Cache @@ -162,7 +162,7 @@ { int retval; - if (mv != &mv_ka49) + if (!is_ka49()) return -ENODEV; platform_device_register (&ka49_diag_led_device); Index: cpu_ka42.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka42.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- cpu_ka42.c 25 Apr 2005 10:30:55 -0000 1.18 +++ cpu_ka42.c 25 Apr 2005 10:39:55 -0000 1.19 @@ -71,9 +71,8 @@ { int retval; - if (mv != &mv_ka42) { + if (!is_ka42()) return -ENODEV; - } platform_device_register(&ka42_diag_led_device); Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- cpu_ka46.c 25 Apr 2005 08:12:56 -0000 1.23 +++ cpu_ka46.c 25 Apr 2005 10:39:55 -0000 1.24 @@ -155,9 +155,8 @@ { int retval; - if (mv != &mv_ka46) { + if (!is_ka46()) return -ENODEV; - } platform_device_register(&ka46_diag_led_device); Index: cpu_ka43.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka43.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- cpu_ka43.c 25 Apr 2005 08:16:15 -0000 1.22 +++ cpu_ka43.c 25 Apr 2005 10:39:55 -0000 1.23 @@ -252,9 +252,8 @@ { int retval; - if (mv != &mv_ka43) { + if (!is_ka43()) return -ENODEV; - } platform_device_register(&ka43_diag_led_device); Index: cpu_ka48.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka48.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- cpu_ka48.c 25 Apr 2005 09:18:48 -0000 1.9 +++ cpu_ka48.c 25 Apr 2005 10:39:55 -0000 1.10 @@ -47,7 +47,7 @@ static void ka48_cache_clear(void) { int *tmp, i; - + /* Clear caches */ tmp = (void *)KA48_INVFLT; /* Inv filter */ for (i = 0; i < KA48_INVFLTSZ / sizeof(int); i++) @@ -78,7 +78,7 @@ __mtpr(PR_ACCS, 2); /* Enable floating points */ } -static void ka48_dma_init(void) +static void ka48_dma_init(void) { int i; unsigned int __iomem *base_addr; @@ -146,9 +146,8 @@ { int retval; - if (mv != &mv_ka48) { + if (!is_ka48()) return -ENODEV; - } retval = platform_device_register(&ka48_vsbus_device); if (!retval) { @@ -157,5 +156,6 @@ return retval; } - + arch_initcall(ka48_platform_device_init); + |
From: Jan-Benedict G. <jb...@us...> - 2005-04-25 10:31:06
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3410 Modified Files: cpu_ka42.c Log Message: - Whitespace. - cpu_ka42.c contains: static int __init ka42_platform_device_init(void) { int retval; if (mv != &mv_ka42) { return -ENODEV; } This could be "if (!is_ka42())", right? Index: cpu_ka42.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka42.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- cpu_ka42.c 2 Oct 2004 11:42:46 -0000 1.17 +++ cpu_ka42.c 25 Apr 2005 10:30:55 -0000 1.18 @@ -4,7 +4,7 @@ * Copyright (C) 2000 Kenn Humborg * * This file contains generic machine vector handlers for the - * KA42 CPUs in the early CVAX-based VAXstation 3100 + * KA42 CPUs in the early CVAX-based VAXstation 3100 * machines (models 10 to 48) * */ @@ -19,7 +19,7 @@ #include <asm/vaxcpu.h> #include <asm/clock.h> /* For clock_init routines */ #include <asm/bus/vsbus.h> - + static void ka42_post_vm_init(void) { #define KA42_CADR_S2E 0x80 @@ -36,13 +36,13 @@ static const char *ka42_cpu_type_str(void) { - return "KA42"; + return "KA42"; } struct vax_mv mv_ka42 = { .post_vm_init = ka42_post_vm_init, .pre_vm_putchar = ka4x_prom_putchar, - .pre_vm_getchar = ka4x_prom_getchar, + .pre_vm_getchar = ka4x_prom_getchar, .post_vm_putchar = dz11_putchar, .post_vm_getchar = dz11_getchar, .cpu_type_str = ka42_cpu_type_str, @@ -90,7 +90,7 @@ vsbus_add_fixed_device(&ka42_vsbus_device.dev, "vax-5380-ext", 0x200c0180, 0); #endif } - + return retval; } |