diff options
Diffstat (limited to 'sys/arch')
33 files changed, 287 insertions, 825 deletions
diff --git a/sys/arch/sparc64/dev/auxio.c b/sys/arch/sparc64/dev/auxio.c index 41456366b91..b92995c3695 100644 --- a/sys/arch/sparc64/dev/auxio.c +++ b/sys/arch/sparc64/dev/auxio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auxio.c,v 1.9 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: auxio.c,v 1.10 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: auxio.c,v 1.1 2000/04/15 03:08:13 mrg Exp $ */ /* @@ -73,10 +73,7 @@ struct cfdriver auxio_cd = { void auxio_led_blink(void *, int); int -auxio_ebus_match(parent, cf, aux) - struct device *parent; - void *cf; - void *aux; +auxio_ebus_match(struct device *parent, void *cf, void *aux) { struct ebus_attach_args *ea = aux; @@ -84,9 +81,7 @@ auxio_ebus_match(parent, cf, aux) } void -auxio_ebus_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +auxio_ebus_attach(struct device *parent, struct device *self, void *aux) { struct auxio_softc *sc = (struct auxio_softc *)self; struct ebus_attach_args *ea = aux; @@ -134,10 +129,7 @@ auxio_ebus_attach(parent, self, aux) } int -auxio_sbus_match(parent, cf, aux) - struct device *parent; - void *cf; - void *aux; +auxio_sbus_match(struct device *parent, void *cf, void *aux) { struct sbus_attach_args *sa = aux; @@ -145,9 +137,7 @@ auxio_sbus_match(parent, cf, aux) } void -auxio_sbus_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +auxio_sbus_attach(struct device *parent, struct device *self, void *aux) { struct auxio_softc *sc = (struct auxio_softc *)self; struct sbus_attach_args *sa = aux; @@ -176,8 +166,7 @@ auxio_sbus_attach(parent, self, aux) } void -auxio_attach_common(sc) - struct auxio_softc *sc; +auxio_attach_common(struct auxio_softc *sc) { sc->sc_blink.bl_func = auxio_led_blink; sc->sc_blink.bl_arg = sc; diff --git a/sys/arch/sparc64/dev/beep.c b/sys/arch/sparc64/dev/beep.c index 07c45652bc9..0e535271d74 100644 --- a/sys/arch/sparc64/dev/beep.c +++ b/sys/arch/sparc64/dev/beep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: beep.c,v 1.10 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: beep.c,v 1.11 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2006 Jason L. Wright (jason@thought.net) @@ -102,9 +102,7 @@ beep_match(struct device *parent, void *match, void *aux) } void -beep_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +beep_attach(struct device *parent, struct device *self, void *aux) { struct beep_softc *sc = (void *)self; struct ebus_attach_args *ea = aux; diff --git a/sys/arch/sparc64/dev/beeper.c b/sys/arch/sparc64/dev/beeper.c index 7109c0f1dd2..0062e9990ce 100644 --- a/sys/arch/sparc64/dev/beeper.c +++ b/sys/arch/sparc64/dev/beeper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: beeper.c,v 1.14 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: beeper.c,v 1.15 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -82,10 +82,7 @@ void beeper_bell(void *, u_int, u_int, u_int, int); #endif int -beeper_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +beeper_match(struct device *parent, void *match, void *aux) { struct ebus_attach_args *ea = aux; @@ -95,9 +92,7 @@ beeper_match(parent, match, aux) } void -beeper_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +beeper_attach(struct device *parent, struct device *self, void *aux) { struct beeper_softc *sc = (void *)self; struct ebus_attach_args *ea = aux; @@ -127,8 +122,7 @@ beeper_attach(parent, self, aux) #if NPCKBD > 0 void -beeper_stop(vsc) - void *vsc; +beeper_stop(void *vsc) { struct beeper_softc *sc = vsc; int s; @@ -141,10 +135,7 @@ beeper_stop(vsc) } void -beeper_bell(vsc, pitch, period, volume, poll) - void *vsc; - u_int pitch, period, volume; - int poll; +beeper_bell(void *vsc, u_int pitch, u_int period, u_int volume, int poll) { struct beeper_softc *sc = vsc; int s; diff --git a/sys/arch/sparc64/dev/central.c b/sys/arch/sparc64/dev/central.c index aac9725ad8d..471deeaab67 100644 --- a/sys/arch/sparc64/dev/central.c +++ b/sys/arch/sparc64/dev/central.c @@ -1,4 +1,4 @@ -/* $OpenBSD: central.c,v 1.11 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: central.c,v 1.12 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2004 Jason L. Wright (jason@thought.net) @@ -60,9 +60,7 @@ int _central_bus_map(bus_space_tag_t, bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); int -central_match(parent, match, aux) - struct device *parent; - void *match, *aux; +central_match(struct device *parent, void *match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -72,9 +70,7 @@ central_match(parent, match, aux) } void -central_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +central_attach(struct device *parent, struct device *self, void *aux) { struct central_softc *sc = (struct central_softc *)self; struct mainbus_attach_args *ma = aux; diff --git a/sys/arch/sparc64/dev/creator.c b/sys/arch/sparc64/dev/creator.c index d149cb3842c..2f77166f0c9 100644 --- a/sys/arch/sparc64/dev/creator.c +++ b/sys/arch/sparc64/dev/creator.c @@ -1,4 +1,4 @@ -/* $OpenBSD: creator.c,v 1.55 2022/07/15 17:57:26 kettenis Exp $ */ +/* $OpenBSD: creator.c,v 1.56 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -82,9 +82,7 @@ const struct cfattach creator_ca = { }; int -creator_match(parent, match, aux) - struct device *parent; - void *match, *aux; +creator_match(struct device *parent, void *match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -95,9 +93,7 @@ creator_match(parent, match, aux) } void -creator_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +creator_attach(struct device *parent, struct device *self, void *aux) { struct creator_softc *sc = (struct creator_softc *)self; struct mainbus_attach_args *ma = aux; @@ -219,12 +215,7 @@ unmap_dfb24: } int -creator_ioctl(v, cmd, data, flags, p) - void *v; - u_long cmd; - caddr_t data; - int flags; - struct proc *p; +creator_ioctl(void *v, u_long cmd, caddr_t data, int flags, struct proc *p) { struct creator_softc *sc = v; struct wsdisplay_cursor *curs; @@ -489,10 +480,7 @@ const struct creator_mappings { #define CREATOR_NMAPPINGS nitems(creator_map) paddr_t -creator_mmap(vsc, off, prot) - void *vsc; - off_t off; - int prot; +creator_mmap(void *vsc, off_t off, int prot) { paddr_t x; struct creator_softc *sc = vsc; @@ -541,9 +529,7 @@ creator_mmap(vsc, off, prot) } void -creator_ras_fifo_wait(sc, n) - struct creator_softc *sc; - int n; +creator_ras_fifo_wait(struct creator_softc *sc, int n) { int32_t cache = sc->sc_fifo_cache; @@ -557,8 +543,7 @@ creator_ras_fifo_wait(sc, n) } void -creator_ras_wait(sc) - struct creator_softc *sc; +creator_ras_wait(struct creator_softc *sc) { u_int32_t ucsr, r; @@ -573,8 +558,7 @@ creator_ras_wait(sc) } void -creator_ras_init(sc) - struct creator_softc *sc; +creator_ras_init(struct creator_softc *sc) { creator_ras_fifo_wait(sc, 7); FBC_WRITE(sc, FFB_FBC_PPC, @@ -593,10 +577,7 @@ creator_ras_init(sc) } int -creator_ras_eraserows(cookie, row, n, attr) - void *cookie; - int row, n; - uint32_t attr; +creator_ras_eraserows(void *cookie, int row, int n, uint32_t attr) { struct rasops_info *ri = cookie; struct creator_softc *sc = ri->ri_hw; @@ -633,10 +614,7 @@ creator_ras_eraserows(cookie, row, n, attr) } int -creator_ras_erasecols(cookie, row, col, n, attr) - void *cookie; - int row, col, n; - uint32_t attr; +creator_ras_erasecols(void *cookie, int row, int col, int n, uint32_t attr) { struct rasops_info *ri = cookie; struct creator_softc *sc = ri->ri_hw; @@ -670,8 +648,7 @@ creator_ras_erasecols(cookie, row, col, n, attr) } void -creator_ras_fill(sc) - struct creator_softc *sc; +creator_ras_fill(struct creator_softc *sc) { creator_ras_fifo_wait(sc, 2); FBC_WRITE(sc, FFB_FBC_ROP, FBC_ROP_NEW); @@ -680,9 +657,7 @@ creator_ras_fill(sc) } int -creator_ras_copyrows(cookie, src, dst, n) - void *cookie; - int src, dst, n; +creator_ras_copyrows(void *cookie, int src, int dst, int n) { struct rasops_info *ri = cookie; struct creator_softc *sc = ri->ri_hw; @@ -722,9 +697,7 @@ creator_ras_copyrows(cookie, src, dst, n) } void -creator_ras_setfg(sc, fg) - struct creator_softc *sc; - int32_t fg; +creator_ras_setfg(struct creator_softc *sc, int32_t fg) { creator_ras_fifo_wait(sc, 1); if (fg == sc->sc_fg_cache) diff --git a/sys/arch/sparc64/dev/fhc_central.c b/sys/arch/sparc64/dev/fhc_central.c index df5e82030e4..0e4b19b3f51 100644 --- a/sys/arch/sparc64/dev/fhc_central.c +++ b/sys/arch/sparc64/dev/fhc_central.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fhc_central.c,v 1.7 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: fhc_central.c,v 1.8 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2004 Jason L. Wright (jason@thought.net). @@ -49,9 +49,7 @@ const struct cfattach fhc_central_ca = { }; int -fhc_central_match(parent, match, aux) - struct device *parent; - void *match, *aux; +fhc_central_match(struct device *parent, void *match, void *aux) { struct central_attach_args *ca = aux; @@ -61,9 +59,7 @@ fhc_central_match(parent, match, aux) } void -fhc_central_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +fhc_central_attach(struct device *parent, struct device *self, void *aux) { struct fhc_softc *sc = (struct fhc_softc *)self; struct central_attach_args *ca = aux; diff --git a/sys/arch/sparc64/dev/fhc_mainbus.c b/sys/arch/sparc64/dev/fhc_mainbus.c index d33d41cd0e4..4cc7c458c57 100644 --- a/sys/arch/sparc64/dev/fhc_mainbus.c +++ b/sys/arch/sparc64/dev/fhc_mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fhc_mainbus.c,v 1.6 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: fhc_mainbus.c,v 1.7 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2004 Jason L. Wright (jason@thought.net). @@ -47,9 +47,7 @@ const struct cfattach fhc_mainbus_ca = { }; int -fhc_mainbus_match(parent, match, aux) - struct device *parent; - void *match, *aux; +fhc_mainbus_match(struct device *parent, void *match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -59,9 +57,7 @@ fhc_mainbus_match(parent, match, aux) } void -fhc_mainbus_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +fhc_mainbus_attach(struct device *parent, struct device *self, void *aux) { struct fhc_softc *sc = (struct fhc_softc *)self; struct mainbus_attach_args *ma = aux; diff --git a/sys/arch/sparc64/dev/lpt_ebus.c b/sys/arch/sparc64/dev/lpt_ebus.c index 86988c8be05..853f1b19f87 100644 --- a/sys/arch/sparc64/dev/lpt_ebus.c +++ b/sys/arch/sparc64/dev/lpt_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt_ebus.c,v 1.11 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: lpt_ebus.c,v 1.12 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: lpt_ebus.c,v 1.8 2002/03/01 11:51:00 martin Exp $ */ /* @@ -56,10 +56,7 @@ const struct cfattach lpt_ebus_ca = { }; int -lpt_ebus_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +lpt_ebus_match(struct device *parent, void *match, void *aux) { struct ebus_attach_args *ea = aux; @@ -70,9 +67,7 @@ lpt_ebus_match(parent, match, aux) } void -lpt_ebus_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +lpt_ebus_attach(struct device *parent, struct device *self, void *aux) { struct lpt_ebus_softc *sc = (void *)self; struct ebus_attach_args *ea = aux; diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c index 9281dbd0299..9fd02e1a0c8 100644 --- a/sys/arch/sparc64/dev/pci_machdep.c +++ b/sys/arch/sparc64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.51 2020/06/23 01:21:29 jmatthew Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.52 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */ /* @@ -77,10 +77,8 @@ static int pci_bus_frequency(int node); */ void -pci_attach_hook(parent, self, pba) - struct device *parent; - struct device *self; - struct pcibus_attach_args *pba; +pci_attach_hook(struct device *parent, struct device *self, + struct pcibus_attach_args *pba) { /* Don't do anything */ } @@ -126,20 +124,14 @@ pci_probe_device_hook(pci_chipset_tag_t pc, struct pci_attach_args *pa) } int -pci_bus_maxdevs(pc, busno) - pci_chipset_tag_t pc; - int busno; +pci_bus_maxdevs(pci_chipset_tag_t pc, int busno) { return 32; } pcitag_t -pci_make_tag(pc, b, d, f) - pci_chipset_tag_t pc; - int b; - int d; - int f; +pci_make_tag(pci_chipset_tag_t pc, int b, int d, int f) { struct ofw_pci_register reg; pcitag_t tag; @@ -226,10 +218,7 @@ pci_make_tag(pc, b, d, f) } void -pci_decompose_tag(pc, tag, bp, dp, fp) - pci_chipset_tag_t pc; - pcitag_t tag; - int *bp, *dp, *fp; +pci_decompose_tag(pci_chipset_tag_t pc, pcitag_t tag, int *bp, int *dp, int *fp) { if (bp != NULL) @@ -387,9 +376,7 @@ pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data) * XXX: how does this deal with multiple interrupts for a device? */ int -pci_intr_map(pa, ihp) - struct pci_attach_args *pa; - pci_intr_handle_t *ihp; +pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) { pcitag_t tag = pa->pa_tag; int interrupts[4], ninterrupts; @@ -490,9 +477,7 @@ pci_intr_line(pci_chipset_tag_t pc, pci_intr_handle_t ih) } const char * -pci_intr_string(pc, ih) - pci_chipset_tag_t pc; - pci_intr_handle_t ih; +pci_intr_string(pci_chipset_tag_t pc, pci_intr_handle_t ih) { static char str[16]; const char *rv = str; @@ -515,13 +500,8 @@ pci_intr_string(pc, ih) } void * -pci_intr_establish(pc, ih, level, func, arg, what) - pci_chipset_tag_t pc; - pci_intr_handle_t ih; - int level; - int (*func)(void *); - void *arg; - const char *what; +pci_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t ih, int level, + int (*func)(void *), void *arg, const char *what) { return (pci_intr_establish_cpu(pc, ih, level, NULL, func, arg, what)); } @@ -549,9 +529,7 @@ pci_intr_establish_cpu(pci_chipset_tag_t pc, pci_intr_handle_t ih, } void -pci_intr_disestablish(pc, cookie) - pci_chipset_tag_t pc; - void *cookie; +pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie) { DPRINTF(SPDB_INTR, ("pci_intr_disestablish: cookie %p\n", cookie)); diff --git a/sys/arch/sparc64/dev/pckbc_ebus.c b/sys/arch/sparc64/dev/pckbc_ebus.c index c3f4ff14d21..9dbc8e79695 100644 --- a/sys/arch/sparc64/dev/pckbc_ebus.c +++ b/sys/arch/sparc64/dev/pckbc_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_ebus.c,v 1.15 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: pckbc_ebus.c,v 1.16 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -72,10 +72,7 @@ const struct cfattach pckbc_ebus_ca = { int pckbc_ebus_is_console(struct pckbc_ebus_softc *); int -pckbc_ebus_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +pckbc_ebus_match(struct device *parent, void *match, void *aux) { struct ebus_attach_args *ea = aux; @@ -85,9 +82,7 @@ pckbc_ebus_match(parent, match, aux) } void -pckbc_ebus_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +pckbc_ebus_attach(struct device *parent, struct device *self, void *aux) { struct pckbc_ebus_softc *sc = (void *)self; struct pckbc_softc *psc = &sc->sc_pckbc; @@ -183,8 +178,7 @@ pckbc_ebus_attach(parent, self, aux) } int -pckbc_ebus_is_console(sc) - struct pckbc_ebus_softc *sc; +pckbc_ebus_is_console(struct pckbc_ebus_softc *sc) { char *name; int node; diff --git a/sys/arch/sparc64/dev/pcons.c b/sys/arch/sparc64/dev/pcons.c index 84506f28f44..f212a3058d7 100644 --- a/sys/arch/sparc64/dev/pcons.c +++ b/sys/arch/sparc64/dev/pcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcons.c,v 1.26 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: pcons.c,v 1.27 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: pcons.c,v 1.7 2001/05/02 10:32:20 scw Exp $ */ /*- @@ -148,10 +148,7 @@ extern struct consdev *cn_tab; cons_decl(prom_); int -pconsmatch(parent, match, aux) - struct device *parent; - void *match; - void *aux; +pconsmatch(struct device *parent, void *match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -163,9 +160,7 @@ pconsmatch(parent, match, aux) void pcons_poll(void *); void -pconsattach(parent, self, aux) - struct device *parent, *self; - void *aux; +pconsattach(struct device *parent, struct device *self, void *aux) { struct pconssoftc *sc = (struct pconssoftc *) self; #if NWSDISPLAY > 0 @@ -206,10 +201,7 @@ void pconsstart(struct tty *); int pconsparam(struct tty *, struct termios *); int -pconsopen(dev, flag, mode, p) - dev_t dev; - int flag, mode; - struct proc *p; +pconsopen(dev_t dev, int flag, int mode, struct proc *p) { struct pconssoftc *sc; int unit = minor(dev); @@ -253,10 +245,7 @@ pconsopen(dev, flag, mode, p) } int -pconsclose(dev, flag, mode, p) - dev_t dev; - int flag, mode; - struct proc *p; +pconsclose(dev_t dev, int flag, int mode, struct proc *p) { struct pconssoftc *sc = pcons_cd.cd_devs[minor(dev)]; struct tty *tp = sc->of_tty; @@ -269,10 +258,7 @@ pconsclose(dev, flag, mode, p) } int -pconsread(dev, uio, flag) - dev_t dev; - struct uio *uio; - int flag; +pconsread(dev_t dev, struct uio *uio, int flag) { struct pconssoftc *sc = pcons_cd.cd_devs[minor(dev)]; struct tty *tp = sc->of_tty; @@ -281,10 +267,7 @@ pconsread(dev, uio, flag) } int -pconswrite(dev, uio, flag) - dev_t dev; - struct uio *uio; - int flag; +pconswrite(dev_t dev, struct uio *uio, int flag) { struct pconssoftc *sc = pcons_cd.cd_devs[minor(dev)]; struct tty *tp = sc->of_tty; @@ -293,12 +276,7 @@ pconswrite(dev, uio, flag) } int -pconsioctl(dev, cmd, data, flag, p) - dev_t dev; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +pconsioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct pconssoftc *sc = pcons_cd.cd_devs[minor(dev)]; struct tty *tp = sc->of_tty; @@ -312,8 +290,7 @@ pconsioctl(dev, cmd, data, flag, p) } struct tty * -pconstty(dev) - dev_t dev; +pconstty(dev_t dev) { struct pconssoftc *sc = pcons_cd.cd_devs[minor(dev)]; @@ -321,16 +298,13 @@ pconstty(dev) } int -pconsstop(tp, flag) - struct tty *tp; - int flag; +pconsstop(struct tty *tp, int flag) { return 0; } void -pconsstart(tp) - struct tty *tp; +pconsstart(struct tty *tp) { struct clist *cl; int s, len; @@ -363,9 +337,7 @@ pconsstart(tp) } int -pconsparam(tp, t) - struct tty *tp; - struct termios *t; +pconsparam(struct tty *tp, struct termios *t) { tp->t_ispeed = t->c_ispeed; tp->t_ospeed = t->c_ospeed; @@ -374,8 +346,7 @@ pconsparam(tp, t) } void -pcons_poll(aux) - void *aux; +pcons_poll(void *aux) { struct pconssoftc *sc = aux; struct tty *tp = sc->of_tty; @@ -402,9 +373,7 @@ pconsprobe(void) } void -pcons_cnpollc(dev, on) - dev_t dev; - int on; +pcons_cnpollc(dev_t dev, int on) { struct pconssoftc *sc = NULL; diff --git a/sys/arch/sparc64/dev/power.c b/sys/arch/sparc64/dev/power.c index cf7eeaed929..701c410a7af 100644 --- a/sys/arch/sparc64/dev/power.c +++ b/sys/arch/sparc64/dev/power.c @@ -1,4 +1,4 @@ -/* $OpenBSD: power.c,v 1.9 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: power.c,v 1.10 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2006 Jason L. Wright (jason@thought.net) @@ -71,10 +71,7 @@ struct cfdriver power_cd = { }; int -power_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +power_match(struct device *parent, void *match, void *aux) { struct ebus_attach_args *ea = aux; @@ -84,9 +81,7 @@ power_match(parent, match, aux) } void -power_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +power_attach(struct device *parent, struct device *self, void *aux) { struct power_softc *sc = (void *)self; struct ebus_attach_args *ea = aux; diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index d0baebb2c78..139aa489d9e 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psycho.c,v 1.80 2022/02/21 11:09:52 jsg Exp $ */ +/* $OpenBSD: psycho.c,v 1.81 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ /* @@ -721,9 +721,7 @@ psycho_alloc_chipset(struct psycho_pbm *pp, int node, pci_chipset_tag_t pc) * grovel the OBP for various psycho properties */ void -psycho_get_bus_range(node, brp) - int node; - int *brp; +psycho_get_bus_range(int node, int *brp) { int n, error; diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c index d3e00a3ded6..73ef07db8b4 100644 --- a/sys/arch/sparc64/dev/sab.c +++ b/sys/arch/sparc64/dev/sab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sab.c,v 1.39 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: sab.c,v 1.40 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -209,9 +209,7 @@ struct sabtty_rate sabtty_baudtable[] = { }; int -sab_match(parent, match, aux) - struct device *parent; - void *match, *aux; +sab_match(struct device *parent, void *match, void *aux) { struct ebus_attach_args *ea = aux; char *compat; @@ -226,10 +224,7 @@ sab_match(parent, match, aux) } void -sab_attach(parent, self, aux) - struct device *parent; - struct device *self; - void *aux; +sab_attach(struct device *parent, struct device *self, void *aux) { struct sab_softc *sc = (struct sab_softc *)self; struct ebus_attach_args *ea = aux; @@ -324,9 +319,7 @@ sabtty_activate(struct device *self, int act) } int -sab_print(args, name) - void *args; - const char *name; +sab_print(void *args, const char *name) { struct sabtty_attach_args *sa = args; @@ -337,8 +330,7 @@ sab_print(args, name) } int -sab_intr(vsc) - void *vsc; +sab_intr(void *vsc) { struct sab_softc *sc = vsc; int r = 0, needsoft = 0; @@ -363,8 +355,7 @@ sab_intr(vsc) } void -sab_softintr(vsc) - void *vsc; +sab_softintr(void *vsc) { struct sab_softc *sc = vsc; @@ -375,9 +366,7 @@ sab_softintr(vsc) } int -sabtty_match(parent, match, aux) - struct device *parent; - void *match, *aux; +sabtty_match(struct device *parent, void *match, void *aux) { struct sabtty_attach_args *sa = aux; @@ -387,10 +376,7 @@ sabtty_match(parent, match, aux) } void -sabtty_attach(parent, self, aux) - struct device *parent; - struct device *self; - void *aux; +sabtty_attach(struct device *parent, struct device *self, void *aux) { struct sabtty_softc *sc = (struct sabtty_softc *)self; struct sabtty_attach_args *sa = aux; @@ -480,9 +466,7 @@ sabtty_attach(parent, self, aux) } int -sabtty_intr(sc, needsoftp) - struct sabtty_softc *sc; - int *needsoftp; +sabtty_intr(struct sabtty_softc *sc, int *needsoftp) { u_int8_t isr0, isr1; int i, len = 0, needsoft = 0, r = 0, clearfifo = 0; @@ -591,8 +575,7 @@ sabtty_intr(sc, needsoftp) } void -sabtty_softintr(sc) - struct sabtty_softc *sc; +sabtty_softintr(struct sabtty_softc *sc) { struct tty *tp = sc->sc_tty; int s, flags; @@ -645,10 +628,7 @@ sabtty_softintr(sc) } int -sabttyopen(dev, flags, mode, p) - dev_t dev; - int flags, mode; - struct proc *p; +sabttyopen(dev_t dev, int flags, int mode, struct proc *p) { struct sab_softc *bc; struct sabtty_softc *sc; @@ -763,10 +743,7 @@ sabttyopen(dev, flags, mode, p) } int -sabttyclose(dev, flags, mode, p) - dev_t dev; - int flags, mode; - struct proc *p; +sabttyclose(dev_t dev, int flags, int mode, struct proc *p) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(dev)]; @@ -806,10 +783,7 @@ sabttyclose(dev, flags, mode, p) } int -sabttyread(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; +sabttyread(dev_t dev, struct uio *uio, int flags) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(dev)]; @@ -819,10 +793,7 @@ sabttyread(dev, uio, flags) } int -sabttywrite(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; +sabttywrite(dev_t dev, struct uio *uio, int flags) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(dev)]; @@ -832,12 +803,7 @@ sabttywrite(dev, uio, flags) } int -sabttyioctl(dev, cmd, data, flags, p) - dev_t dev; - u_long cmd; - caddr_t data; - int flags; - struct proc *p; +sabttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(dev)]; @@ -900,8 +866,7 @@ sabttyioctl(dev, cmd, data, flags, p) } struct tty * -sabttytty(dev) - dev_t dev; +sabttytty(dev_t dev) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(dev)]; @@ -910,9 +875,7 @@ sabttytty(dev) } int -sabttystop(tp, flags) - struct tty *tp; - int flags; +sabttystop(struct tty *tp, int flags) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(tp->t_dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(tp->t_dev)]; @@ -931,9 +894,7 @@ sabttystop(tp, flags) } int -sabtty_mdmctrl(sc, bits, how) - struct sabtty_softc *sc; - int bits, how; +sabtty_mdmctrl(struct sabtty_softc *sc, int bits, int how) { u_int8_t r; int s; @@ -1004,10 +965,7 @@ sabtty_mdmctrl(sc, bits, how) } int -sabttyparam(sc, tp, t) - struct sabtty_softc *sc; - struct tty *tp; - struct termios *t; +sabttyparam(struct sabtty_softc *sc, struct tty *tp, struct termios *t) { int s, ospeed; tcflag_t cflag; @@ -1091,9 +1049,7 @@ sabttyparam(sc, tp, t) } int -sabtty_param(tp, t) - struct tty *tp; - struct termios *t; +sabtty_param(struct tty *tp, struct termios *t) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(tp->t_dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(tp->t_dev)]; @@ -1102,8 +1058,7 @@ sabtty_param(tp, t) } void -sabtty_start(tp) - struct tty *tp; +sabtty_start(struct tty *tp) { struct sab_softc *bc = sab_cd.cd_devs[SAB_CARD(tp->t_dev)]; struct sabtty_softc *sc = bc->sc_child[SAB_PORT(tp->t_dev)]; @@ -1152,8 +1107,7 @@ sabtty_tec_wait(struct sabtty_softc *sc) } void -sabtty_reset(sc) - struct sabtty_softc *sc; +sabtty_reset(struct sabtty_softc *sc) { /* power down */ SAB_WRITE(sc, SAB_CCR0, 0); @@ -1178,8 +1132,7 @@ sabtty_reset(sc) } void -sabtty_flush(sc) - struct sabtty_softc *sc; +sabtty_flush(struct sabtty_softc *sc) { /* clear rx fifo */ sabtty_cec_wait(sc); @@ -1191,8 +1144,7 @@ sabtty_flush(sc) } int -sabtty_speed(rate) - int rate; +sabtty_speed(int rate) { int i, len, r; @@ -1210,9 +1162,7 @@ sabtty_speed(rate) } void -sabtty_cnputc(sc, c) - struct sabtty_softc *sc; - int c; +sabtty_cnputc(struct sabtty_softc *sc, int c) { sabtty_tec_wait(sc); SAB_WRITE(sc, SAB_TIC, c); @@ -1220,8 +1170,7 @@ sabtty_cnputc(sc, c) } int -sabtty_cngetc(sc) - struct sabtty_softc *sc; +sabtty_cngetc(struct sabtty_softc *sc) { u_int8_t r, len, ipc; @@ -1261,9 +1210,7 @@ again: } void -sabtty_cnpollc(sc, on) - struct sabtty_softc *sc; - int on; +sabtty_cnpollc(struct sabtty_softc *sc, int on) { u_int8_t r; @@ -1289,9 +1236,7 @@ sabtty_cnpollc(sc, on) } void -sab_cnputc(dev, c) - dev_t dev; - int c; +sab_cnputc(dev_t dev, int c) { struct sabtty_softc *sc = sabtty_cons_output; @@ -1301,9 +1246,7 @@ sab_cnputc(dev, c) } void -sab_cnpollc(dev, on) - dev_t dev; - int on; +sab_cnpollc(dev_t dev, int on) { struct sabtty_softc *sc = sabtty_cons_input; @@ -1311,8 +1254,7 @@ sab_cnpollc(dev, on) } int -sab_cngetc(dev) - dev_t dev; +sab_cngetc(dev_t dev) { struct sabtty_softc *sc = sabtty_cons_input; @@ -1322,8 +1264,7 @@ sab_cngetc(dev) } void -sabtty_console_flags(sc) - struct sabtty_softc *sc; +sabtty_console_flags(struct sabtty_softc *sc) { int node, channel, options, cookie; char buf[255]; @@ -1362,8 +1303,7 @@ sabtty_console_flags(sc) } void -sabtty_console_speed(sc) - struct sabtty_softc *sc; +sabtty_console_speed(struct sabtty_softc *sc) { char *name; int node, channel, options; @@ -1386,8 +1326,7 @@ sabtty_console_speed(sc) } void -sabtty_abort(sc) - struct sabtty_softc *sc; +sabtty_abort(struct sabtty_softc *sc) { if (sc->sc_flags & SABTTYF_CONS_IN) { diff --git a/sys/arch/sparc64/dev/stp_sbus.c b/sys/arch/sparc64/dev/stp_sbus.c index 34d962c1ddf..cbbb5175685 100644 --- a/sys/arch/sparc64/dev/stp_sbus.c +++ b/sys/arch/sparc64/dev/stp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stp_sbus.c,v 1.12 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: stp_sbus.c,v 1.13 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: stp4020.c,v 1.23 2002/06/01 23:51:03 lukem Exp $ */ /*- @@ -68,10 +68,7 @@ const struct cfattach stp_sbus_ca = { }; int -stpmatch(parent, match, aux) - struct device *parent; - void *match; - void *aux; +stpmatch(struct device *parent, void *match, void *aux) { struct sbus_attach_args *sa = aux; @@ -82,9 +79,7 @@ stpmatch(parent, match, aux) * Attach all the sub-devices we can find */ void -stpattach(parent, self, aux) - struct device *parent, *self; - void *aux; +stpattach(struct device *parent, struct device *self, void *aux) { struct sbus_attach_args *sa = aux; struct stp4020_sbus_softc *ssc = (void *)self; diff --git a/sys/arch/sparc64/dev/uperf.c b/sys/arch/sparc64/dev/uperf.c index cb39277e96d..13a0a222276 100644 --- a/sys/arch/sparc64/dev/uperf.c +++ b/sys/arch/sparc64/dev/uperf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uperf.c,v 1.8 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: uperf.c,v 1.9 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -55,10 +55,7 @@ int uperf_findbysrc(struct uperf_softc *, int, int, u_int32_t *); int uperf_setcntsrc(struct uperf_softc *, struct uperf_io *); int -uperfopen(dev, flags, mode, p) - dev_t dev; - int flags, mode; - struct proc *p; +uperfopen(dev_t dev, int flags, int mode, struct proc *p) { if (minor(dev) >= uperf_cd.cd_ndevs) return (ENXIO); @@ -68,21 +65,13 @@ uperfopen(dev, flags, mode, p) } int -uperfclose(dev, flags, mode, p) - dev_t dev; - int flags, mode; - struct proc *p; +uperfclose(dev_t dev, int flags, int mode, struct proc *p) { return (0); } int -uperfioctl(dev, cmd, data, flags, p) - dev_t dev; - u_long cmd; - caddr_t data; - int flags; - struct proc *p; +uperfioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { struct uperf_softc *usc = uperf_cd.cd_devs[minor(dev)]; struct uperf_io *io = (struct uperf_io *)data; @@ -108,9 +97,7 @@ uperfioctl(dev, cmd, data, flags, p) } int -uperf_getcntsrc(usc, io) - struct uperf_softc *usc; - struct uperf_io *io; +uperf_getcntsrc(struct uperf_softc *usc, struct uperf_io *io) { u_int cnt0_src, cnt1_src; int error; @@ -137,11 +124,7 @@ uperf_getcntsrc(usc, io) } int -uperf_findbyval(usc, cnt, uval, rval) - struct uperf_softc *usc; - int cnt; - u_int uval; - int *rval; +uperf_findbyval(struct uperf_softc *usc, int cnt, u_int uval, int *rval) { struct uperf_src *srcs = usc->usc_srcs; @@ -159,9 +142,7 @@ uperf_findbyval(usc, cnt, uval, rval) } int -uperf_setcntsrc(usc, io) - struct uperf_softc *usc; - struct uperf_io *io; +uperf_setcntsrc(struct uperf_softc *usc, struct uperf_io *io) { u_int32_t cnt0_src, cnt1_src; int error; @@ -185,10 +166,7 @@ uperf_setcntsrc(usc, io) } int -uperf_findbysrc(usc, cnt, src, rval) - struct uperf_softc *usc; - int cnt, src; - u_int32_t *rval; +uperf_findbysrc(struct uperf_softc *usc, int cnt, int src, u_int32_t *rval) { struct uperf_src *srcs = usc->usc_srcs; diff --git a/sys/arch/sparc64/dev/uperf_ebus.c b/sys/arch/sparc64/dev/uperf_ebus.c index 0bcd4fdff35..213e6703494 100644 --- a/sys/arch/sparc64/dev/uperf_ebus.c +++ b/sys/arch/sparc64/dev/uperf_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uperf_ebus.c,v 1.8 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: uperf_ebus.c,v 1.9 2022/10/16 01:22:39 jsg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -110,10 +110,7 @@ struct uperf_src uperf_ebus_srcs[] = { { -1, -1, 0 } }; int -uperf_ebus_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +uperf_ebus_match(struct device *parent, void *match, void *aux) { struct ebus_attach_args *ea = aux; @@ -121,9 +118,7 @@ uperf_ebus_match(parent, match, aux) } void -uperf_ebus_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +uperf_ebus_attach(struct device *parent, struct device *self, void *aux) { struct uperf_ebus_softc *sc = (void *)self; struct ebus_attach_args *ea = aux; @@ -170,9 +165,7 @@ uperf_ebus_attach(parent, self, aux) * Read an indirect register. */ u_int32_t -uperf_ebus_read_reg(sc, r) - struct uperf_ebus_softc *sc; - bus_size_t r; +uperf_ebus_read_reg(struct uperf_ebus_softc *sc, bus_size_t r) { u_int32_t v; int s; @@ -211,10 +204,7 @@ uperf_ebus_read_reg(sc, r) * Write an indirect register. */ void -uperf_ebus_write_reg(sc, r, v) - struct uperf_ebus_softc *sc; - bus_size_t r; - u_int32_t v; +uperf_ebus_write_reg(struct uperf_ebus_softc *sc, bus_size_t r, u_int32_t v) { int s; @@ -248,9 +238,7 @@ uperf_ebus_write_reg(sc, r, v) } int -uperf_ebus_clrcnt(vsc, flags) - void *vsc; - int flags; +uperf_ebus_clrcnt(void *vsc, int flags) { struct uperf_ebus_softc *sc = vsc; u_int32_t clr = 0, oldsrc; @@ -267,10 +255,7 @@ uperf_ebus_clrcnt(vsc, flags) } int -uperf_ebus_setcntsrc(vsc, flags, src0, src1) - void *vsc; - int flags; - u_int src0, src1; +uperf_ebus_setcntsrc(void *vsc, int flags, u_int src0, u_int src1) { struct uperf_ebus_softc *sc = vsc; u_int32_t src; @@ -289,10 +274,7 @@ uperf_ebus_setcntsrc(vsc, flags, src0, src1) } int -uperf_ebus_getcntsrc(vsc, flags, srcp0, srcp1) - void *vsc; - int flags; - u_int *srcp0, *srcp1; +uperf_ebus_getcntsrc(void *vsc, int flags, u_int *srcp0, u_int *srcp1) { struct uperf_ebus_softc *sc = vsc; u_int32_t src; @@ -306,10 +288,7 @@ uperf_ebus_getcntsrc(vsc, flags, srcp0, srcp1) } int -uperf_ebus_getcnt(vsc, flags, cntp0, cntp1) - void *vsc; - int flags; - u_int32_t *cntp0, *cntp1; +uperf_ebus_getcnt(void *vsc, int flags, u_int32_t *cntp0, u_int32_t *cntp1) { struct uperf_ebus_softc *sc = vsc; u_int32_t c0, c1; diff --git a/sys/arch/sparc64/fpu/fpu.c b/sys/arch/sparc64/fpu/fpu.c index f4bba76db9b..bdbd1bfd976 100644 --- a/sys/arch/sparc64/fpu/fpu.c +++ b/sys/arch/sparc64/fpu/fpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu.c,v 1.21 2020/08/19 10:10:58 mpi Exp $ */ +/* $OpenBSD: fpu.c,v 1.22 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: fpu.c,v 1.11 2000/12/06 01:47:50 mrg Exp $ */ /* @@ -166,9 +166,7 @@ static int fpu_types[] = { }; void -fpu_fcopy(src, dst, type) - u_int *src, *dst; - int type; +fpu_fcopy(u_int *src, u_int *dst, int type) { *dst++ = *src++; if (type == FTYPE_SNG || type == FTYPE_INT) @@ -187,9 +185,7 @@ fpu_fcopy(src, dst, type) * unknown FPops do enter the queue, however. */ void -fpu_cleanup(p, fs) - register struct proc *p; - register struct fpstate64 *fs; +fpu_cleanup(register struct proc *p, register struct fpstate64 *fs) { register int i, fsr = fs->fs_fsr, error; union instr instr; @@ -287,8 +283,7 @@ out: * 5 in the register offset for long, double, and quad types. */ int -fpu_regoffset(rx, type) - int rx, type; +fpu_regoffset(int rx, int type) { if (type == FTYPE_LNG || type == FTYPE_DBL || type == FTYPE_EXT) { rx |= (rx & 1) << 5; @@ -305,10 +300,7 @@ fpu_regoffset(rx, type) * modified to reflect the setting the hardware would have left. */ int -fpu_execute(p, fe, instr) - struct proc *p; - struct fpemu *fe; - union instr instr; +fpu_execute(struct proc *p, struct fpemu *fe, union instr instr) { struct fpstate *fs; int opf, rdtype, rd, err, mask, cx, fsr; @@ -454,10 +446,7 @@ fpu_execute(p, fe, instr) * Handler for FMOV[SDQ] emulation. */ int -fpu_insn_fmov(fs, fe, instr) - struct fpstate64 *fs; - struct fpemu *fe; - union instr instr; +fpu_insn_fmov(struct fpstate64 *fs, struct fpemu *fe, union instr instr) { int opf = instr.i_opf.i_opf, rs, rd, rtype; @@ -477,10 +466,7 @@ fpu_insn_fmov(fs, fe, instr) * Handler for FABS[SDQ] emulation. */ int -fpu_insn_fabs(fs, fe, instr) - struct fpstate64 *fs; - struct fpemu *fe; - union instr instr; +fpu_insn_fabs(struct fpstate64 *fs, struct fpemu *fe, union instr instr) { int opf = instr.i_opf.i_opf, rs, rd, rtype; @@ -501,10 +487,7 @@ fpu_insn_fabs(fs, fe, instr) * Handler for FNEG[SDQ] emulation. */ int -fpu_insn_fneg(fs, fe, instr) - struct fpstate64 *fs; - struct fpemu *fe; - union instr instr; +fpu_insn_fneg(struct fpstate64 *fs, struct fpemu *fe, union instr instr) { int opf = instr.i_opf.i_opf, rs, rd, rtype; @@ -525,11 +508,8 @@ fpu_insn_fneg(fs, fe, instr) * Handler for F[XI]TO[SDQ] emulation. */ int -fpu_insn_itof(fe, instr, rstype, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - u_int *space; - int rstype, *rdp, *rdtypep; +fpu_insn_itof(struct fpemu *fe, union instr instr, int rstype, int *rdp, + int *rdtypep, u_int *space) { int opf = instr.i_opf.i_opf, rs, rd, rdtype; @@ -555,11 +535,8 @@ fpu_insn_itof(fe, instr, rstype, rdp, rdtypep, space) * Handler for F[SDQ]TO[XI] emulation. */ int -fpu_insn_ftoi(fe, instr, rdp, rdtype, space) - struct fpemu *fe; - union instr instr; - u_int *space; - int *rdp, rdtype; +fpu_insn_ftoi(struct fpemu *fe, union instr instr, int *rdp, int rdtype, + u_int *space) { int opf = instr.i_opf.i_opf, rd, rstype, rs; @@ -581,11 +558,8 @@ fpu_insn_ftoi(fe, instr, rdp, rdtype, space) * Handler for F[SDQ]TO[SDQ] emulation. */ int -fpu_insn_ftof(fe, instr, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - u_int *space; - int *rdp, *rdtypep; +fpu_insn_ftof(struct fpemu *fe, union instr instr, int *rdp, int *rdtypep, + u_int *space) { int opf = instr.i_opf.i_opf, rd, rs, rdtype, rstype; @@ -614,11 +588,8 @@ fpu_insn_ftof(fe, instr, rdp, rdtypep, space) * Handler for FQSRT[SDQ] emulation. */ int -fpu_insn_fsqrt(fe, instr, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - u_int *space; - int *rdp, *rdtypep; +fpu_insn_fsqrt(struct fpemu *fe, union instr instr, int *rdp, int *rdtypep, + u_int *space) { int opf = instr.i_opf.i_opf, rd, rs, rtype; struct fpn *fp; @@ -643,11 +614,8 @@ fpu_insn_fsqrt(fe, instr, rdp, rdtypep, space) * Handler for FCMP{E}[SDQ] emulation. */ int -fpu_insn_fcmp(fs, fe, instr, cmpe) - struct fpstate64 *fs; - struct fpemu *fe; - union instr instr; - int cmpe; +fpu_insn_fcmp(struct fpstate64 *fs, struct fpemu *fe, union instr instr, + int cmpe) { int opf = instr.i_opf.i_opf, rs1, rs2, rtype, cx, fsr; @@ -685,11 +653,8 @@ fpu_insn_fcmp(fs, fe, instr, cmpe) * Handler for FMUL[SDQ] emulation. */ int -fpu_insn_fmul(fe, instr, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - int *rdp, *rdtypep; - u_int *space; +fpu_insn_fmul(struct fpemu *fe, union instr instr, int *rdp, int *rdtypep, + u_int *space) { struct fpn *fp; int opf = instr.i_opf.i_opf, rd, rtype, rs1, rs2; @@ -717,11 +682,8 @@ fpu_insn_fmul(fe, instr, rdp, rdtypep, space) * Handler for FSMULD, FDMULQ emulation. */ int -fpu_insn_fmulx(fe, instr, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - int *rdp, *rdtypep; - u_int *space; +fpu_insn_fmulx(struct fpemu *fe, union instr instr, int *rdp, int *rdtypep, + u_int *space) { struct fpn *fp; int opf = instr.i_opf.i_opf, rd, rdtype, rstype, rs1, rs2; @@ -750,11 +712,8 @@ fpu_insn_fmulx(fe, instr, rdp, rdtypep, space) * Handler for FDIV[SDQ] emulation. */ int -fpu_insn_fdiv(fe, instr, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - int *rdp, *rdtypep; - u_int *space; +fpu_insn_fdiv(struct fpemu *fe, union instr instr, int *rdp, int *rdtypep, + u_int *space) { struct fpn *fp; int opf = instr.i_opf.i_opf, rd, rtype, rs1, rs2; @@ -782,11 +741,8 @@ fpu_insn_fdiv(fe, instr, rdp, rdtypep, space) * Handler for FADD[SDQ] emulation. */ int -fpu_insn_fadd(fe, instr, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - int *rdp, *rdtypep; - u_int *space; +fpu_insn_fadd(struct fpemu *fe, union instr instr, int *rdp, int *rdtypep, + u_int *space) { struct fpn *fp; int opf = instr.i_opf.i_opf, rd, rtype, rs1, rs2; @@ -814,11 +770,8 @@ fpu_insn_fadd(fe, instr, rdp, rdtypep, space) * Handler for FSUB[SDQ] emulation. */ int -fpu_insn_fsub(fe, instr, rdp, rdtypep, space) - struct fpemu *fe; - union instr instr; - int *rdp, *rdtypep; - u_int *space; +fpu_insn_fsub(struct fpemu *fe, union instr instr, int *rdp, int *rdtypep, + u_int *space) { struct fpn *fp; int opf = instr.i_opf.i_opf, rd, rtype, rs1, rs2; @@ -846,10 +799,7 @@ fpu_insn_fsub(fe, instr, rdp, rdtypep, space) * Handler for FMOV[SDQ][cond] emulation. */ int -fpu_insn_fmovcc(p, fs, instr) - struct proc *p; - struct fpstate64 *fs; - union instr instr; +fpu_insn_fmovcc(struct proc *p, struct fpstate64 *fs, union instr instr) { int rtype, rd, rs, cond; @@ -898,10 +848,7 @@ fpu_insn_fmovcc(p, fs, instr) * Handler for FMOVR[icond][SDQ] emulation. */ int -fpu_insn_fmovr(p, fs, instr) - struct proc *p; - struct fpstate64 *fs; - union instr instr; +fpu_insn_fmovr(struct proc *p, struct fpstate64 *fs, union instr instr) { int rtype, rd, rs2, rs1; diff --git a/sys/arch/sparc64/fpu/fpu_add.c b/sys/arch/sparc64/fpu/fpu_add.c index 40c84885374..f53210a45bb 100644 --- a/sys/arch/sparc64/fpu/fpu_add.c +++ b/sys/arch/sparc64/fpu/fpu_add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_add.c,v 1.2 2003/06/02 23:27:55 millert Exp $ */ +/* $OpenBSD: fpu_add.c,v 1.3 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: fpu_add.c,v 1.3 1996/03/14 19:41:52 christos Exp $ */ /* @@ -60,8 +60,7 @@ #include <sparc64/fpu/fpu_extern.h> struct fpn * -fpu_add(fe) - register struct fpemu *fe; +fpu_add(register struct fpemu *fe) { register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2, *r; register u_int r0, r1, r2, r3; diff --git a/sys/arch/sparc64/fpu/fpu_div.c b/sys/arch/sparc64/fpu/fpu_div.c index 9e02cb57e03..e23321ec267 100644 --- a/sys/arch/sparc64/fpu/fpu_div.c +++ b/sys/arch/sparc64/fpu/fpu_div.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_div.c,v 1.3 2013/11/26 20:33:15 deraadt Exp $ */ +/* $OpenBSD: fpu_div.c,v 1.4 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: fpu_div.c,v 1.2 1994/11/20 20:52:38 deraadt Exp $ */ /* @@ -148,8 +148,7 @@ */ struct fpn * -fpu_div(fe) - register struct fpemu *fe; +fpu_div(register struct fpemu *fe) { register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2; register u_int q, bit; diff --git a/sys/arch/sparc64/fpu/fpu_explode.c b/sys/arch/sparc64/fpu/fpu_explode.c index 43da2ae75b4..8a843074ca6 100644 --- a/sys/arch/sparc64/fpu/fpu_explode.c +++ b/sys/arch/sparc64/fpu/fpu_explode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_explode.c,v 1.5 2019/06/26 14:34:03 jca Exp $ */ +/* $OpenBSD: fpu_explode.c,v 1.6 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: fpu_explode.c,v 1.5 2000/08/03 18:32:08 eeh Exp $ */ /* @@ -80,9 +80,7 @@ * int -> fpn. */ int -fpu_itof(fp, i) - register struct fpn *fp; - register u_int i; +fpu_itof(register struct fpn *fp, register u_int i) { if (i == 0) @@ -106,9 +104,7 @@ fpu_itof(fp, i) * 64-bit int -> fpn. */ int -fpu_xtof(fp, i) - register struct fpn *fp; - register u_int64_t i; +fpu_xtof(register struct fpn *fp, register u_int64_t i) { if (i == 0) return (FPC_ZERO); @@ -169,9 +165,7 @@ fpu_xtof(fp, i) * format: i.e., needs at most fp_mant[0] and fp_mant[1]. */ int -fpu_stof(fp, i) - register struct fpn *fp; - register u_int i; +fpu_stof(register struct fpn *fp, register u_int i) { register int exp; register u_int frac, f0, f1; @@ -189,9 +183,7 @@ fpu_stof(fp, i) * We assume this uses at most (96-FP_LG) bits. */ int -fpu_dtof(fp, i, j) - register struct fpn *fp; - register u_int i, j; +fpu_dtof(register struct fpn *fp, register u_int i, register u_int j) { register int exp; register u_int frac, f0, f1, f2; @@ -210,9 +202,8 @@ fpu_dtof(fp, i, j) * 128-bit extended -> fpn. */ int -fpu_qtof(fp, i, j, k, l) - register struct fpn *fp; - register u_int i, j, k, l; +fpu_qtof(register struct fpn *fp, register u_int i, register u_int j, + register u_int k, register u_int l) { register int exp; register u_int frac, f0, f1, f2, f3; @@ -238,10 +229,8 @@ fpu_qtof(fp, i, j, k, l) * operations are performed.) */ void -fpu_explode(fe, fp, type, reg) - register struct fpemu *fe; - register struct fpn *fp; - int type, reg; +fpu_explode(register struct fpemu *fe, register struct fpn *fp, int type, + int reg) { register u_int s, *space; u_int64_t l, *xspace; diff --git a/sys/arch/sparc64/fpu/fpu_implode.c b/sys/arch/sparc64/fpu/fpu_implode.c index a3a05bca4db..6492c6667e2 100644 --- a/sys/arch/sparc64/fpu/fpu_implode.c +++ b/sys/arch/sparc64/fpu/fpu_implode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_implode.c,v 1.8 2010/05/09 19:55:43 kettenis Exp $ */ +/* $OpenBSD: fpu_implode.c,v 1.9 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: fpu_implode.c,v 1.7 2000/08/03 18:32:08 eeh Exp $ */ /* @@ -188,9 +188,7 @@ toinf(struct fpemu *fe, int sign) * of the SPARC instruction set). */ u_int -fpu_ftoi(fe, fp) - struct fpemu *fe; - register struct fpn *fp; +fpu_ftoi(struct fpemu *fe, register struct fpn *fp) { register u_int i; register int sign, exp; @@ -237,10 +235,7 @@ fpu_ftoi(fe, fp) * of the SPARC instruction set). */ u_int -fpu_ftox(fe, fp, res) - struct fpemu *fe; - register struct fpn *fp; - u_int *res; +fpu_ftox(struct fpemu *fe, register struct fpn *fp, u_int *res) { register u_int64_t i; register int sign, exp; @@ -291,9 +286,7 @@ out: * We assume <= 29 bits in a single-precision fraction (1.f part). */ u_int -fpu_ftos(fe, fp) - struct fpemu *fe; - register struct fpn *fp; +fpu_ftos(struct fpemu *fe, register struct fpn *fp) { register u_int sign = fp->fp_sign << 31; register int exp; @@ -375,10 +368,7 @@ done: * This code mimics fpu_ftos; see it for comments. */ u_int -fpu_ftod(fe, fp, res) - struct fpemu *fe; - register struct fpn *fp; - u_int *res; +fpu_ftod(struct fpemu *fe, register struct fpn *fp, u_int *res) { register u_int sign = fp->fp_sign << 31; register int exp; @@ -436,10 +426,7 @@ done: * so we can avoid a small bit of work. */ u_int -fpu_ftoq(fe, fp, res) - struct fpemu *fe; - register struct fpn *fp; - u_int *res; +fpu_ftoq(struct fpemu *fe, register struct fpn *fp, u_int *res) { register u_int sign = fp->fp_sign << 31; register int exp; @@ -496,11 +483,8 @@ done: * Implode an fpn, writing the result into the given space. */ void -fpu_implode(fe, fp, type, space) - struct fpemu *fe; - register struct fpn *fp; - int type; - register u_int *space; +fpu_implode(struct fpemu *fe, register struct fpn *fp, int type, + register u_int *space) { DPRINTF(FPE_INSN, ("fpu_implode: ")); switch (type) { diff --git a/sys/arch/sparc64/fpu/fpu_mul.c b/sys/arch/sparc64/fpu/fpu_mul.c index 38d16166030..1ea859df52f 100644 --- a/sys/arch/sparc64/fpu/fpu_mul.c +++ b/sys/arch/sparc64/fpu/fpu_mul.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_mul.c,v 1.2 2003/06/02 23:27:55 millert Exp $ */ +/* $OpenBSD: fpu_mul.c,v 1.3 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: fpu_mul.c,v 1.2 1994/11/20 20:52:44 deraadt Exp $ */ /* @@ -97,8 +97,7 @@ * until we reach a nonzero word. */ struct fpn * -fpu_mul(fe) - register struct fpemu *fe; +fpu_mul(register struct fpemu *fe) { register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2; register u_int a3, a2, a1, a0, x3, x2, x1, x0, bit, m; diff --git a/sys/arch/sparc64/fpu/fpu_sqrt.c b/sys/arch/sparc64/fpu/fpu_sqrt.c index bbf1fbf1d65..33df951b007 100644 --- a/sys/arch/sparc64/fpu/fpu_sqrt.c +++ b/sys/arch/sparc64/fpu/fpu_sqrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_sqrt.c,v 1.5 2021/03/11 11:17:00 jsg Exp $ */ +/* $OpenBSD: fpu_sqrt.c,v 1.6 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: fpu_sqrt.c,v 1.2 1994/11/20 20:52:46 deraadt Exp $ */ /* @@ -184,8 +184,7 @@ * this, so we have some justification in assuming it. */ struct fpn * -fpu_sqrt(fe) - struct fpemu *fe; +fpu_sqrt(struct fpemu *fe) { register struct fpn *x = &fe->fe_f1; register u_int bit, q, tt; diff --git a/sys/arch/sparc64/include/bus.h b/sys/arch/sparc64/include/bus.h index 3f990d6572f..ec4f81462be 100644 --- a/sys/arch/sparc64/include/bus.h +++ b/sys/arch/sparc64/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.35 2022/01/04 20:41:44 deraadt Exp $ */ +/* $OpenBSD: bus.h,v 1.36 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: bus.h,v 1.31 2001/09/21 15:30:41 wiz Exp $ */ /*- @@ -327,12 +327,8 @@ void bus_space_render_tag(bus_space_tag_t, char*, size_t); #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ static inline void -bus_space_barrier(t, h, o, s, f) - bus_space_tag_t t; - bus_space_handle_t h; - bus_size_t o; - bus_size_t s; - int f; +bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, + bus_size_t s, int f) { #ifdef notyet switch (f) { diff --git a/sys/arch/sparc64/sparc64/cache.c b/sys/arch/sparc64/sparc64/cache.c index faaadd56547..cbcb65eb121 100644 --- a/sys/arch/sparc64/sparc64/cache.c +++ b/sys/arch/sparc64/sparc64/cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cache.c,v 1.4 2016/03/07 13:21:51 naddy Exp $ */ +/* $OpenBSD: cache.c,v 1.5 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: cache.c,v 1.5 2000/12/06 01:47:50 mrg Exp $ */ /* @@ -94,8 +94,7 @@ cache_enable(void) * To get the E$ we read to each cache line. */ int -cache_flush_page(pa) - paddr_t pa; +cache_flush_page(paddr_t pa) { register int i, j, ls; register char *p; @@ -138,9 +137,7 @@ cache_flush_page(pa) #define CACHE_FLUSH_MAGIC (cacheinfo.ec_totalsize / NBPG) int -cache_flush(base, len) - vaddr_t base; - size_t len; +cache_flush(vaddr_t base, size_t len) { int i, j, ls; vaddr_t baseoff; diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index 39899fb32f0..32de92bb1bd 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.58 2022/04/14 19:47:12 naddy Exp $ */ +/* $OpenBSD: db_interface.c,v 1.59 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */ /* @@ -237,8 +237,7 @@ void db_ddbproc_cmd(db_expr_t, int, db_expr_t, char *); * Received keyboard interrupt sequence. */ void -kdb_kbd_trap(tf) - struct trapframe64 *tf; +kdb_kbd_trap(struct trapframe64 *tf) { if (db_active == 0 /* && (boothowto & RB_KDB) */) { printf("\n\nkernel: keyboard interrupt tf=%p\n", tf); @@ -250,9 +249,7 @@ kdb_kbd_trap(tf) * db_ktrap - field a TRACE or BPT trap */ int -db_ktrap(type, tf) - int type; - register struct trapframe64 *tf; +db_ktrap(int type, register struct trapframe64 *tf) { int s, tl; struct trapstate *ts = &ddb_regs.ddb_ts[0]; @@ -573,11 +570,7 @@ db_enter(void) } void -db_prom_cmd(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_prom_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { OF_enter(); } @@ -638,11 +631,7 @@ void db_print_itlb_entry(int entry, int i, int endc) } void -db_dump_dtlb(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_dump_dtlb(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { /* extern void print_dtlb(void); -- locore.s; no longer used here */ @@ -681,11 +670,7 @@ printf ("Usage: mach dtlb 0,2\n"); } void -db_dump_itlb(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_dump_itlb(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { int i; if (!have_addr) { @@ -712,11 +697,7 @@ db_dump_itlb(addr, have_addr, count, modif) } void -db_pload_cmd(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_pload_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { static paddr_t oldaddr = -1; int asi = ASI_PHYS_CACHED; @@ -751,8 +732,7 @@ db_pload_cmd(addr, have_addr, count, modif) int64_t pseg_get(struct pmap *, vaddr_t); void -db_dump_pmap(pm) -struct pmap* pm; +db_dump_pmap(struct pmap* pm) { /* print all valid pages in the kernel pmap */ long i, j, k, n; @@ -787,11 +767,7 @@ struct pmap* pm; } void -db_pmap_kernel(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_pmap_kernel(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { extern struct pmap kernel_pmap_; int i, j, full = 0; @@ -833,11 +809,7 @@ db_pmap_kernel(addr, have_addr, count, modif) void -db_pmap_cmd(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_pmap_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { struct pmap* pm=NULL; int i, j=0, full = 0; @@ -872,11 +844,7 @@ db_pmap_cmd(addr, have_addr, count, modif) void -db_lock(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_lock(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { #if 0 struct lock *l; @@ -898,11 +866,7 @@ db_lock(addr, have_addr, count, modif) } void -db_dump_dtsb(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_dump_dtsb(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { extern pte_t *tsb_dmmu; extern int tsbsize; @@ -925,11 +889,7 @@ db_dump_dtsb(addr, have_addr, count, modif) void db_page_cmd(db_expr_t, int, db_expr_t, char *); void -db_page_cmd(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_page_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { if (!have_addr) { @@ -943,11 +903,7 @@ db_page_cmd(addr, have_addr, count, modif) void -db_proc_cmd(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_proc_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { struct proc *p; @@ -975,11 +931,7 @@ db_proc_cmd(addr, have_addr, count, modif) } void -db_ctx_cmd(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_ctx_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { struct proc *p; @@ -1000,11 +952,7 @@ db_ctx_cmd(addr, have_addr, count, modif) } void -db_dump_pcb(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_dump_pcb(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { struct pcb *pcb; int i; @@ -1046,11 +994,7 @@ db_dump_pcb(addr, have_addr, count, modif) void -db_setpcb(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_setpcb(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { struct proc *p; @@ -1079,11 +1023,7 @@ db_setpcb(addr, have_addr, count, modif) * Use physical or virtual watchpoint registers -- ugh */ void -db_watch(addr, have_addr, count, modif) - db_expr_t addr; - int have_addr; - db_expr_t count; - char *modif; +db_watch(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { int phys = 0; diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 2c7e3cd406e..f8c896c7043 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.200 2021/10/06 15:46:03 claudio Exp $ */ +/* $OpenBSD: machdep.c,v 1.201 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -262,11 +262,8 @@ cpu_startup(void) /* ARGSUSED */ void -setregs(p, pack, stack, retval) - struct proc *p; - struct exec_package *pack; - vaddr_t stack; - register_t *retval; +setregs(struct proc *p, struct exec_package *pack, vaddr_t stack, + register_t *retval) { struct trapframe64 *tf = p->p_md.md_tf; int64_t tstate; @@ -715,8 +712,7 @@ dumpconf(void) static vaddr_t dumpspace; caddr_t -reserve_dumppages(p) - caddr_t p; +reserve_dumppages(caddr_t p) { dumpspace = (vaddr_t)p; @@ -841,8 +837,7 @@ void trapdump(struct trapframe64*); * dump out a trapframe. */ void -trapdump(tf) - struct trapframe64* tf; +trapdump(struct trapframe64* tf) { printf("TRAPFRAME: tstate=%llx pc=%llx npc=%llx y=%x\n", (unsigned long long)tf->tf_tstate, (unsigned long long)tf->tf_pc, @@ -911,14 +906,9 @@ stackdump(void) * DMA map creation functions. */ int -_bus_dmamap_create(t, t0, size, nsegments, maxsegsz, boundary, flags, dmamp) - bus_dma_tag_t t, t0; - bus_size_t size; - int nsegments; - bus_size_t maxsegsz; - bus_size_t boundary; - int flags; - bus_dmamap_t *dmamp; +_bus_dmamap_create(bus_dma_tag_t t, bus_dma_tag_t t0, bus_size_t size, + int nsegments, bus_size_t maxsegsz, bus_size_t boundary, int flags, + bus_dmamap_t *dmamp) { struct sparc_bus_dmamap *map; void *mapstore; @@ -961,10 +951,7 @@ _bus_dmamap_create(t, t0, size, nsegments, maxsegsz, boundary, flags, dmamp) * DMA map destruction functions. */ void -_bus_dmamap_destroy(t, t0, map) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - +_bus_dmamap_destroy(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map) { /* * Unload the map if it is still loaded. This is required @@ -991,13 +978,8 @@ _bus_dmamap_destroy(t, t0, map) * bypass DVMA. */ int -_bus_dmamap_load(t, t0, map, buf, buflen, p, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - void *buf; - bus_size_t buflen; - struct proc *p; - int flags; +_bus_dmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, void *buf, + bus_size_t buflen, struct proc *p, int flags) { bus_addr_t lastaddr; int seg, error; @@ -1025,11 +1007,8 @@ _bus_dmamap_load(t, t0, map, buf, buflen, p, flags) * Like _bus_dmamap_load(), but for mbufs. */ int -_bus_dmamap_load_mbuf(t, t0, map, m, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - struct mbuf *m; - int flags; +_bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + struct mbuf *m, int flags) { bus_dma_segment_t segs[MAX_DMA_SEGS]; int i; @@ -1105,11 +1084,8 @@ _bus_dmamap_load_mbuf(t, t0, map, m, flags) * Like _bus_dmamap_load(), but for uios. */ int -_bus_dmamap_load_uio(t, t0, map, uio, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - struct uio *uio; - int flags; +_bus_dmamap_load_uio(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + struct uio *uio, int flags) { /* * XXXXXXX The problem with this routine is that it needs to @@ -1184,13 +1160,8 @@ _bus_dmamap_load_uio(t, t0, map, uio, flags) * bus_dmamem_alloc(). */ int -_bus_dmamap_load_raw(t, t0, map, segs, nsegs, size, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - bus_dma_segment_t *segs; - int nsegs; - bus_size_t size; - int flags; +_bus_dmamap_load_raw(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + bus_dma_segment_t *segs, int nsegs, bus_size_t size, int flags) { panic("_bus_dmamap_load_raw: not implemented"); @@ -1282,9 +1253,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf, * bus-specific DMA map unload functions. */ void -_bus_dmamap_unload(t, t0, map) - bus_dma_tag_t t, t0; - bus_dmamap_t map; +_bus_dmamap_unload(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map) { /* Mark the mappings as invalid. */ map->dm_mapsize = 0; @@ -1297,12 +1266,8 @@ _bus_dmamap_unload(t, t0, map) * by bus-specific DMA map synchronization functions. */ void -_bus_dmamap_sync(t, t0, map, offset, len, ops) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - bus_addr_t offset; - bus_size_t len; - int ops; +_bus_dmamap_sync(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + bus_addr_t offset, bus_size_t len, int ops) { if (ops & (BUS_DMASYNC_PREWRITE | BUS_DMASYNC_POSTREAD)) __membar("#MemIssue"); @@ -1313,13 +1278,9 @@ _bus_dmamap_sync(t, t0, map, offset, len, ops) * by bus-specific DMA memory allocation functions. */ int -_bus_dmamem_alloc(t, t0, size, alignment, boundary, segs, nsegs, rsegs, flags) - bus_dma_tag_t t, t0; - bus_size_t size, alignment, boundary; - bus_dma_segment_t *segs; - int nsegs; - int *rsegs; - int flags; +_bus_dmamem_alloc(bus_dma_tag_t t, bus_dma_tag_t t0, bus_size_t size, + bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs, + int nsegs, int *rsegs, int flags) { struct pglist *mlist; int error, plaflag; @@ -1380,10 +1341,8 @@ _bus_dmamem_alloc(t, t0, size, alignment, boundary, segs, nsegs, rsegs, flags) * bus-specific DMA memory free functions. */ void -_bus_dmamem_free(t, t0, segs, nsegs) - bus_dma_tag_t t, t0; - bus_dma_segment_t *segs; - int nsegs; +_bus_dmamem_free(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dma_segment_t *segs, + int nsegs) { #ifdef DIAGNOSTIC @@ -1403,13 +1362,8 @@ _bus_dmamem_free(t, t0, segs, nsegs) * bus-specific DMA memory map functions. */ int -_bus_dmamem_map(t, t0, segs, nsegs, size, kvap, flags) - bus_dma_tag_t t, t0; - bus_dma_segment_t *segs; - int nsegs; - size_t size; - caddr_t *kvap; - int flags; +_bus_dmamem_map(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dma_segment_t *segs, + int nsegs, size_t size, caddr_t *kvap, int flags) { const struct kmem_dyn_mode *kd; struct vm_page *m; @@ -1466,10 +1420,7 @@ _bus_dmamem_map(t, t0, segs, nsegs, size, kvap, flags) * bus-specific DMA memory unmapping functions. */ void -_bus_dmamem_unmap(t, t0, kva, size) - bus_dma_tag_t t, t0; - caddr_t kva; - size_t size; +_bus_dmamem_unmap(bus_dma_tag_t t, bus_dma_tag_t t0, caddr_t kva, size_t size) { #ifdef DIAGNOSTIC @@ -1485,12 +1436,8 @@ _bus_dmamem_unmap(t, t0, kva, size) * bus-specific DMA mmap(2)'ing functions. */ paddr_t -_bus_dmamem_mmap(t, t0, segs, nsegs, off, prot, flags) - bus_dma_tag_t t, t0; - bus_dma_segment_t *segs; - int nsegs; - off_t off; - int prot, flags; +_bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dma_segment_t *segs, + int nsegs, off_t off, int prot, int flags) { int i; diff --git a/sys/arch/sparc64/sparc64/ofw_machdep.c b/sys/arch/sparc64/sparc64/ofw_machdep.c index d4ef99a829e..8d28904dab1 100644 --- a/sys/arch/sparc64/sparc64/ofw_machdep.c +++ b/sys/arch/sparc64/sparc64/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.34 2018/08/28 00:00:42 dlg Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.35 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.16 2001/07/20 00:07:14 eeh Exp $ */ /* @@ -105,9 +105,7 @@ get_memory_handle(void) * Point prom to our trap table. This stops the prom from mapping us. */ int -prom_set_trap_table(tba, mmfsa) - vaddr_t tba; - paddr_t mmfsa; +prom_set_trap_table(vaddr_t tba, paddr_t mmfsa) { struct { cell_t name; @@ -134,8 +132,7 @@ prom_set_trap_table(tba, mmfsa) * Only works while the prom is actively mapping us. */ paddr_t -prom_vtop(vaddr) - vaddr_t vaddr; +prom_vtop(vaddr_t vaddr) { struct { cell_t name; @@ -186,9 +183,7 @@ prom_vtop(vaddr) * Only works while the prom is actively mapping us. */ vaddr_t -prom_claim_virt(vaddr, len) - vaddr_t vaddr; - int len; +prom_claim_virt(vaddr_t vaddr, int len) { struct { cell_t name; @@ -226,9 +221,7 @@ prom_claim_virt(vaddr, len) * Only works while the prom is actively mapping us. */ vaddr_t -prom_alloc_virt(len, align) - int len; - int align; +prom_alloc_virt(int len, int align) { struct { cell_t name; @@ -264,9 +257,7 @@ prom_alloc_virt(len, align) * Only works while the prom is actively mapping us. */ int -prom_free_virt(vaddr, len) - vaddr_t vaddr; - int len; +prom_free_virt(vaddr_t vaddr, int len) { struct { cell_t name; @@ -299,9 +290,7 @@ prom_free_virt(vaddr, len) * Only works while the prom is actively mapping us. */ int -prom_unmap_virt(vaddr, len) - vaddr_t vaddr; - int len; +prom_unmap_virt(vaddr_t vaddr, int len) { struct { cell_t name; @@ -333,11 +322,7 @@ prom_unmap_virt(vaddr, len) * Only works while the prom is actively mapping us. */ int -prom_map_phys(paddr, size, vaddr, mode) - paddr_t paddr; - off_t size; - vaddr_t vaddr; - int mode; +prom_map_phys(paddr_t paddr, off_t size, vaddr_t vaddr, int mode) { struct { cell_t name; @@ -383,9 +368,7 @@ prom_map_phys(paddr, size, vaddr, mode) * Only works while the prom is actively mapping us. */ paddr_t -prom_alloc_phys(len, align) - int len; - int align; +prom_alloc_phys(int len, int align) { struct { cell_t name; @@ -422,9 +405,7 @@ prom_alloc_phys(len, align) * Only works while the prom is actively mapping us. */ paddr_t -prom_claim_phys(phys, len) - paddr_t phys; - int len; +prom_claim_phys(paddr_t phys, int len) { struct { cell_t name; @@ -465,9 +446,7 @@ prom_claim_phys(phys, len) * Only works while the prom is actively mapping us. */ int -prom_free_phys(phys, len) - paddr_t phys; - int len; +prom_free_phys(paddr_t phys, int len) { struct { cell_t name; @@ -501,9 +480,7 @@ prom_free_phys(phys, len) * Only works while the prom is actively mapping us. */ paddr_t -prom_get_msgbuf(len, align) - int len; - int align; +prom_get_msgbuf(int len, int align) { struct { cell_t name; diff --git a/sys/arch/sparc64/sparc64/openfirm.c b/sys/arch/sparc64/sparc64/openfirm.c index d9e97bf1eaf..f5dcd4d6b66 100644 --- a/sys/arch/sparc64/sparc64/openfirm.c +++ b/sys/arch/sparc64/sparc64/openfirm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openfirm.c,v 1.21 2017/08/10 19:39:38 mpi Exp $ */ +/* $OpenBSD: openfirm.c,v 1.22 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: openfirm.c,v 1.13 2001/06/21 00:08:02 eeh Exp $ */ /* @@ -41,8 +41,7 @@ #define min(x,y) ((x<y)?(x):(y)) int -OF_peer(phandle) - int phandle; +OF_peer(int phandle) { struct { cell_t name; @@ -62,8 +61,7 @@ OF_peer(phandle) } int -OF_child(phandle) - int phandle; +OF_child(int phandle) { struct { cell_t name; @@ -83,8 +81,7 @@ OF_child(phandle) } int -OF_parent(phandle) - int phandle; +OF_parent(int phandle) { struct { cell_t name; @@ -104,8 +101,7 @@ OF_parent(phandle) } int -OF_instance_to_package(ihandle) - int ihandle; +OF_instance_to_package(int ihandle) { static struct { cell_t name; @@ -126,9 +122,7 @@ OF_instance_to_package(ihandle) /* Should really return a `long' */ int -OF_getproplen(handle, prop) - int handle; - char *prop; +OF_getproplen(int handle, char *prop) { struct { cell_t name; @@ -150,11 +144,7 @@ OF_getproplen(handle, prop) } int -OF_getprop(handle, prop, buf, buflen) - int handle; - char *prop; - void *buf; - int buflen; +OF_getprop(int handle, char *prop, void *buf, int buflen) { struct { cell_t name; @@ -182,11 +172,7 @@ OF_getprop(handle, prop, buf, buflen) } int -OF_setprop(handle, prop, buf, buflen) - int handle; - char *prop; - const void *buf; - int buflen; +OF_setprop(int handle, char *prop, const void *buf, int buflen) { struct { cell_t name; @@ -214,10 +200,7 @@ OF_setprop(handle, prop, buf, buflen) } int -OF_nextprop(handle, prop, buf) - int handle; - char *prop; - void *buf; +OF_nextprop(int handle, char *prop, void *buf) { struct { cell_t name; @@ -241,8 +224,7 @@ OF_nextprop(handle, prop, buf) } int -OF_finddevice(name) -char *name; +OF_finddevice(char *name) { struct { cell_t name; @@ -262,10 +244,7 @@ char *name; } int -OF_instance_to_path(ihandle, buf, buflen) - int ihandle; - char *buf; - int buflen; +OF_instance_to_path(int ihandle, char *buf, int buflen) { struct { cell_t name; @@ -291,10 +270,7 @@ OF_instance_to_path(ihandle, buf, buflen) } int -OF_package_to_path(phandle, buf, buflen) - int phandle; - char *buf; - int buflen; +OF_package_to_path(int phandle, char *buf, int buflen) { struct { cell_t name; @@ -393,8 +369,7 @@ OF_call_method_1(char *method, int ihandle, int nargs, ...) } int -OF_open(dname) - char *dname; +OF_open(char *dname) { struct { cell_t name; @@ -417,8 +392,7 @@ OF_open(dname) } void -OF_close(handle) - int handle; +OF_close(int handle) { struct { cell_t name; @@ -435,8 +409,7 @@ OF_close(handle) } int -OF_test(service) - char *service; +OF_test(char *service) { struct { cell_t name; @@ -456,9 +429,7 @@ OF_test(service) } int -OF_test_method(service, method) - int service; - char *method; +OF_test_method(int service, char *method) { struct { cell_t name; @@ -484,10 +455,7 @@ OF_test_method(service, method) * This assumes that character devices don't read in multiples of NBPG. */ int -OF_read(handle, addr, len) - int handle; - void *addr; - int len; +OF_read(int handle, void *addr, int len) { struct { cell_t name; @@ -526,10 +494,7 @@ OF_read(handle, addr, len) void prom_printf(const char *fmt, ...); /* XXX for below */ int -OF_write(handle, addr, len) - int handle; - void *addr; - int len; +OF_write(int handle, void *addr, int len) { struct { cell_t name; @@ -563,9 +528,7 @@ OF_write(handle, addr, len) int -OF_seek(handle, pos) - int handle; - u_quad_t pos; +OF_seek(int handle, u_quad_t pos) { struct { cell_t name; @@ -589,8 +552,7 @@ OF_seek(handle, pos) } void -OF_boot(bootspec) - char *bootspec; +OF_boot(char *bootspec) { struct { cell_t name; @@ -657,8 +619,7 @@ OF_poweroff(void) } void -(*OF_set_callback(newfunc))(void *) - void (*newfunc)(void *); +(*OF_set_callback(void (*newfunc)(void *)))(void *) { struct { cell_t name; @@ -678,9 +639,7 @@ void } void -OF_set_symbol_lookup(s2v, v2s) - void (*s2v)(void *); - void (*v2s)(void *); +OF_set_symbol_lookup(void (*s2v)(void *), void (*v2s)(void *)) { struct { cell_t name; @@ -755,8 +714,8 @@ OF_milliseconds(void) int obp_symbol_debug = 0; -void OF_sym2val(cells) - void *cells; +void +OF_sym2val(void *cells) { struct args { cell_t service; @@ -791,8 +750,8 @@ void OF_sym2val(cells) args->value = ADR2CELL(value); } -void OF_val2sym(cells) - void *cells; +void +OF_val2sym(void *cells) { struct args { cell_t service; diff --git a/sys/arch/sparc64/sparc64/openprom.c b/sys/arch/sparc64/sparc64/openprom.c index de9aa715f25..7ac112dd6bc 100644 --- a/sys/arch/sparc64/sparc64/openprom.c +++ b/sys/arch/sparc64/sparc64/openprom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openprom.c,v 1.22 2019/10/20 16:27:19 kettenis Exp $ */ +/* $OpenBSD: openprom.c,v 1.23 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: openprom.c,v 1.4 2002/01/10 06:21:53 briggs Exp $ */ /* @@ -69,20 +69,14 @@ static int openpromcheckid(int, int); static int openpromgetstr(int, char *, char **); int -openpromopen(dev, flags, mode, p) - dev_t dev; - int flags, mode; - struct proc *p; +openpromopen(dev_t dev, int flags, int mode, struct proc *p) { return (0); } int -openpromclose(dev, flags, mode, p) - dev_t dev; - int flags, mode; - struct proc *p; +openpromclose(dev_t dev, int flags, int mode, struct proc *p) { return (0); @@ -142,8 +136,7 @@ openpromread(dev_t dev, struct uio *uio, int flags) * listed from node ID sid forward. */ static int -openpromcheckid(sid, tid) - int sid, tid; +openpromcheckid(int sid, int tid) { for (; sid != 0; sid = OF_peer(sid)) if (sid == tid || openpromcheckid(OF_child(sid), tid)) @@ -153,9 +146,7 @@ openpromcheckid(sid, tid) } static int -openpromgetstr(len, user, cpp) - int len; - char *user, **cpp; +openpromgetstr(int len, char *user, char **cpp) { int error; char *cp; @@ -171,12 +162,7 @@ openpromgetstr(len, user, cpp) } int -openpromioctl(dev, cmd, data, flags, p) - dev_t dev; - u_long cmd; - caddr_t data; - int flags; - struct proc *p; +openpromioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { struct opiocdesc *op; int node, len, ok, error, s; diff --git a/sys/arch/sparc64/sparc64/process_machdep.c b/sys/arch/sparc64/sparc64/process_machdep.c index fb403b4513c..59424e8bfe9 100644 --- a/sys/arch/sparc64/sparc64/process_machdep.c +++ b/sys/arch/sparc64/sparc64/process_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process_machdep.c,v 1.12 2009/03/05 19:52:23 kettenis Exp $ */ +/* $OpenBSD: process_machdep.c,v 1.13 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: process_machdep.c,v 1.10 2000/09/26 22:05:50 eeh Exp $ */ /* @@ -76,9 +76,7 @@ #endif /* Unfortunately we need to convert v9 trapframe to v8 regs */ int -process_read_regs(p, regs) - struct proc *p; - struct reg *regs; +process_read_regs(struct proc *p, struct reg *regs) { struct trapframe64* tf = p->p_md.md_tf; struct reg32* regp = (struct reg32*)regs; @@ -113,9 +111,7 @@ process_read_regs(p, regs) } int -process_read_fpregs(p, regs) - struct proc *p; - struct fpreg *regs; +process_read_fpregs(struct proc *p, struct fpreg *regs) { extern struct fpstate64 initfpstate; struct fpstate64 *statep = &initfpstate; @@ -143,9 +139,7 @@ process_read_fpregs(p, regs) #ifdef PTRACE int -process_write_regs(p, regs) - struct proc *p; - struct reg *regs; +process_write_regs(struct proc *p, struct reg *regs) { struct trapframe64* tf = p->p_md.md_tf; struct reg32* regp = (struct reg32*)regs; @@ -182,9 +176,7 @@ process_write_regs(p, regs) #ifdef PT_STEP int -process_sstep(p, sstep) - struct proc *p; - int sstep; +process_sstep(struct proc *p, int sstep) { if (sstep) return EINVAL; @@ -193,9 +185,7 @@ process_sstep(p, sstep) #endif 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_tf->tf_pc = (vaddr_t)addr; p->p_md.md_tf->tf_npc = (vaddr_t)addr + 4; @@ -203,9 +193,7 @@ process_set_pc(p, addr) } int -process_write_fpregs(p, regs) - struct proc *p; - struct fpreg *regs; +process_write_fpregs(struct proc *p, struct fpreg *regs) { struct fpreg32 *regp = (struct fpreg32 *)regs; int i; diff --git a/sys/arch/sparc64/sparc64/sys_machdep.c b/sys/arch/sparc64/sparc64/sys_machdep.c index 70ba74e8ad6..490f702d7b7 100644 --- a/sys/arch/sparc64/sparc64/sys_machdep.c +++ b/sys/arch/sparc64/sparc64/sys_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_machdep.c,v 1.4 2017/12/30 20:46:59 guenther Exp $ */ +/* $OpenBSD: sys_machdep.c,v 1.5 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: sys_machdep.c,v 1.3 2000/12/13 18:13:11 jdolecek Exp $ */ /* @@ -54,10 +54,7 @@ #include <sys/syscallargs.h> int -sys_sysarch(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_sysarch(struct proc *p, void *v, register_t *retval) { struct sys_sysarch_args /* { syscallarg(int) op; |