-/* $OpenBSD: mem.c,v 1.28 2015/05/28 20:53:05 jcs Exp $ */
+/* $OpenBSD: mem.c,v 1.29 2016/08/01 15:58:22 tedu Exp $ */
/* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */
/*
extern int allowaperture;
#endif
-/*ARGSUSED*/
int
-mmopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmopen(dev_t dev, int flag, int mode, struct proc *p)
{
switch (minor(dev)) {
}
}
-/*ARGSUSED*/
int
-mmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
#ifdef APERTURE
return (0);
}
-/*ARGSUSED*/
int
-mmrw(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+mmrw(dev_t dev, struct uio *uio, int flags)
{
vaddr_t o, v;
size_t c;
}
paddr_t
-mmmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
+mmmmap(dev_t dev, off_t off, int prot)
{
switch (minor(dev)) {
case 0:
}
int
-mmioctl(dev, cmd, data, flags, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
return (EOPNOTSUPP);
}
-/* $OpenBSD: mem.c,v 1.14 2015/05/28 20:53:05 jcs Exp $ */
+/* $OpenBSD: mem.c,v 1.15 2016/08/01 15:58:22 tedu Exp $ */
/* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */
/*
#endif
-/*ARGSUSED*/
int
-mmopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmopen(dev_t dev, int flag, int mode, struct proc *p)
{
switch (minor(dev)) {
case 0:
return (0);
}
-/*ARGSUSED*/
int
-mmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
#ifdef APERTURE
if (minor(dev) == 4)
#define DEV_NULL 2
#define DEV_ZERO 12
-/*ARGSUSED*/
int
-mmrw(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+mmrw(dev_t dev, struct uio *uio, int flags)
{
vaddr_t o, v;
size_t c;
}
paddr_t
-mmmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
+mmmmap(dev_t dev, off_t off, int prot)
{
struct proc *p = curproc; /* XXX */
return -1;
return off;
}
-/*ARGSUSED*/
+
int
mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
return (EOPNOTSUPP);
}
-
-/* $OpenBSD: mem.c,v 1.36 2015/02/10 22:44:35 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.37 2016/08/01 15:58:22 tedu Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
caddr_t zeropage;
int
-memmatch(parent, cfdata, aux)
- struct device *parent;
- void *cfdata;
- void *aux;
+memmatch(struct device *parent, void *cfdata, void *aux)
{
- register struct confargs *ca = aux;
+ struct confargs *ca = aux;
if (ca->ca_type.iodc_type != HPPA_TYPE_MEMORY ||
ca->ca_type.iodc_sv_model != HPPA_MEMORY_PDEP)
}
void
-memattach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+memattach(struct device *parent, struct device *self, void *aux)
{
struct pdc_iodc_minit pdc_minit PDC_ALIGNMENT;
struct mem_softc *sc = (struct mem_softc *)self;
}
void
-viper_setintrwnd(mask)
- u_int32_t mask;
+viper_setintrwnd(u_int32_t mask)
{
- register struct mem_softc *sc;
+ struct mem_softc *sc;
sc = mem_cd.cd_devs[0];
}
void
-viper_eisa_en()
+viper_eisa_en(void)
{
struct mem_softc *sc;
}
int
-mmopen(dev, flag, ioflag, p)
- dev_t dev;
- int flag;
- int ioflag;
- struct proc *p;
+mmopen(dev_t dev, int flag, int ioflag, struct proc *p)
{
return (0);
}
-/*ARGSUSED*/
int
-mmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
return (0);
}
int
-mmrw(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+mmrw(dev_t dev, struct uio *uio, int flags)
{
struct iovec *iov;
vaddr_t v, o;
}
paddr_t
-mmmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
+mmmmap(dev_t dev, off_t off, int prot)
{
if (minor(dev) != 0)
return (-1);
}
int
-mmioctl(dev, cmd, data, flags, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
return (EOPNOTSUPP);
}
-/* $OpenBSD: mem.c,v 1.3 2015/02/10 22:44:35 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.4 2016/08/01 15:58:22 tedu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
extern caddr_t kernelstart;
extern void *etext;
-/*ARGSUSED*/
int
-mmopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmopen(dev_t dev, int flag, int mode, struct proc *p)
{
switch (minor(dev)) {
}
}
-/*ARGSUSED*/
int
-mmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
return (0);
}
-/*ARGSUSED*/
int
-mmrw(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+mmrw(dev_t dev, struct uio *uio, int flags)
{
vaddr_t v;
size_t c;
}
switch (minor(dev)) {
-/* minor device 0 is physical memory */
+ /* minor device 0 is physical memory */
case 0:
v = uio->uio_offset;
error = uiomove((caddr_t)v, uio->uio_resid, uio);
continue;
-/* minor device 1 is kernel memory */
+ /* minor device 1 is kernel memory */
case 1:
v = uio->uio_offset;
c = ulmin(iov->iov_len, MAXPHYS);
error = uiomove((caddr_t)v, c, uio);
continue;
-/* minor device 2 is EOF/RATHOLE */
+ /* minor device 2 is /dev/null */
case 2:
if (uio->uio_rw == UIO_WRITE)
uio->uio_resid = 0;
return (0);
-/* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */
+ /* minor device 12 is /dev/zero */
case 12:
if (uio->uio_rw == UIO_WRITE) {
c = iov->iov_len;
}
paddr_t
-mmmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
+mmmmap(dev_t dev, off_t off, int prot)
{
return (-1);
}
-/*ARGSUSED*/
int
-mmioctl(dev, cmd, data, flags, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
return (EOPNOTSUPP);
}
-/* $OpenBSD: mem.c,v 1.20 2015/02/10 22:44:35 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.21 2016/08/01 15:58:22 tedu Exp $ */
/* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:03 mycroft Exp $ */
/*
#define mmwrite mmrw
cdev_decl(mm);
-/*ARGSUSED*/
int
mmopen(dev_t dev, int flag, int mode, struct proc *p)
{
}
}
-/*ARGSUSED*/
int
mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
return (0);
}
-/*ARGSUSED*/
int
mmrw(dev_t dev, struct uio *uio, int flags)
{
}
switch (minor(dev)) {
-/* minor device 0 is physical memory */
+ /* minor device 0 is physical memory */
case 0:
v = uio->uio_offset;
c = iov->iov_len;
error = uiomove((caddr_t)v, c, uio);
continue;
-/* minor device 1 is kernel memory */
+ /* minor device 1 is kernel memory */
case 1:
v = uio->uio_offset;
c = ulmin(iov->iov_len, MAXPHYS);
return (EFAULT);
}
-/* minor device 2 is EOF/RATHOLE */
+ /* minor device 2 is /dev/null */
case 2:
if (uio->uio_rw == UIO_WRITE)
uio->uio_resid = 0;
return (0);
-/* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */
+ /* minor device 12 is /dev/zero */
case 12:
if (uio->uio_rw == UIO_WRITE) {
c = iov->iov_len;
return error;
}
-/*ARGSUSED*/
paddr_t
mmmmap(dev_t dev, off_t off, int prot)
{