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 */ |