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 |