-/* $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 $ */
/*
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;
}
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;
}
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;
}
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;
}
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;
-/* $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)
}
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;
-/* $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)
#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;
}
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;
#if NPCKBD > 0
void
-beeper_stop(vsc)
- void *vsc;
+beeper_stop(void *vsc)
{
struct beeper_softc *sc = vsc;
int s;
}
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;
-/* $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)
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;
}
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;
-/* $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)
};
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;
}
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;
}
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;
#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;
}
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;
}
void
-creator_ras_wait(sc)
- struct creator_softc *sc;
+creator_ras_wait(struct creator_softc *sc)
{
u_int32_t ucsr, r;
}
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,
}
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;
}
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;
}
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);
}
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;
}
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)
-/* $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).
};
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;
}
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;
-/* $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).
};
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;
}
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;
-/* $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 $ */
/*
};
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;
}
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;
-/* $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 $ */
/*
*/
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 */
}
}
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;
}
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)
* 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;
}
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;
}
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));
}
}
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));
-/* $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)
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;
}
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;
}
int
-pckbc_ebus_is_console(sc)
- struct pckbc_ebus_softc *sc;
+pckbc_ebus_is_console(struct pckbc_ebus_softc *sc)
{
char *name;
int node;
-/* $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 $ */
/*-
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;
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
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);
}
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;
}
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;
}
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;
}
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;
}
struct tty *
-pconstty(dev)
- dev_t dev;
+pconstty(dev_t dev)
{
struct pconssoftc *sc = pcons_cd.cd_devs[minor(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;
}
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;
}
void
-pcons_poll(aux)
- void *aux;
+pcons_poll(void *aux)
{
struct pconssoftc *sc = aux;
struct tty *tp = sc->of_tty;
}
void
-pcons_cnpollc(dev, on)
- dev_t dev;
- int on;
+pcons_cnpollc(dev_t dev, int on)
{
struct pconssoftc *sc = NULL;
-/* $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)
};
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;
}
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;
-/* $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 $ */
/*
* 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;
-/* $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)
};
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;
}
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;
}
int
-sab_print(args, name)
- void *args;
- const char *name;
+sab_print(void *args, const char *name)
{
struct sabtty_attach_args *sa = args;
}
int
-sab_intr(vsc)
- void *vsc;
+sab_intr(void *vsc)
{
struct sab_softc *sc = vsc;
int r = 0, needsoft = 0;
}
void
-sab_softintr(vsc)
- void *vsc;
+sab_softintr(void *vsc)
{
struct sab_softc *sc = 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;
}
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;
}
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;
}
void
-sabtty_softintr(sc)
- struct sabtty_softc *sc;
+sabtty_softintr(struct sabtty_softc *sc)
{
struct tty *tp = sc->sc_tty;
int s, flags;
}
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;
}
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)];
}
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)];
}
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)];
}
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)];
}
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)];
}
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)];
}
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;
}
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;
}
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)];
}
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)];
}
void
-sabtty_reset(sc)
- struct sabtty_softc *sc;
+sabtty_reset(struct sabtty_softc *sc)
{
/* power down */
SAB_WRITE(sc, SAB_CCR0, 0);
}
void
-sabtty_flush(sc)
- struct sabtty_softc *sc;
+sabtty_flush(struct sabtty_softc *sc)
{
/* clear rx fifo */
sabtty_cec_wait(sc);
}
int
-sabtty_speed(rate)
- int rate;
+sabtty_speed(int rate)
{
int i, len, r;
}
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);
}
int
-sabtty_cngetc(sc)
- struct sabtty_softc *sc;
+sabtty_cngetc(struct sabtty_softc *sc)
{
u_int8_t r, len, ipc;
}
void
-sabtty_cnpollc(sc, on)
- struct sabtty_softc *sc;
- int on;
+sabtty_cnpollc(struct sabtty_softc *sc, int on)
{
u_int8_t r;
}
void
-sab_cnputc(dev, c)
- dev_t dev;
- int c;
+sab_cnputc(dev_t dev, int c)
{
struct sabtty_softc *sc = sabtty_cons_output;
}
void
-sab_cnpollc(dev, on)
- dev_t dev;
- int on;
+sab_cnpollc(dev_t dev, int on)
{
struct sabtty_softc *sc = sabtty_cons_input;
}
int
-sab_cngetc(dev)
- dev_t dev;
+sab_cngetc(dev_t dev)
{
struct sabtty_softc *sc = sabtty_cons_input;
}
void
-sabtty_console_flags(sc)
- struct sabtty_softc *sc;
+sabtty_console_flags(struct sabtty_softc *sc)
{
int node, channel, options, cookie;
char buf[255];
}
void
-sabtty_console_speed(sc)
- struct sabtty_softc *sc;
+sabtty_console_speed(struct sabtty_softc *sc)
{
char *name;
int node, channel, options;
}
void
-sabtty_abort(sc)
- struct sabtty_softc *sc;
+sabtty_abort(struct sabtty_softc *sc)
{
if (sc->sc_flags & SABTTYF_CONS_IN) {
-/* $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 $ */
/*-
};
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;
* 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;
-/* $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)
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);
}
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;
}
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;
}
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;
}
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;
}
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;
-/* $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)
{ -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;
}
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;
* 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;
* 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;
}
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;
}
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;
}
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;
}
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;
-/* $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 $ */
/*
};
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)
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
-/* $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 $ */
/*
#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;
-/* $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 $ */
/*
*/
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;
-/* $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 $ */
/*
* 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)
* 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);
* 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;
* 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;
* 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;
* 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;
-/* $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 $ */
/*
* 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;
* 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;
* 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;
* 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;
* 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;
* 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) {
-/* $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 $ */
/*
* 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;
-/* $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 $ */
/*
* 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;
-/* $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 $ */
/*-
#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) {
-/* $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 $ */
/*
* 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;
#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;
-/* $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 $ */
/*
* 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);
* 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];
}
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();
}
}
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 */
}
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) {
}
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;
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;
}
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;
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;
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;
}
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;
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) {
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;
}
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;
}
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;
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;
* 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;
-/* $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 $ */
/*-
/* 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;
static vaddr_t dumpspace;
caddr_t
-reserve_dumppages(p)
- caddr_t p;
+reserve_dumppages(caddr_t p)
{
dumpspace = (vaddr_t)p;
* 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,
* 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;
* 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
* 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;
* 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;
* 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
* 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");
* 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;
* 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");
* 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;
* 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
* 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;
* 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
* 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;
-/* $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 $ */
/*
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
-/* $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 $ */
/*
#define min(x,y) ((x<y)?(x):(y))
int
-OF_peer(phandle)
- int phandle;
+OF_peer(int phandle)
{
struct {
cell_t name;
}
int
-OF_child(phandle)
- int phandle;
+OF_child(int phandle)
{
struct {
cell_t name;
}
int
-OF_parent(phandle)
- int phandle;
+OF_parent(int phandle)
{
struct {
cell_t name;
}
int
-OF_instance_to_package(ihandle)
- int ihandle;
+OF_instance_to_package(int ihandle)
{
static struct {
cell_t name;
/* Should really return a `long' */
int
-OF_getproplen(handle, prop)
- int handle;
- char *prop;
+OF_getproplen(int handle, char *prop)
{
struct {
cell_t name;
}
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;
}
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;
}
int
-OF_nextprop(handle, prop, buf)
- int handle;
- char *prop;
- void *buf;
+OF_nextprop(int handle, char *prop, void *buf)
{
struct {
cell_t name;
}
int
-OF_finddevice(name)
-char *name;
+OF_finddevice(char *name)
{
struct {
cell_t 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;
}
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;
}
int
-OF_open(dname)
- char *dname;
+OF_open(char *dname)
{
struct {
cell_t name;
}
void
-OF_close(handle)
- int handle;
+OF_close(int handle)
{
struct {
cell_t name;
}
int
-OF_test(service)
- char *service;
+OF_test(char *service)
{
struct {
cell_t name;
}
int
-OF_test_method(service, method)
- int service;
- char *method;
+OF_test_method(int service, char *method)
{
struct {
cell_t name;
* 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;
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;
int
-OF_seek(handle, pos)
- int handle;
- u_quad_t pos;
+OF_seek(int handle, u_quad_t pos)
{
struct {
cell_t name;
}
void
-OF_boot(bootspec)
- char *bootspec;
+OF_boot(char *bootspec)
{
struct {
cell_t name;
}
void
-(*OF_set_callback(newfunc))(void *)
- void (*newfunc)(void *);
+(*OF_set_callback(void (*newfunc)(void *)))(void *)
{
struct {
cell_t name;
}
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;
int obp_symbol_debug = 0;
-void OF_sym2val(cells)
- void *cells;
+void
+OF_sym2val(void *cells)
{
struct args {
cell_t service;
args->value = ADR2CELL(value);
}
-void OF_val2sym(cells)
- void *cells;
+void
+OF_val2sym(void *cells)
{
struct args {
cell_t service;
-/* $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 $ */
/*
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);
* 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))
}
static int
-openpromgetstr(len, user, cpp)
- int len;
- char *user, **cpp;
+openpromgetstr(int len, char *user, char **cpp)
{
int error;
char *cp;
}
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;
-/* $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 $ */
/*
#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;
}
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;
#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;
#ifdef PT_STEP
int
-process_sstep(p, sstep)
- struct proc *p;
- int sstep;
+process_sstep(struct proc *p, int sstep)
{
if (sstep)
return EINVAL;
#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;
}
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;
-/* $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 $ */
/*
#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;
-/* $OpenBSD: lsi64854.c,v 1.11 2017/09/08 05:36:52 deraadt Exp $ */
+/* $OpenBSD: lsi64854.c,v 1.12 2022/10/16 01:22:39 jsg Exp $ */
/* $NetBSD: lsi64854.c,v 1.18 2001/06/04 20:56:51 mrg Exp $ */
/*-
* sc_client (one of SCSI, ENET, PP `soft_c' pointers)
*/
int
-lsi64854_attach(sc)
- struct lsi64854_softc *sc;
+lsi64854_attach(struct lsi64854_softc *sc)
{
u_int32_t csr;
int rc;
} while(0)
void
-lsi64854_reset(sc)
- struct lsi64854_softc *sc;
+lsi64854_reset(struct lsi64854_softc *sc)
{
u_int32_t csr;
* setup a dma transfer
*/
int
-lsi64854_setup(sc, addr, len, datain, dmasize)
- struct lsi64854_softc *sc;
- caddr_t *addr;
- size_t *len;
- int datain;
- size_t *dmasize; /* IN-OUT */
+lsi64854_setup(struct lsi64854_softc *sc, caddr_t *addr, size_t *len,
+ int datain, size_t *dmasize)
{
u_int32_t csr;
* return 1 if it was a DMA continue.
*/
int
-lsi64854_scsi_intr(arg)
- void *arg;
+lsi64854_scsi_intr(void *arg)
{
struct lsi64854_softc *sc = arg;
struct ncr53c9x_softc *nsc = sc->sc_client;
* Pseudo (chained) interrupt to le driver to handle DMA errors.
*/
int
-lsi64854_enet_intr(arg)
- void *arg;
+lsi64854_enet_intr(void *arg)
{
struct lsi64854_softc *sc = arg;
char bits[64];
* setup a dma transfer
*/
int
-lsi64854_setup_pp(sc, addr, len, datain, dmasize)
- struct lsi64854_softc *sc;
- caddr_t *addr;
- size_t *len;
- int datain;
- size_t *dmasize; /* IN-OUT */
+lsi64854_setup_pp(struct lsi64854_softc *sc, caddr_t *addr, size_t *len,
+ int datain, size_t *dmasize)
{
u_int32_t csr;
* Parallel port DMA interrupt.
*/
int
-lsi64854_pp_intr(arg)
- void *arg;
+lsi64854_pp_intr(void *arg)
{
struct lsi64854_softc *sc = arg;
int ret, trans, resid = 0;
-/* $OpenBSD: mk48txx.c,v 1.9 2022/10/12 13:39:50 kettenis Exp $ */
+/* $OpenBSD: mk48txx.c,v 1.10 2022/10/16 01:22:39 jsg Exp $ */
/* $NetBSD: mk48txx.c,v 1.7 2001/04/08 17:05:10 tsutsui Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
};
todr_chip_handle_t
-mk48txx_attach(bt, bh, model, year0)
- bus_space_tag_t bt;
- bus_space_handle_t bh;
- const char *model;
- int year0;
+mk48txx_attach(bus_space_tag_t bt, bus_space_handle_t bh, const char *model,
+ int year0)
{
todr_chip_handle_t handle;
struct mk48txx *mk;
* Return 0 on success; an error number otherwise.
*/
int
-mk48txx_gettime(handle, tv)
- todr_chip_handle_t handle;
- struct timeval *tv;
+mk48txx_gettime(todr_chip_handle_t handle, struct timeval *tv)
{
struct mk48txx *mk = handle->cookie;
bus_space_tag_t bt = mk->mk_bt;
* Return 0 on success; an error number otherwise.
*/
int
-mk48txx_settime(handle, tv)
- todr_chip_handle_t handle;
- struct timeval *tv;
+mk48txx_settime(todr_chip_handle_t handle, struct timeval *tv)
{
struct mk48txx *mk = handle->cookie;
bus_space_tag_t bt = mk->mk_bt;
}
int
-mk48txx_get_nvram_size(handle, vp)
- todr_chip_handle_t handle;
- bus_size_t *vp;
+mk48txx_get_nvram_size(todr_chip_handle_t handle, bus_size_t *vp)
{
struct mk48txx *mk = handle->cookie;
*vp = mk->mk_nvramsz;
-/* $OpenBSD: bwtwo.c,v 1.21 2022/07/15 17:57:27 kettenis Exp $ */
+/* $OpenBSD: bwtwo.c,v 1.22 2022/10/16 01:22:40 jsg Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
};
int
-bwtwomatch(parent, vcf, aux)
- struct device *parent;
- void *vcf, *aux;
+bwtwomatch(struct device *parent, void *vcf, void *aux)
{
struct cfdata *cf = vcf;
struct sbus_attach_args *sa = aux;
}
void
-bwtwoattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+bwtwoattach(struct device *parent, struct device *self, void *aux)
{
struct bwtwo_softc *sc = (struct bwtwo_softc *)self;
struct sbus_attach_args *sa = aux;
}
int
-bwtwo_ioctl(v, cmd, data, flags, p)
- void *v;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+bwtwo_ioctl(void *v, u_long cmd, caddr_t data, int flags, struct proc *p)
{
struct bwtwo_softc *sc = v;
struct wsdisplay_fbinfo *wdf;
}
paddr_t
-bwtwo_mmap(v, offset, prot)
- void *v;
- off_t offset;
- int prot;
+bwtwo_mmap(void *v, off_t offset, int prot)
{
struct bwtwo_softc *sc = v;
}
int
-bwtwo_is_console(node)
- int node;
+bwtwo_is_console(int node)
{
extern int fbnode;
}
void
-bwtwo_burner(vsc, on, flags)
- void *vsc;
- u_int on, flags;
+bwtwo_burner(void *vsc, u_int on, u_int flags)
{
struct bwtwo_softc *sc = vsc;
int s;
-/* $OpenBSD: dma_sbus.c,v 1.18 2022/03/13 13:34:54 mpi Exp $ */
+/* $OpenBSD: dma_sbus.c,v 1.19 2022/10/16 01:22:40 jsg Exp $ */
/* $NetBSD: dma_sbus.c,v 1.5 2000/07/09 20:57:42 pk Exp $ */
/*-
}
void
-dmaattach_sbus(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+dmaattach_sbus(struct device *parent, struct device *self, void *aux)
{
struct sbus_attach_args *sa = aux;
struct dma_softc *dsc = (void *)self;
-/* $OpenBSD: qe.c,v 1.42 2022/03/13 13:34:54 mpi Exp $ */
+/* $OpenBSD: qe.c,v 1.43 2022/10/16 01:22:40 jsg Exp $ */
/* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */
/*-
};
int
-qematch(parent, vcf, aux)
- struct device *parent;
- void *vcf;
- void *aux;
+qematch(struct device *parent, void *vcf, void *aux)
{
struct cfdata *cf = vcf;
struct sbus_attach_args *sa = aux;
}
void
-qeattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+qeattach(struct device *parent, struct device *self, void *aux)
{
struct sbus_attach_args *sa = aux;
struct qec_softc *qec = (struct qec_softc *)parent;
* we copy into clusters.
*/
struct mbuf *
-qe_get(sc, idx, totlen)
- struct qe_softc *sc;
- int idx, totlen;
+qe_get(struct qe_softc *sc, int idx, int totlen)
{
struct mbuf *m;
struct mbuf *top, **mp;
* network buffer memory.
*/
__inline__ int
-qe_put(sc, idx, m)
- struct qe_softc *sc;
- int idx;
- struct mbuf *m;
+qe_put(struct qe_softc *sc, int idx, struct mbuf *m)
{
struct mbuf *n;
int len, tlen = 0, boff = 0;
* Pass a packet to the higher levels.
*/
__inline__ void
-qe_read(sc, idx, len)
- struct qe_softc *sc;
- int idx, len;
+qe_read(struct qe_softc *sc, int idx, int len)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
struct mbuf_list ml = MBUF_LIST_INITIALIZER();
* (i.e. that the output part of the interface is idle)
*/
void
-qestart(ifp)
- struct ifnet *ifp;
+qestart(struct ifnet *ifp)
{
struct qe_softc *sc = (struct qe_softc *)ifp->if_softc;
struct qec_xd *txd = sc->sc_rb.rb_txd;
}
void
-qestop(sc)
- struct qe_softc *sc;
-{
+qestop(struct qe_softc *sc)
+{
bus_space_tag_t t = sc->sc_bustag;
bus_space_handle_t mr = sc->sc_mr;
bus_space_handle_t cr = sc->sc_cr;
* Reset interface.
*/
void
-qereset(sc)
- struct qe_softc *sc;
+qereset(struct qe_softc *sc)
{
int s;
}
void
-qewatchdog(ifp)
- struct ifnet *ifp;
+qewatchdog(struct ifnet *ifp)
{
struct qe_softc *sc = ifp->if_softc;
* Interrupt dispatch.
*/
int
-qeintr(arg)
- void *arg;
+qeintr(void *arg)
{
struct qe_softc *sc = (struct qe_softc *)arg;
bus_space_tag_t t = sc->sc_bustag;
* Transmit interrupt.
*/
int
-qe_tint(sc)
- struct qe_softc *sc;
+qe_tint(struct qe_softc *sc)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
unsigned int bix, txflags;
* Receive interrupt.
*/
int
-qe_rint(sc)
- struct qe_softc *sc;
+qe_rint(struct qe_softc *sc)
{
struct qec_xd *xd = sc->sc_rb.rb_rxd;
unsigned int bix, len;
* Error interrupt.
*/
int
-qe_eint(sc, why)
- struct qe_softc *sc;
- u_int32_t why;
+qe_eint(struct qe_softc *sc, u_int32_t why)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
int r = 0, rst = 0;
}
int
-qeioctl(ifp, cmd, data)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
+qeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct qe_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
void
-qeinit(sc)
- struct qe_softc *sc;
+qeinit(struct qe_softc *sc)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
bus_space_tag_t t = sc->sc_bustag;
* Reset multicast filter.
*/
void
-qe_mcreset(sc)
- struct qe_softc *sc;
+qe_mcreset(struct qe_softc *sc)
{
struct arpcom *ac = &sc->sc_arpcom;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
* Get current media settings.
*/
void
-qe_ifmedia_sts(ifp, ifmr)
- struct ifnet *ifp;
- struct ifmediareq *ifmr;
+qe_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
{
struct qe_softc *sc = ifp->if_softc;
u_int8_t phycc;
* Set media options.
*/
int
-qe_ifmedia_upd(ifp)
- struct ifnet *ifp;
+qe_ifmedia_upd(struct ifnet *ifp)
{
struct qe_softc *sc = ifp->if_softc;
uint64_t media = sc->sc_ifmedia.ifm_media;
-/* $OpenBSD: qec.c,v 1.16 2022/03/13 13:34:54 mpi Exp $ */
+/* $OpenBSD: qec.c,v 1.17 2022/10/16 01:22:40 jsg Exp $ */
/* $NetBSD: qec.c,v 1.12 2000/12/04 20:12:55 fvdl Exp $ */
/*-
};
int
-qecprint(aux, busname)
- void *aux;
- const char *busname;
+qecprint(void *aux, const char *busname)
{
struct sbus_attach_args *sa = aux;
bus_space_tag_t t = sa->sa_bustag;
}
int
-qecmatch(parent, vcf, aux)
- struct device *parent;
- void *vcf;
- void *aux;
+qecmatch(struct device *parent, void *vcf, void *aux)
{
struct cfdata *cf = vcf;
struct sbus_attach_args *sa = aux;
* Attach all the sub-devices we can find
*/
void
-qecattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+qecattach(struct device *parent, struct device *self, void *aux)
{
struct sbus_attach_args *sa = aux;
struct qec_softc *sc = (void *)self;
}
int
-qec_bus_map(t, t0, addr, size, flags, hp)
- bus_space_tag_t t;
- bus_space_tag_t t0;
- bus_addr_t addr;
- bus_size_t size;
- int flags;
- bus_space_handle_t *hp;
+qec_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t addr,
+ bus_size_t size, int flags, bus_space_handle_t *hp)
{
struct qec_softc *sc = t->cookie;
int slot = BUS_ADDR_IOSPACE(addr);
}
void *
-qec_intr_establish(t, t0, pri, level, flags, handler, arg, what)
- bus_space_tag_t t;
- bus_space_tag_t t0;
- int pri;
- int level;
- int flags;
- int (*handler)(void *);
- void *arg;
- const char *what;
+qec_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level,
+ int flags, int (*handler)(void *), void *arg, const char *what)
{
struct qec_softc *sc = t->cookie;
}
void
-qec_init(sc)
- struct qec_softc *sc;
+qec_init(struct qec_softc *sc)
{
bus_space_tag_t t = sc->sc_bustag;
bus_space_handle_t qr = sc->sc_regs;
* Called from be & qe drivers.
*/
void
-qec_meminit(qr, pktbufsz)
- struct qec_ring *qr;
- unsigned int pktbufsz;
+qec_meminit(struct qec_ring *qr, unsigned int pktbufsz)
{
bus_addr_t txbufdma, rxbufdma;
bus_addr_t dma;