diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-09-22 13:50:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-09-22 13:50:31 +0000 |
commit | 9ab7bf3acd6ab99b33e2beb51bde5833631b3455 (patch) | |
tree | d817bae720e62b8163b5b3c4dbd324b97af91dfa /sys/arch | |
parent | a87057ae86dfc261ff80719a08a68a262bd15710 (diff) |
Start removing some tiny irrelevant differences between hppa64 and hppa
so that important differences can be spotted easier.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa64/hppa64/autoconf.c | 16 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/conf.c | 20 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/process_machdep.c | 19 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/vm_machdep.c | 27 |
5 files changed, 32 insertions, 58 deletions
diff --git a/sys/arch/hppa64/hppa64/autoconf.c b/sys/arch/hppa64/hppa64/autoconf.c index bb5b1180c11..8d5bb8de1bd 100644 --- a/sys/arch/hppa64/hppa64/autoconf.c +++ b/sys/arch/hppa64/hppa64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.14 2011/04/07 13:13:01 jsing Exp $ */ +/* $OpenBSD: autoconf.c,v 1.15 2011/09/22 13:50:30 deraadt Exp $ */ /* * Copyright (c) 1998-2005 Michael Shalayeff @@ -66,14 +66,13 @@ #include <dev/pci/pcireg.h> #endif +/* device we booted from */ +struct device *bootdv; void dumpconf(void); -void print_devpath(const char *, struct pz_device *); +void print_devpath(const char *label, struct pz_device *pz); void (*cold_hook)(int); /* see below */ -/* device we booted from */ -struct device *bootdv; - /* * LED blinking thing */ @@ -123,7 +122,7 @@ cpu_configure(void) void diskconf(void) { - print_devpath("boot path", &PAGE0->mem_boot); + print_devpath("bootpath", &PAGE0->mem_boot); setroot(bootdv, 0, RB_USERREQ); dumpconf(); } @@ -209,9 +208,6 @@ dumpconf(void) dumpsize = physmem; } - -void print_devpath(const char *label, struct pz_device *pz); - void print_devpath(const char *label, struct pz_device *pz) { @@ -503,8 +499,6 @@ device_register(struct device *dev, void *aux) */ basename = dev->dv_cfdata->cf_driver->cd_name; - /* TODO wd detect */ - /* * We only grok SCSI boot currently. Match on proper device hierarchy, * name and unit/lun values. diff --git a/sys/arch/hppa64/hppa64/conf.c b/sys/arch/hppa64/hppa64/conf.c index b721e78ff6d..9cc67d9c4bb 100644 --- a/sys/arch/hppa64/hppa64/conf.c +++ b/sys/arch/hppa64/hppa64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.18 2011/01/14 19:04:08 jasper Exp $ */ +/* $OpenBSD: conf.c,v 1.19 2011/09/22 13:50:30 deraadt Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -70,13 +70,12 @@ struct bdevsw bdevsw[] = bdev_disk_init(NCD,cd), /* 6: SCSI CD-ROM */ bdev_disk_init(NFD,fd), /* 7: floppy drive */ bdev_disk_init(NWD,wd), /* 8: ST506 drive */ - /* 9: */ - bdev_lkm_dummy(), - bdev_lkm_dummy(), - bdev_lkm_dummy(), - bdev_lkm_dummy(), - bdev_lkm_dummy(), - bdev_lkm_dummy(), + bdev_lkm_dummy(), /* 9: */ + bdev_lkm_dummy(), /* 10: */ + bdev_lkm_dummy(), /* 11: */ + bdev_lkm_dummy(), /* 12: */ + bdev_lkm_dummy(), /* 13: */ + bdev_lkm_dummy(), /* 14: */ }; int nblkdev = nitems(bdevsw); @@ -127,7 +126,6 @@ cdev_decl(pci); #include "bthub.h" - struct cdevsw cdevsw[] = { cdev_cn_init(1,cn), /* 0: virtual console */ @@ -144,7 +142,7 @@ struct cdevsw cdevsw[] = cdev_tape_init(NST,st), /* 11: SCSI tape */ cdev_disk_init(NCD,cd), /* 12: SCSI cd-rom */ cdev_ch_init(NCH,ch), /* 13: SCSI changer */ - cdev_notdef(), /* 14 */ + cdev_notdef(), /* 14: */ cdev_uk_init(NUK,uk), /* 15: SCSI unknown */ cdev_fd_init(1,filedesc), /* 16: file descriptor pseudo-device */ cdev_bpf_init(NBPFILTER,bpf), /* 17: Berkeley packet filter */ @@ -165,7 +163,7 @@ struct cdevsw cdevsw[] = #ifdef USER_PCICONF cdev_pci_init(NPCI,pci), /* 31: PCI user */ #else - cdev_notdef(), + cdev_notdef(), /* 31: */ #endif #ifdef NNPFS cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 32: nnpfs communication device */ diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c index e8ae8164cd1..12cbef268ac 100644 --- a/sys/arch/hppa64/hppa64/machdep.c +++ b/sys/arch/hppa64/hppa64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.43 2011/09/20 13:56:44 jsing Exp $ */ +/* $OpenBSD: machdep.c,v 1.44 2011/09/22 13:50:30 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -412,7 +412,7 @@ cpu_startup(void) #ifdef BOOT_CONFIG user_config(); #else - printf("kernel does not support -c; continuing...\n"); + printf("kernel does not support -c; continuing..\n"); #endif } } @@ -545,6 +545,7 @@ boot(int howto) boothowto = howto | (boothowto & RB_HALT); if (!(howto & RB_NOSYNC)) { + waittime = 0; vfs_shutdown(); /* * If we've been adjusting the clock, the todr @@ -592,13 +593,14 @@ boot(int howto) /* ask firmware to reset */ pdc_call((iodcio_t)pdc, 0, PDC_BROADCAST_RESET, PDC_DO_RESET); + /* forcably reset module if that fails */ __asm __volatile(".export hppa_reset, entry\n\t" ".label hppa_reset"); __asm __volatile("stwas %0, 0(%1)" :: "r" (CMD_RESET), "r" (HPPA_LBCAST + iomod_command)); } - for(;;); /* loop while bus reset is comming up */ + for (;;) ; /* loop while bus reset is comming up */ /* NOTREACHED */ } diff --git a/sys/arch/hppa64/hppa64/process_machdep.c b/sys/arch/hppa64/hppa64/process_machdep.c index e285c308d4b..d6a0f47f030 100644 --- a/sys/arch/hppa64/hppa64/process_machdep.c +++ b/sys/arch/hppa64/hppa64/process_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process_machdep.c,v 1.2 2011/04/16 22:02:32 kettenis Exp $ */ +/* $OpenBSD: process_machdep.c,v 1.3 2011/09/22 13:50:30 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -17,7 +17,6 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - #include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> @@ -25,9 +24,7 @@ #include <sys/user.h> int -process_read_regs(p, regs) - struct proc *p; - struct reg *regs; +process_read_regs(struct proc *p, struct reg *regs) { struct trapframe *tf = p->p_md.md_regs; @@ -52,9 +49,7 @@ process_read_fpregs(struct proc *p, struct fpreg *fpregs) #ifdef PTRACE int -process_write_regs(p, regs) - struct proc *p; - struct reg *regs; +process_write_regs(struct proc *p, struct reg *regs) { struct trapframe *tf = p->p_md.md_regs; @@ -77,9 +72,7 @@ process_write_fpregs(struct proc *p, struct fpreg *fpregs) } int -process_sstep(p, sstep) - struct proc *p; - int sstep; +process_sstep(struct proc *p, int sstep) { if (sstep) return (EINVAL); @@ -88,9 +81,7 @@ process_sstep(p, sstep) } int -process_set_pc(p, addr) - struct proc *p; - caddr_t addr; +process_set_pc(struct proc *p, caddr_t addr) { p->p_md.md_regs->tf_iioq[1] = 4 + (p->p_md.md_regs->tf_iioq[0] = (register_t)addr | 3); diff --git a/sys/arch/hppa64/hppa64/vm_machdep.c b/sys/arch/hppa64/hppa64/vm_machdep.c index 3a0d61852e7..e0ab2e49822 100644 --- a/sys/arch/hppa64/hppa64/vm_machdep.c +++ b/sys/arch/hppa64/hppa64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.16 2011/09/20 21:46:08 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.17 2011/09/22 13:50:30 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -43,11 +43,8 @@ extern struct pool hppa_fppl; * Dump the machine specific header information at the start of a core dump. */ int -cpu_coredump(p, vp, cred, core) - struct proc *p; - struct vnode *vp; - struct ucred *cred; - struct core *core; +cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, + struct core *core) { struct md_coredump md_core; struct coreseg cseg; @@ -84,12 +81,8 @@ cpu_coredump(p, vp, cred, core) } void -cpu_fork(p1, p2, stack, stacksize, func, arg) - struct proc *p1, *p2; - void *stack; - size_t stacksize; - void (*func)(void *); - void *arg; +cpu_fork(struct proc *p1, struct proc *p2, void *stack, size_t stacksize, + void (*func)(void *), void *arg) { extern register_t switch_tramp_p; @@ -146,7 +139,7 @@ cpu_fork(p1, p2, stack, stacksize, func, arg) tf->tf_sp = (register_t)stack; /* - * Build stack frames for the cpu_switch & co. + * Build stack frames for the cpu_switchto & co. */ osp = sp + HPPA_FRAME_SIZE; *(register_t*)(osp - HPPA_FRAME_SIZE) = 0; @@ -177,9 +170,7 @@ cpu_exit(struct proc *p) * Map an IO request into kernel virtual address space. */ void -vmapbuf(bp, len) - struct buf *bp; - vsize_t len; +vmapbuf(struct buf *bp, vsize_t len) { struct pmap *pm = vm_map_pmap(&bp->b_proc->p_vmspace->vm_map); vaddr_t kva, uva; @@ -214,9 +205,7 @@ vmapbuf(bp, len) * Unmap IO request from the kernel virtual address space. */ void -vunmapbuf(bp, len) - struct buf *bp; - vsize_t len; +vunmapbuf(struct buf *bp, vsize_t len) { vaddr_t addr, off; |