'struct proc *' -> 'struct lwp *' as required to get GENERIC for macppc built

This commit is contained in:
darrenr 2003-06-29 11:02:21 +00:00
parent 4eee2aed2e
commit 257443876f
13 changed files with 86 additions and 85 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aed.c,v 1.11 2002/11/26 19:50:27 christos Exp $ */
/* $NetBSD: aed.c,v 1.12 2003/06/29 11:02:21 darrenr Exp $ */
/*
* Copyright (C) 1994 Bradley A. Grantham
@ -418,10 +418,10 @@ aed_enqevent(event)
}
int
aedopen(dev, flag, mode, p)
aedopen(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int unit;
int error = 0;
@ -440,7 +440,7 @@ aedopen(dev, flag, mode, p)
aed_sc->sc_evq_tail = 0;
aed_sc->sc_evq_len = 0;
aed_sc->sc_open = 1;
aed_sc->sc_ioproc = p;
aed_sc->sc_ioproc = l->l_proc;
splx(s);
return (error);
@ -448,10 +448,10 @@ aedopen(dev, flag, mode, p)
int
aedclose(dev, flag, mode, p)
aedclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int s = spladb();
@ -512,12 +512,12 @@ aedread(dev, uio, flag)
}
int
aedioctl(dev, cmd, data, flag, p)
aedioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
switch (cmd) {
case ADBIOCDEVSINFO: {
@ -581,10 +581,10 @@ aedioctl(dev, cmd, data, flag, p)
int
aedpoll(dev, events, p)
aedpoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
int s, revents;
@ -597,7 +597,7 @@ aedpoll(dev, events, p)
if (aed_sc->sc_evq_len > 0)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &aed_sc->sc_selinfo);
selrecord(l, &aed_sc->sc_selinfo);
splx(s);
return (revents);

View File

@ -1,4 +1,4 @@
/* $NetBSD: apm.c,v 1.6 2002/11/26 19:50:27 christos Exp $ */
/* $NetBSD: apm.c,v 1.7 2003/06/29 11:02:21 darrenr Exp $ */
/* $OpenBSD: apm.c,v 1.5 2002/06/07 07:13:59 miod Exp $ */
/*-
@ -194,10 +194,10 @@ apmattach(parent, self, aux)
}
int
apmopen(dev, flag, mode, p)
apmopen(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct apm_softc *sc;
int error = 0;
@ -208,7 +208,7 @@ apmopen(dev, flag, mode, p)
return ENXIO;
DPRINTF(("apmopen: dev %d pid %d flag %x mode %x\n",
APMDEV(dev), p->p_pid, flag, mode));
APMDEV(dev), l->l_proc->p_pid, flag, mode));
APM_LOCK(sc);
switch (APMDEV(dev)) {
@ -239,10 +239,10 @@ apmopen(dev, flag, mode, p)
}
int
apmclose(dev, flag, mode, p)
apmclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct apm_softc *sc;
@ -251,7 +251,8 @@ apmclose(dev, flag, mode, p)
!(sc = apm_cd.cd_devs[APMUNIT(dev)]))
return ENXIO;
DPRINTF(("apmclose: pid %d flag %x mode %x\n", p->p_pid, flag, mode));
DPRINTF(("apmclose: pid %d flag %x mode %x\n", l->l_proc->p_pid,
flag, mode));
APM_LOCK(sc);
switch (APMDEV(dev)) {
@ -267,12 +268,12 @@ apmclose(dev, flag, mode, p)
}
int
apmioctl(dev, cmd, data, flag, p)
apmioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct apm_softc *sc;
struct pmu_battery_info batt;
@ -402,10 +403,10 @@ apm_record_event(sc, event_type)
#endif
int
apmpoll(dev, events, p)
apmpoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
struct apm_softc *sc = apm_cd.cd_devs[APMUNIT(dev)];
int revents = 0;
@ -415,7 +416,7 @@ apmpoll(dev, events, p)
if (sc->event_count)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &sc->sc_rsel);
selrecord(l, &sc->sc_rsel);
}
APM_UNLOCK(sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofb.c,v 1.33 2003/02/15 05:07:57 briggs Exp $ */
/* $NetBSD: ofb.c,v 1.34 2003/06/29 11:02:21 darrenr Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -89,7 +89,7 @@ struct wsscreen_list ofb_screenlist = {
sizeof(_ofb_scrlist) / sizeof(struct wsscreen_descr *), _ofb_scrlist
};
static int ofb_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
static int ofb_ioctl __P((void *, u_long, caddr_t, int, struct lwp *));
static paddr_t ofb_mmap __P((void *, off_t, int));
static int ofb_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
@ -325,12 +325,12 @@ ofb_is_console()
}
int
ofb_ioctl(v, cmd, data, flag, p)
ofb_ioctl(v, cmd, data, flag, l)
void *v;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct ofb_softc *sc = v;
struct ofb_devconfig *dc = sc->sc_dc;
@ -367,7 +367,7 @@ ofb_ioctl(v, cmd, data, flag, p)
case PCI_IOC_CFGREAD:
case PCI_IOC_CFGWRITE:
return (pci_devioctl(sc->sc_pc, sc->sc_pcitag,
cmd, data, flag, p));
cmd, data, flag, l));
}
return EPASSTHROUGH;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: z8530tty.c,v 1.16 2002/10/23 09:11:33 jdolecek Exp $ */
/* $NetBSD: z8530tty.c,v 1.17 2003/06/29 11:02:22 darrenr Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999
@ -436,11 +436,11 @@ zs_shutdown(zst)
* Open a zs serial (tty) port.
*/
int
zsopen(dev, flags, mode, p)
zsopen(dev, flags, mode, l)
dev_t dev;
int flags;
int mode;
struct proc *p;
struct lwp *l;
{
int unit = ZSUNIT(dev);
struct zstty_softc *zst;
@ -463,7 +463,7 @@ zsopen(dev, flags, mode, p)
if (ISSET(tp->t_state, TS_ISOPEN) &&
ISSET(tp->t_state, TS_XCLUDE) &&
p->p_ucred->cr_uid != 0)
l->l_proc->p_ucred->cr_uid != 0)
return (EBUSY);
s = spltty();
@ -574,11 +574,11 @@ bad:
* Close a zs serial port.
*/
int
zsclose(dev, flags, mode, p)
zsclose(dev, flags, mode, l)
dev_t dev;
int flags;
int mode;
struct proc *p;
struct lwp *l;
{
struct zstty_softc *zst = zstty_cd.cd_devs[ZSUNIT(dev)];
struct tty *tp = zst->zst_tty;
@ -630,24 +630,24 @@ zswrite(dev, uio, flags)
}
int
zspoll(dev, events, p)
zspoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
struct zstty_softc *zst = zstty_cd.cd_devs[ZSUNIT(dev)];
struct tty *tp = zst->zst_tty;
return ((*tp->t_linesw->l_poll)(tp, events, p));
return ((*tp->t_linesw->l_poll)(tp, events, l));
}
int
zsioctl(dev, cmd, data, flag, p)
zsioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct zstty_softc *zst = zstty_cd.cd_devs[ZSUNIT(dev)];
struct zs_chanstate *cs = zst->zst_cs;
@ -655,11 +655,11 @@ zsioctl(dev, cmd, data, flag, p)
int error;
int s;
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
error = ttioctl(tp, cmd, data, flag, p);
error = ttioctl(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
@ -687,7 +687,7 @@ zsioctl(dev, cmd, data, flag, p)
break;
case TIOCSFLAGS:
error = suser(p->p_ucred, &p->p_acflag);
error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag);
if (error)
break;
zst->zst_swflags = *(int *)data;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ptrace.h,v 1.5 2003/03/05 05:27:25 matt Exp $ */
/* $NetBSD: ptrace.h,v 1.6 2003/06/29 11:02:23 darrenr Exp $ */
#ifndef _POWERPC_PTRACE_H
#define _POWERPC_PTRACE_H
@ -25,8 +25,8 @@
case PT_GETVECREGS: \
case PT_SETVECREGS:
int ptrace_machdep_dorequest(struct proc *, struct lwp *, int, caddr_t, int);
int process_machdep_dovecregs(struct proc *, struct lwp *, struct uio *);
int ptrace_machdep_dorequest(struct lwp *, struct lwp *, int, caddr_t, int);
int process_machdep_dovecregs(struct lwp *, struct lwp *, struct uio *);
int process_machdep_validvecregs(struct proc *);
/* We have machine-dependent procfs nodes. */
@ -48,9 +48,9 @@ int process_machdep_validvecregs(struct proc *);
/* Functions used by procfs. */
struct mount;
struct pfsnode;
int procfs_machdep_dovecregs(struct proc *, struct lwp *,
int procfs_machdep_dovecregs(struct lwp *, struct lwp *,
struct pfsnode *, struct uio *);
int procfs_machdep_validvecregs(struct proc *, struct mount *);
int procfs_machdep_validvecregs(struct lwp *, struct mount *);
#endif /* ALTIVEC */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: powerpc_machdep.c,v 1.18 2003/02/03 17:10:11 matt Exp $ */
/* $NetBSD: powerpc_machdep.c,v 1.19 2003/06/29 11:02:23 darrenr Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -109,14 +109,14 @@ setregs(l, pack, stack)
* Machine dependent system variables.
*/
int
cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, l)
int *name;
u_int namelen;
void *oldp;
size_t *oldlenp;
void *newp;
size_t newlen;
struct proc *p;
struct lwp *l;
{
/* all sysctl names at this level are terminal */
if (namelen != 1)

View File

@ -1,4 +1,4 @@
/* $NetBSD: process_machdep.c,v 1.13 2003/06/28 14:21:05 darrenr Exp $ */
/* $NetBSD: process_machdep.c,v 1.14 2003/06/29 11:02:24 darrenr Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -173,7 +173,7 @@ process_machdep_write_vecregs(struct lwp *l, struct vreg *vregs)
}
int
ptrace_machdep_dorequest(struct proc *p, struct lwp *l,
ptrace_machdep_dorequest(struct lwp *curl, struct lwp *l,
int req, caddr_t addr, int data)
{
struct uio uio;
@ -197,7 +197,7 @@ ptrace_machdep_dorequest(struct proc *p, struct lwp *l,
uio.uio_segflg = UIO_USERSPACE;
uio.uio_rw = write ? UIO_WRITE : UIO_READ;
uio.uio_lwp = l;
return process_machdep_dovecregs(p, l, &uio);
return process_machdep_dovecregs(l, l, &uio);
}
#ifdef DIAGNOSTIC
@ -212,14 +212,14 @@ ptrace_machdep_dorequest(struct proc *p, struct lwp *l,
*/
int
process_machdep_dovecregs(struct proc *curp, struct lwp *l, struct uio *uio)
process_machdep_dovecregs(struct lwp *curl, struct lwp *l, struct uio *uio)
{
struct vreg r;
int error;
char *kv;
int kl;
if ((error = process_checkioperm(curp, l->l_proc)) != 0)
if ((error = process_checkioperm(curl, l->l_proc)) != 0)
return (error);
kl = sizeof(r);

View File

@ -1,4 +1,4 @@
/* $NetBSD: procfs_machdep.c,v 1.1 2003/03/05 05:27:24 matt Exp $ */
/* $NetBSD: procfs_machdep.c,v 1.2 2003/06/29 11:02:24 darrenr Exp $ */
#include <sys/param.h>
#include <sys/systm.h>
@ -40,13 +40,13 @@ procfs_machdep_allocvp(struct vnode *vp)
}
int
procfs_machdep_rw(struct proc *curp, struct lwp *l, struct pfsnode *pfs,
procfs_machdep_rw(struct lwp *curl, struct lwp *l, struct pfsnode *pfs,
struct uio *uio)
{
switch (pfs->pfs_type) {
case Pmachdep_vecregs:
return (procfs_machdep_dovecregs(curp, l, pfs, uio));
return (procfs_machdep_dovecregs(curl, l, pfs, uio));
default:
panic("procfs_machdep_rw");
@ -74,17 +74,17 @@ procfs_machdep_getattr(struct vnode *vp, struct vattr *vap, struct proc *procp)
}
int
procfs_machdep_dovecregs(struct proc *curp, struct lwp *l,
procfs_machdep_dovecregs(struct lwp *curl, struct lwp *l,
struct pfsnode *pfs, struct uio *uio)
{
return (process_machdep_dovecregs(curp, l, uio));
return (process_machdep_dovecregs(curl, l, uio));
}
int
procfs_machdep_validvecregs(struct proc *p, struct mount *mp)
procfs_machdep_validvecregs(struct lwp *l, struct mount *mp)
{
return (process_machdep_validvecregs(p));
return (process_machdep_validvecregs(l->l_proc));
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.50 2003/04/02 02:47:19 thorpej Exp $ */
/* $NetBSD: vm_machdep.c,v 1.51 2003/06/29 11:02:24 darrenr Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -269,7 +269,6 @@ cpu_coredump(l, vp, cred, chdr)
{
struct coreseg cseg;
struct md_coredump md_core;
struct proc *p = l->l_proc;
struct pcb *pcb = &l->l_addr->u_pcb;
int error;
@ -303,11 +302,11 @@ cpu_coredump(l, vp, cred, chdr)
if ((error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE,
IO_NODELOCKED|IO_UNIT, cred, NULL, p)) != 0)
IO_NODELOCKED|IO_UNIT, cred, NULL, l)) != 0)
return error;
if ((error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof md_core,
(off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE,
IO_NODELOCKED|IO_UNIT, cred, NULL, p)) != 0)
IO_NODELOCKED|IO_UNIT, cred, NULL, l)) != 0)
return error;
chdr->c_nseg++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec_powerpc.c,v 1.10 2003/04/01 14:45:09 thorpej Exp $ */
/* $NetBSD: linux_exec_powerpc.c,v 1.11 2003/06/29 11:02:25 darrenr Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_exec_powerpc.c,v 1.10 2003/04/01 14:45:09 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_exec_powerpc.c,v 1.11 2003/06/29 11:02:25 darrenr Exp $");
#if defined (__alpha__)
#define ELFSIZE 64
@ -79,13 +79,14 @@ extern int linux_sp_wrap_entry;
* Alpha and PowerPC specific linux copyargs function.
*/
int
ELFNAME2(linux,copyargs)(p, pack, arginfo, stackp, argp)
struct proc *p;
ELFNAME2(linux,copyargs)(l, pack, arginfo, stackp, argp)
struct lwp *l;
struct exec_package *pack;
struct ps_strings *arginfo;
char **stackp;
void *argp;
{
struct proc *p = l->l_proc;
size_t len;
AuxInfo ai[LINUX_ELF_AUX_ENTRIES], *a;
struct elf_args *ap;
@ -105,7 +106,7 @@ ELFNAME2(linux,copyargs)(p, pack, arginfo, stackp, argp)
*stackp = (char *)(((unsigned long)*stackp - 1) & ~LINUX_SHIFT);
#endif
if ((error = copyargs(p, pack, arginfo, stackp, argp)) != 0)
if ((error = copyargs(l, pack, arginfo, stackp, argp)) != 0)
return error;
#ifdef LINUX_SHIFT

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_machdep.c,v 1.20 2003/01/18 08:02:50 thorpej Exp $ */
/* $NetBSD: linux_machdep.c,v 1.21 2003/06/29 11:02:25 darrenr Exp $ */
/*-
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.20 2003/01/18 08:02:50 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.21 2003/06/29 11:02:25 darrenr Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -480,8 +480,8 @@ linux_fakedev(dev, raw)
* We come here in a last attempt to satisfy a Linux ioctl() call
*/
int
linux_machdepioctl(p, v, retval)
struct proc *p;
linux_machdepioctl(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -504,7 +504,7 @@ linux_machdepioctl(p, v, retval)
}
SCARG(&bia, com) = com;
/* XXX NJWLWP */
return sys_ioctl(curlwp, &bia, retval);
return sys_ioctl(l, &bia, retval);
}
#if 0
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec_elf32.c,v 1.62 2003/06/28 14:21:21 darrenr Exp $ */
/* $NetBSD: linux_exec_elf32.c,v 1.63 2003/06/29 11:02:25 darrenr Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.62 2003/06/28 14:21:21 darrenr Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.63 2003/06/29 11:02:25 darrenr Exp $");
#ifndef ELFSIZE
/* XXX should die */
@ -102,8 +102,8 @@ static int ELFNAME2(linux,atexit_signature) __P((struct lwp *l,
* have a Linux binary if we find this section.
*/
static int
ELFNAME2(linux,atexit_signature)(p, epp, eh)
struct proc *p;
ELFNAME2(linux,atexit_signature)(l, epp, eh)
struct lwp *l;
struct exec_package *epp;
Elf_Ehdr *eh;
{
@ -121,7 +121,7 @@ ELFNAME2(linux,atexit_signature)(p, epp, eh)
*/
shsize = eh->e_shnum * sizeof(Elf_Shdr);
sh = (Elf_Shdr *) malloc(shsize, M_TEMP, M_WAITOK);
error = exec_read_from(p, epp->ep_vp, eh->e_shoff, sh, shsize);
error = exec_read_from(l, epp->ep_vp, eh->e_shoff, sh, shsize);
if (error)
goto out;
@ -140,7 +140,7 @@ ELFNAME2(linux,atexit_signature)(p, epp, eh)
* s->sh_name is the offset of the section name in strtable.
*/
strtable = malloc(sh[strndx].sh_size, M_TEMP, M_WAITOK);
error = exec_read_from(p, epp->ep_vp, sh[strndx].sh_offset, strtable,
error = exec_read_from(l, epp->ep_vp, sh[strndx].sh_offset, strtable,
sh[strndx].sh_size);
if (error)
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: openfirmio.c,v 1.5 2002/10/23 09:13:30 jdolecek Exp $ */
/* $NetBSD: openfirmio.c,v 1.6 2003/06/29 11:02:26 darrenr Exp $ */
/*
* Copyright (c) 1992, 1993
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.5 2002/10/23 09:13:30 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.6 2003/06/29 11:02:26 darrenr Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -112,7 +112,7 @@ openfirmgetstr(int len, char *user, char **cpp)
}
int
openfirmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
openfirmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l)
{
struct ofiocdesc *of;
int node, len, ok, error, s;