de-__P, remove register, ansify.

This commit is contained in:
chs 2003-11-28 19:02:25 +00:00
parent 86048e5a3d
commit d740b5e191
11 changed files with 199 additions and 416 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_disasm.c,v 1.4 2003/11/01 18:23:38 matt Exp $ */
/* $NetBSD: db_disasm.c,v 1.5 2003/11/28 19:02:25 chs Exp $ */
/* $OpenBSD: db_disasm.c,v 1.9 2000/04/18 20:02:45 mickey Exp $ */
@ -51,7 +51,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.4 2003/11/01 18:23:38 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.5 2003/11/28 19:02:25 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -908,44 +908,44 @@ struct majoropcode {
/*##################### Globals - Imports ##################################*/
/* Disassembly functions */
int fcoprDasm __P((union insn, u_int, u_int));
char *edDCond __P((u_int cond));
char *unitDCond __P((u_int cond));
char *addDCond __P((u_int cond));
char *subDCond __P((u_int cond));
int blDasm __P((const struct inst *i, OFS, union insn));
int ldDasm __P((const struct inst *, OFS, union insn));
int stDasm __P((const struct inst *i, OFS, union insn));
int addDasm __P((const struct inst *i, OFS, union insn));
int unitDasm __P((const struct inst *i, OFS, union insn));
int iaDasm __P((const struct inst *i, OFS, union insn));
int shdDasm __P((const struct inst *i, OFS, union insn));
int extrDasm __P((const struct inst *i, OFS, union insn));
int vextrDasm __P((const struct inst *i, OFS, union insn));
int depDasm __P((const struct inst *i, OFS, union insn));
int vdepDasm __P((const struct inst *i, OFS, union insn));
int depiDasm __P((const struct inst *i, OFS, union insn));
int vdepiDasm __P((const struct inst *i, OFS, union insn));
int limmDasm __P((const struct inst *i, OFS, union insn));
int brkDasm __P((const struct inst *i, OFS, union insn));
int lpkDasm __P((const struct inst *i, OFS, union insn));
int fmpyaddDasm __P((const struct inst *i, OFS, union insn));
int fmpysubDasm __P((const struct inst *i, OFS, union insn));
int floatDasm __P((const struct inst *i, OFS, union insn));
int coprDasm __P((const struct inst *i, OFS, union insn));
int diagDasm __P((const struct inst *i, OFS, union insn));
int scDasm __P((const struct inst *i, OFS, union insn));
int mmgtDasm __P((const struct inst *i, OFS, union insn));
int ldxDasm __P((const struct inst *i, OFS, union insn));
int stsDasm __P((const struct inst *i, OFS, union insn));
int stbysDasm __P((const struct inst *i, OFS, union insn));
int brDasm __P((const struct inst *i, OFS, union insn));
int bvDasm __P((const struct inst *i, OFS, union insn));
int beDasm __P((const struct inst *i, OFS, union insn));
int cbDasm __P((const struct inst *i,OFS ofs, union insn));
int cbiDasm __P((const struct inst *i,OFS ofs, union insn));
int bbDasm __P((const struct inst *i,OFS ofs, union insn));
int ariDasm __P((const struct inst *i, OFS, union insn));
int fcoprDasm(union insn, u_int, u_int);
char *edDCond(u_int);
char *unitDCond(u_int);
char *addDCond(u_int);
char *subDCond(u_int);
int blDasm(const struct inst *, OFS, union insn);
int ldDasm(const struct inst *, OFS, union insn);
int stDasm(const struct inst *, OFS, union insn);
int addDasm(const struct inst *, OFS, union insn);
int unitDasm(const struct inst *, OFS, union insn);
int iaDasm(const struct inst *, OFS, union insn);
int shdDasm(const struct inst *, OFS, union insn);
int extrDasm(const struct inst *, OFS, union insn);
int vextrDasm(const struct inst *, OFS, union insn);
int depDasm(const struct inst *, OFS, union insn);
int vdepDasm(const struct inst *, OFS, union insn);
int depiDasm(const struct inst *, OFS, union insn);
int vdepiDasm(const struct inst *, OFS, union insn);
int limmDasm(const struct inst *, OFS, union insn);
int brkDasm(const struct inst *, OFS, union insn);
int lpkDasm(const struct inst *, OFS, union insn);
int fmpyaddDasm(const struct inst *, OFS, union insn);
int fmpysubDasm(const struct inst *, OFS, union insn);
int floatDasm(const struct inst *, OFS, union insn);
int coprDasm(const struct inst *, OFS, union insn);
int diagDasm(const struct inst *, OFS, union insn);
int scDasm(const struct inst *, OFS, union insn);
int mmgtDasm(const struct inst *, OFS, union insn);
int ldxDasm(const struct inst *, OFS, union insn);
int stsDasm(const struct inst *, OFS, union insn);
int stbysDasm(const struct inst *, OFS, union insn);
int brDasm(const struct inst *, OFS, union insn);
int bvDasm(const struct inst *, OFS, union insn);
int beDasm(const struct inst *, OFS, union insn);
int cbDasm(const struct inst *, OFS, union insn);
int cbiDasm(const struct inst *, OFS, union insn);
int bbDasm(const struct inst *, OFS, union insn);
int ariDasm(const struct inst *, OFS, union insn);
/*##################### Globals - Exports ##################################*/
/*##################### Local Variables ####################################*/
@ -1246,7 +1246,7 @@ static struct majoropcode majopcs[NMAJOPCS] = {
* instruction$ExecutionInitialize - Initialize the instruction execution
* data structures.
*---------------------------------------------------------------------------*/
static int iExInit __P((void));
static int iExInit(void);
static int
iExInit(void)
{
@ -1308,10 +1308,7 @@ iExInit(void)
/* Add instructions */
int
addDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
addDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%%r%d,%%r%d,%%r%d",addDCond(Cond4(w)),
Rsa(w),Rsb(w),Rtc(w));
@ -1320,10 +1317,7 @@ addDasm(i, ofs, w)
/* Unit instructions */
int
unitDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
unitDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf(unitDCond(Cond4(w)));
if (Match("dcor") || Match("idcor"))
@ -1335,10 +1329,7 @@ unitDasm(i, ofs, w)
/* Immediate Arithmetic instructions */
int
iaDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
iaDasm(const struct inst *i, OFS ofs, union insn w)
{
if (Match("addi"))
db_printf("%s\t%d,%%r%d,%%r%d",
@ -1351,10 +1342,7 @@ iaDasm(i, ofs, w)
/* Shift double instructions */
int
shdDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
shdDasm(const struct inst *i, OFS ofs, union insn w)
{
if (Match("vshd"))
db_printf("%s\t%%r%d,%%r%d,%%r%d",
@ -1367,10 +1355,7 @@ shdDasm(i, ofs, w)
/* Extract instructions */
int
extrDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
extrDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%%r%d,%d,%d,%%r%d",
edDCond(Cond(w)),Rsb(w),Imd5(w),32 - Rsc(w),Rta(w));
@ -1380,10 +1365,7 @@ extrDasm(i, ofs, w)
/* Variable extract instructions */
int
vextrDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
vextrDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%%r%d,%d,%%r%d",
edDCond(Cond(w)),Rsb(w),32 - Rsc(w),Rta(w));
@ -1393,10 +1375,7 @@ vextrDasm(i, ofs, w)
/* Deposit instructions */
int
depDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
depDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%%r%d,%d,%d,%%r%d",
edDCond(Cond(w)),Rsa(w),31 - Imd5(w),32 - Rsc(w),Rtb(w));
@ -1406,10 +1385,7 @@ depDasm(i, ofs, w)
/* Variable deposit instructions */
int
vdepDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
vdepDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%%r%d,%d,%%r%d",
edDCond(Cond(w)),Rsa(w),32 - Rsc(w),Rtb(w));
@ -1419,10 +1395,7 @@ vdepDasm(i, ofs, w)
/* Deposit Immediate instructions */
int
depiDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
depiDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%d,%d,%d,%%r%d",
edDCond(Cond(w)),Ima5(w),31 - Imd5(w),32 - Imc5A(w),Rtb(w));
@ -1431,10 +1404,7 @@ depiDasm(i, ofs, w)
/* Variable Deposit Immediate instructions */
int
vdepiDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
vdepiDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%d,%d,%%r%d",edDCond(Cond(w)),Ima5(w),32-Imc5A(w),Rtb(w));
return (1);
@ -1446,8 +1416,7 @@ vdepiDasm(i, ofs, w)
*---------------------------------------------------------------------------*/
char *
subDCond(cond)
u_int cond;
subDCond(u_int cond)
{
switch(cond) {
case EQZ: return(",=");
@ -1478,8 +1447,7 @@ subDCond(cond)
*---------------------------------------------------------------------------*/
char *
addDCond(cond)
u_int cond;
addDCond(u_int cond)
{
switch(cond) {
case EQZ: return(",=");
@ -1504,8 +1472,7 @@ addDCond(cond)
}
char *
unitDCond(cond)
u_int cond;
unitDCond(u_int cond)
{
switch(cond) {
case SHC: return(",shc");
@ -1526,8 +1493,7 @@ unitDCond(cond)
}
char *
edDCond(cond)
u_int cond;
edDCond(u_int cond)
{
switch(cond) {
case XOD: return(",od");
@ -1552,10 +1518,7 @@ edDCond(cond)
/* Load [modify] instructions */
int
ldDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
ldDasm(const struct inst *i, OFS ofs, union insn w)
{
int d = Disp(w);
char s[2];
@ -1581,10 +1544,7 @@ ldDasm(i, ofs, w)
/* Store [modify] instructions */
int
stDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
stDasm(const struct inst *i, OFS ofs, union insn w)
{
int d = Disp(w);
char s[2];
@ -1609,10 +1569,7 @@ stDasm(i, ofs, w)
/* Load indexed instructions */
int
ldxDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
ldxDasm(const struct inst *i, OFS ofs, union insn w)
{
const char *p;
@ -1646,12 +1603,10 @@ ldxDasm(i, ofs, w)
/* Store short displacement instructions */
int
stsDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
stsDasm(const struct inst *i, OFS ofs, union insn w)
{
const char *p;
if (Modify(w))
db_printf(",m%s", ModBefore(w)? "b":"a");
@ -1672,12 +1627,10 @@ stsDasm(i, ofs, w)
/* Store Bytes Instruction */
int
stbysDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
stbysDasm(const struct inst *i, OFS ofs, union insn w)
{
const char *p;
db_printf(ModBefore(w)? ",e":",b");
if (Modify(w))
db_printf(",m");
@ -1698,10 +1651,7 @@ stbysDasm(i, ofs, w)
/* Long Immediate instructions */
int
limmDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
limmDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("\tL'%X,%%r%d", Im21(w), Rtb(w));
return (1);
@ -1710,10 +1660,7 @@ limmDasm(i, ofs, w)
/* Branch and Link instruction(s) (Branch, too!!) */
int
blDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
blDasm(const struct inst *i, OFS ofs, union insn w)
{
OFS tgtofs = ofs + 8 + Bdisp(w);
u_int link = Rtb(w);
@ -1734,10 +1681,7 @@ blDasm(i, ofs, w)
/* Branch Register instruction */
int
brDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
brDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%%r%d,%%r%d", Nu(w)?",n":"", Rsa(w), Rtb(w));
return (1);
@ -1745,10 +1689,7 @@ brDasm(i, ofs, w)
/* Dispatch instructions */
int
bvDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
bvDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("%s\t%%r%d(%%r%d)", Nu(w)?",n":"", Rsa(w), Rsb(w));
return (1);
@ -1756,10 +1697,7 @@ bvDasm(i, ofs, w)
/* Branch External instructions */
int
beDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
beDasm(const struct inst *i, OFS ofs, union insn w)
{
int d = Bdisp(w);
const char *p;
@ -1781,10 +1719,7 @@ beDasm(i, ofs, w)
/* Compare/Add and Branch instructions */
int
cbDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
cbDasm(const struct inst *i, OFS ofs, union insn w)
{
OFS tgtofs = ofs + 8 + Cbdisp(w);
@ -1801,10 +1736,7 @@ cbDasm(i, ofs, w)
/* Compare/Add and Branch Immediate instructions */
int
cbiDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
cbiDasm(const struct inst *i, OFS ofs, union insn w)
{
OFS tgtofs = ofs + 8 + Cbdisp(w);
@ -1821,10 +1753,7 @@ cbiDasm(i, ofs, w)
/* Branch on Bit instructions */
int
bbDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
bbDasm(const struct inst *i, OFS ofs, union insn w)
{
OFS tgtofs = ofs + 8 + Cbdisp(w);
const char *p;
@ -1841,10 +1770,7 @@ bbDasm(i, ofs, w)
/* Arithmetic instructions */
int
ariDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
ariDasm(const struct inst *i, OFS ofs, union insn w)
{
if (Match("or") && Rsb(w) == 0 && Cond4(w) == NEV) {
if (Rsa(w) == 0 && Rtc(w) == 0)
@ -1859,10 +1785,7 @@ ariDasm(i, ofs, w)
/* System control operations */
int
scDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
scDasm(const struct inst *i, OFS ofs, union insn w)
{
if (Match("mtctl")) {
if (Rtb(w) == 11)
@ -1893,10 +1816,7 @@ scDasm(i, ofs, w)
/* Instruction cache/tlb control instructions */
int
mmgtDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
mmgtDasm(const struct inst *i, OFS ofs, union insn w)
{
if (Match("probe")) {
if (ProbeI(w)) {
@ -1953,20 +1873,14 @@ mmgtDasm(i, ofs, w)
/* break instruction */
int
brkDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
brkDasm(const struct inst *i, OFS ofs, union insn w)
{
db_printf("\t%d,%d",Bi1(w),Bi2(w));
return (1);
}
int
floatDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
floatDasm(const struct inst *i, OFS ofs, union insn w)
{
u_int op1, r1, fmt, t;
u_int op2, r2, dfmt;
@ -2071,9 +1985,7 @@ floatDasm(i, ofs, w)
}
int
fcoprDasm(w, op1, op2)
union insn w;
u_int op1, op2;
fcoprDasm(union insn w, u_int op1, u_int op2)
{
u_int r1, r2, t, fmt, dfmt;
char *p;
@ -2156,10 +2068,7 @@ fcoprDasm(w, op1, op2)
}
int
coprDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
coprDasm(const struct inst *i, OFS ofs, union insn w)
{
u_int uid = Uid(w);
int load = 0;
@ -2246,10 +2155,7 @@ coprDasm(i, ofs, w)
}
int
lpkDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
lpkDasm(const struct inst *i, OFS ofs, union insn w)
{
/*
* Floating point STore Quad
@ -2282,10 +2188,7 @@ lpkDasm(i, ofs, w)
}
int
diagDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
diagDasm(const struct inst *i, OFS ofs, union insn w)
{
if (0x0b0 == BitfR(w,19,8,_b198)) /* mtcpu */
db_printf("mtcpu\t%%r%d,%%dr%d", Rsa(w), Rtb(w));
@ -2304,10 +2207,7 @@ diagDasm(i, ofs, w)
}
int
fmpysubDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
fmpysubDasm(const struct inst *i, OFS ofs, union insn w)
{
if (SinglePrec(w))
db_printf("SUB,SGL\t%%f%s,%%f%s,%%f%s,%%f%s,%%f%s",
@ -2321,10 +2221,7 @@ fmpysubDasm(i, ofs, w)
}
int
fmpyaddDasm(i, ofs, w)
const struct inst *i;
OFS ofs;
union insn w;
fmpyaddDasm(const struct inst *i, OFS ofs, union insn w)
{
const char
*ms1 = SinglePrec(w) ? fsreg[Ms1(w)] : fdreg[Ms1(w)],
@ -2344,9 +2241,7 @@ fmpyaddDasm(i, ofs, w)
}
vaddr_t
db_disasm(loc, flag)
vaddr_t loc;
boolean_t flag;
db_disasm(vaddr_t loc, boolean_t flag)
{
const struct inst *i;
const struct majoropcode *m;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.2 2003/07/15 02:29:39 lukem Exp $ */
/* $NetBSD: db_interface.c,v 1.3 2003/11/28 19:02:25 chs Exp $ */
/* $OpenBSD: db_interface.c,v 1.16 2001/03/22 23:31:45 mickey Exp $ */
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.2 2003/07/15 02:29:39 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.3 2003/11/28 19:02:25 chs Exp $");
#define DDB_DEBUG
@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.2 2003/07/15 02:29:39 lukem Exp $
#include <dev/cons.h>
void kdbprinttrap __P((int, int));
void kdbprinttrap(int, int);
extern label_t *db_recover;
extern int db_active;
@ -134,7 +134,7 @@ const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_
int db_active = 0;
void
Debugger()
Debugger(void)
{
__asm __volatile ("break %0, %1"
:: "i" (HPPA_BREAK_KERNEL), "i" (HPPA_BREAK_KGDB));
@ -144,8 +144,7 @@ Debugger()
* Print trap reason.
*/
void
kdbprinttrap(type, code)
int type, code;
kdbprinttrap(int type, int code)
{
db_printf("kernel: ");
if (type >= trap_types || type < 0)
@ -159,9 +158,7 @@ kdbprinttrap(type, code)
* kdb_trap - field a BPT trap
*/
int
kdb_trap(type, code, regs)
int type, code;
db_regs_t *regs;
kdb_trap(int type, int code, db_regs_t *regs)
{
int s;
@ -193,7 +190,6 @@ kdb_trap(type, code, regs)
splx(s);
*regs = ddb_regs;
return (1);
}
@ -202,19 +198,14 @@ kdb_trap(type, code, regs)
* Any address is allowed for now.
*/
int
db_valid_breakpoint(addr)
db_addr_t addr;
db_valid_breakpoint(db_addr_t addr)
{
return (1);
}
void
db_stack_trace_print(addr, have_addr, count, modif, pr)
db_expr_t addr;
int have_addr;
db_expr_t count;
char *modif;
void (*pr) __P((const char *, ...));
db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
char *modif, void (*pr)(const char *, ...))
{
register_t fp, pc, rp, nargs, *argp;
db_sym_t sym;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_memrw.c,v 1.3 2003/08/31 01:26:34 chs Exp $ */
/* $NetBSD: db_memrw.c,v 1.4 2003/11/28 19:02:25 chs Exp $ */
/* $OpenBSD: db_interface.c,v 1.16 2001/03/22 23:31:45 mickey Exp $ */
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.3 2003/08/31 01:26:34 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.4 2003/11/28 19:02:25 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -47,10 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.3 2003/08/31 01:26:34 chs Exp $");
#include <ddb/db_access.h>
void
db_read_bytes(addr, size, data)
vaddr_t addr;
size_t size;
char *data;
db_read_bytes(vaddr_t addr, size_t size, char *data)
{
char *src = (char *)addr;
@ -59,10 +56,7 @@ db_read_bytes(addr, size, data)
}
void
db_write_bytes(addr, size, data)
vaddr_t addr;
size_t size;
char *data;
db_write_bytes(vaddr_t addr, size_t size, char *data)
{
char *dst = (char *)addr;
extern int etext;

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpu.c,v 1.3 2003/10/25 16:15:07 chs Exp $ */
/* $NetBSD: fpu.c,v 1.4 2003/11/28 19:02:25 chs Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.3 2003/10/25 16:15:07 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.4 2003/11/28 19:02:25 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -87,7 +87,7 @@ u_int fpu_csw;
paddr_t fpu_cur_uspace;
/* In locore.S, this swaps states in and out of the FPU. */
void hppa_fpu_swap __P((struct user *, struct user *));
void hppa_fpu_swap(struct user *, struct user *);
#ifdef FPEMUL
/*
@ -239,7 +239,7 @@ hppa_fpu_flush(struct lwp *l)
/*
* This emulates a coprocessor load/store instruction.
*/
static int hppa_fpu_ls __P((struct trapframe *, struct lwp *));
static int hppa_fpu_ls(struct trapframe *, struct lwp *);
static int
hppa_fpu_ls(struct trapframe *frame, struct lwp *l)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: in_cksum.c,v 1.3 2003/08/31 01:26:35 chs Exp $ */
/* $NetBSD: in_cksum.c,v 1.4 2003/11/28 19:02:25 chs Exp $ */
/* $OpenBSD: in_cksum.c,v 1.1 2001/01/13 00:00:20 mickey Exp $ */
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.3 2003/08/31 01:26:35 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.4 2003/11/28 19:02:25 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -80,9 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.3 2003/08/31 01:26:35 chs Exp $");
: "+r" (sum), "+r" (w), "+r" (mlen) :: "r19")
int
in_cksum(m, len)
struct mbuf *m;
int len;
in_cksum(struct mbuf *m, int len)
{
u_int sum = 0;
u_int bins = 0;
@ -111,10 +109,10 @@ in_cksum(m, len)
if ((4 & (u_long)w) != 0)
ADDWORD;
}
while ((mlen -= 32) >= 0)
ADD32;
mlen += 32;
if (mlen >= 16) {
ADD16;

View File

@ -1,4 +1,4 @@
/* $NetBSD: kgdb_hppa.c,v 1.3 2003/08/07 16:27:51 agc Exp $ */
/* $NetBSD: kgdb_hppa.c,v 1.4 2003/11/28 19:02:25 chs Exp $ */
/*
* Copyright (c) 1990, 1993
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.3 2003/08/07 16:27:51 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.4 2003/11/28 19:02:25 chs Exp $");
#include <sys/param.h>
#include <sys/kgdb.h>
@ -57,9 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.3 2003/08/07 16:27:51 agc Exp $");
* Determine if the memory at va..(va+len) is valid.
*/
int
kgdb_acc(va, ulen)
vaddr_t va;
size_t ulen;
kgdb_acc(vaddr_t va, size_t ulen)
{
/* Just let the trap handler deal with it. */
@ -71,8 +69,7 @@ kgdb_acc(va, ulen)
* (gdb only understands unix signal numbers).
*/
int
kgdb_signal(type)
int type;
kgdb_signal(int type)
{
int sigval;
@ -218,9 +215,7 @@ kgdb_signal(type)
KGDB_MOVEREG(63, tf_cr30) /* uaddr */
void
kgdb_getregs(regs, gdb_regs)
db_regs_t *regs;
kgdb_reg_t *gdb_regs;
kgdb_getregs(db_regs_t *regs, kgdb_reg_t *gdb_regs)
{
#define KGDB_MOVEREG(i, f) gdb_regs[i] = regs->f
KGDB_MOVEREGS;
@ -228,9 +223,7 @@ kgdb_getregs(regs, gdb_regs)
}
void
kgdb_setregs(regs, gdb_regs)
db_regs_t *regs;
kgdb_reg_t *gdb_regs;
kgdb_setregs(db_regs_t *regs, kgdb_reg_t *gdb_regs)
{
#define KGDB_MOVEREG(i, f) regs->f = gdb_regs[i]
KGDB_MOVEREGS;
@ -242,8 +235,7 @@ kgdb_setregs(regs, gdb_regs)
* noting on the console why nothing else is going on.
*/
void
kgdb_connect(verbose)
int verbose;
kgdb_connect(int verbose)
{
if (kgdb_dev < 0)
@ -266,7 +258,7 @@ kgdb_connect(verbose)
* (This is called by panic, like Debugger())
*/
void
kgdb_panic()
kgdb_panic(void)
{
if (kgdb_dev >= 0 && kgdb_debug_panic) {
printf("entering kgdb\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.h,v 1.5 2003/08/31 01:26:35 chs Exp $ */
/* $NetBSD: machdep.h,v 1.6 2003/11/28 19:02:25 chs Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -77,34 +77,33 @@ extern int fpu_present;
extern u_int fpu_version;
extern u_int fpu_csw;
extern paddr_t fpu_cur_uspace;
void hppa_fpu_bootstrap __P((u_int));
void hppa_fpu_flush __P((struct lwp *));
void hppa_fpu_emulate __P((struct trapframe *, struct lwp *));
void hppa_fpu_bootstrap(u_int);
void hppa_fpu_flush(struct lwp *);
void hppa_fpu_emulate(struct trapframe *, struct lwp *);
/* Interrupt dispatching. */
extern u_int hppa_intr_depth;
void hppa_intr __P((struct trapframe *));
void hppa_intr(struct trapframe *);
/* Special pmap functions. */
void pmap_bootstrap __P((vaddr_t *, vaddr_t *));
void pmap_redzone __P((vaddr_t, vaddr_t, int));
void pmap_bootstrap(vaddr_t *, vaddr_t *);
void pmap_redzone(vaddr_t, vaddr_t, int);
/* Functions to write low memory and the kernel text. */
void hppa_ktext_stw __P((vaddr_t, int));
void hppa_ktext_stb __P((vaddr_t, char));
void hppa_ktext_stw(vaddr_t, int);
void hppa_ktext_stb(vaddr_t, char);
/* Machine check handling. */
extern u_int os_hpmc;
extern u_int os_hpmc_cont;
extern u_int os_hpmc_cont_end;
int os_toc __P((void));
int os_toc(void);
extern u_int os_toc_end;
void hppa_machine_check __P((int));
void hppa_machine_check(int);
/* BTLB handling. */
int hppa_btlb_insert __P((pa_space_t space, vaddr_t va, paddr_t pa,
vsize_t *lenp, u_int prot));
int hppa_btlb_reload __P((void));
int hppa_btlb_purge __P((pa_space_t, vaddr_t, vsize_t *));
int hppa_btlb_insert(pa_space_t, vaddr_t, paddr_t, vsize_t *, u_int);
int hppa_btlb_reload(void);
int hppa_btlb_purge(pa_space_t, vaddr_t, vsize_t *);
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.10 2003/08/31 01:26:35 chs Exp $ */
/* $NetBSD: pmap.c,v 1.11 2003/11/28 19:02:25 chs Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -171,7 +171,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.10 2003/08/31 01:26:35 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.11 2003/11/28 19:02:25 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -273,7 +273,7 @@ u_int pages_per_vm_page;
u_int pid_counter;
#ifdef PMAPDEBUG
void pmap_hptdump __P((void));
void pmap_hptdump(void);
#endif
u_int kern_prot[8], user_prot[8];
@ -306,14 +306,14 @@ vsize_t hpt_mask;
((((sp1) ^ (sp2)) & ~HPPA_SPAMASK) != 0))
/* Prototypes. */
void __pmap_pv_update __P((paddr_t, struct pv_entry *, u_int, u_int));
static __inline void pmap_pv_remove __P((struct pv_entry *));
void __pmap_pv_update(paddr_t, struct pv_entry *, u_int, u_int);
static __inline void pmap_pv_remove(struct pv_entry *);
/*
* Given a directly-mapped region, this makes pv_entries out of it and
* adds them to the free list.
*/
static __inline void pmap_pv_add __P((vaddr_t, vaddr_t));
static __inline void pmap_pv_add(vaddr_t, vaddr_t);
static __inline void
pmap_pv_add(vaddr_t pv_start, vaddr_t pv_end)
{
@ -345,7 +345,7 @@ pmap_pv_add(vaddr_t pv_start, vaddr_t pv_end)
* in physical mode and thus require that all pv_entries be directly
* mapped, a quality unlikely for malloc()-returned memory.
*/
static __inline struct pv_entry *pmap_pv_alloc __P((void));
static __inline struct pv_entry *pmap_pv_alloc(void);
static __inline struct pv_entry *
pmap_pv_alloc(void)
{
@ -409,7 +409,7 @@ pmap_pv_alloc(void)
/*
* Given a struct pv_entry allocated by pmap_pv_alloc, this frees it.
*/
static __inline void pmap_pv_free __P((struct pv_entry *));
static __inline void pmap_pv_free(struct pv_entry *);
static __inline void
pmap_pv_free(struct pv_entry *pv)
{
@ -432,7 +432,7 @@ pmap_pv_free(struct pv_entry *pv)
* This HPT is also used as a general VA->PA mapping store, with
* struct pv_entry chains hanging off of the HPT entries.
*/
static __inline struct hpt_entry *pmap_hpt_hash __P((pa_space_t, vaddr_t));
static __inline struct hpt_entry *pmap_hpt_hash(pa_space_t, vaddr_t);
static __inline struct hpt_entry *
pmap_hpt_hash(pa_space_t sp, vaddr_t va)
{
@ -453,7 +453,7 @@ pmap_hpt_hash(pa_space_t sp, vaddr_t va)
/*
* Given a PA, returns the table offset for it.
*/
static __inline int pmap_table_find_pa __P((paddr_t));
static __inline int pmap_table_find_pa(paddr_t);
static __inline int
pmap_table_find_pa(paddr_t pa)
{
@ -466,7 +466,7 @@ pmap_table_find_pa(paddr_t pa)
/*
* Given a PA, returns the first mapping for it.
*/
static __inline struct pv_entry *pmap_pv_find_pa __P((paddr_t));
static __inline struct pv_entry *pmap_pv_find_pa(paddr_t);
static __inline struct pv_entry *
pmap_pv_find_pa(paddr_t pa)
{
@ -480,7 +480,7 @@ pmap_pv_find_pa(paddr_t pa)
/*
* Given a VA, this finds any mapping for it.
*/
static __inline struct pv_entry *pmap_pv_find_va __P((pa_space_t, vaddr_t));
static __inline struct pv_entry *pmap_pv_find_va(pa_space_t, vaddr_t);
static __inline struct pv_entry *
pmap_pv_find_va(pa_space_t space, vaddr_t va)
{
@ -498,7 +498,7 @@ pmap_pv_find_va(pa_space_t space, vaddr_t va)
* Given a page's PA, checks for non-equivalent aliasing,
* and stores and returns the result.
*/
static int pmap_pv_check_alias __P((paddr_t));
static int pmap_pv_check_alias(paddr_t);
static int
pmap_pv_check_alias(paddr_t pa)
{
@ -562,11 +562,10 @@ pmap_pv_check_alias(paddr_t pa)
* the protection accordingly. This is used when a mapping is
* changing.
*/
static __inline void _pmap_pv_update __P((paddr_t, struct pv_entry *,
u_int, u_int));
static __inline void _pmap_pv_update(paddr_t, struct pv_entry *, u_int, u_int);
static __inline void
_pmap_pv_update(paddr_t pa, struct pv_entry *pv,
u_int tlbprot_clear, u_int tlbprot_set)
_pmap_pv_update(paddr_t pa, struct pv_entry *pv, u_int tlbprot_clear,
u_int tlbprot_set)
{
struct pv_entry *ppv;
int no_rw_alias;
@ -627,10 +626,11 @@ _pmap_pv_update(paddr_t pa, struct pv_entry *pv,
* Given a pmap, a VA, a PA, and a TLB protection, this enters
* a new mapping and returns the new struct pv_entry.
*/
static __inline struct pv_entry *pmap_pv_enter __P((pmap_t, pa_space_t, vaddr_t, paddr_t, u_int));
static __inline struct pv_entry *pmap_pv_enter(pmap_t, pa_space_t, vaddr_t,
paddr_t, u_int);
static __inline struct pv_entry *
pmap_pv_enter(pmap_t pmap, pa_space_t space, vaddr_t va,
paddr_t pa, u_int tlbprot)
pmap_pv_enter(pmap_t pmap, pa_space_t space, vaddr_t va, paddr_t pa,
u_int tlbprot)
{
struct hpt_entry *hpt = pmap_hpt_hash(space, va);
int table_off;
@ -777,9 +777,7 @@ pmap_pv_remove(struct pv_entry *pv)
* vend PA of last available physical page
*/
void
pmap_bootstrap(vstart, vend)
vaddr_t *vstart;
vaddr_t *vend;
pmap_bootstrap(vaddr_t *vstart, vaddr_t *vend)
{
vaddr_t addr;
vsize_t size;
@ -1109,10 +1107,7 @@ pmap_bootstrap(vstart, vend)
* directly mapped cannot be grown dynamically once allocated.
*/
vaddr_t
pmap_steal_memory(size, startp, endp)
vsize_t size;
vaddr_t *startp;
vaddr_t *endp;
pmap_steal_memory(vsize_t size, vaddr_t *startp, vaddr_t *endp)
{
vaddr_t va;
int lcv;
@ -1166,9 +1161,9 @@ pmap_virtual_space(vaddr_t *vstartp, vaddr_t *vendp)
* needs to map virtual memory (VM is already ON).
*/
void
pmap_init()
pmap_init(void)
{
extern void gateway_page __P((void));
extern void gateway_page(void);
TAILQ_INIT(&pmap_freelist);
pid_counter = HPPA_PID_KERNEL + 2;
@ -1191,10 +1186,9 @@ pmap_init()
* Initialize a preallocated and zeroed pmap structure,
* such as one in a vmspace structure.
*/
static void pmap_pinit __P((pmap_t));
static void pmap_pinit(pmap_t);
static void
pmap_pinit(pmap)
pmap_t pmap;
pmap_pinit(pmap_t pmap)
{
u_int pid;
int s;
@ -1237,7 +1231,7 @@ pmap_pinit(pmap)
* the map is an actual physical map, and may be referenced by the hardware.
*/
pmap_t
pmap_create()
pmap_create(void)
{
pmap_t pmap;
int s;
@ -1258,7 +1252,7 @@ pmap_create()
MALLOC(pmap, struct pmap *, sizeof(*pmap), M_VMMAP, M_NOWAIT);
if (pmap == NULL)
return NULL;
bzero(pmap, sizeof(*pmap));
memset(pmap, 0, sizeof(*pmap));
}
pmap_pinit(pmap);
@ -1273,8 +1267,7 @@ pmap_create()
* Should only be called if the map contains no valid mappings.
*/
void
pmap_destroy(pmap)
pmap_t pmap;
pmap_destroy(pmap_t pmap)
{
int ref_count;
int s;
@ -1343,12 +1336,7 @@ pmap_activate(struct lwp *l)
* for this mapping.
*/
int
pmap_enter(pmap, va, pa, prot, flags)
pmap_t pmap;
vaddr_t va;
paddr_t pa;
vm_prot_t prot;
int flags;
pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
{
struct pv_entry *pv;
u_int tlbpage, tlbprot;
@ -1434,10 +1422,7 @@ pmap_enter(pmap, va, pa, prot, flags)
* sva must be less than or equal to eva.
*/
void
pmap_remove(pmap, sva, eva)
pmap_t pmap;
vaddr_t sva;
vaddr_t eva;
pmap_remove(pmap_t pmap, vaddr_t sva, vaddr_t eva)
{
struct pv_entry *pv;
pa_space_t space;
@ -1477,9 +1462,7 @@ pmap_remove(pmap, sva, eva)
* Lower the permission for all mappings to a given page.
*/
void
pmap_page_protect(pg, prot)
struct vm_page *pg;
vm_prot_t prot;
pmap_page_protect(struct vm_page *pg, vm_prot_t prot)
{
struct pv_entry *pv, *pv_next;
pmap_t pmap;
@ -1550,11 +1533,7 @@ pmap_page_protect(pg, prot)
* s must be less than or equal to e.
*/
void
pmap_protect(pmap, sva, eva, prot)
pmap_t pmap;
vaddr_t sva;
vaddr_t eva;
vm_prot_t prot;
pmap_protect(pmap_t pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot)
{
struct pv_entry *pv;
u_int tlbprot;
@ -1602,9 +1581,7 @@ pmap_protect(pmap, sva, eva, prot)
* only used to unwire pages and hence the mapping entry will exist.
*/
void
pmap_unwire(pmap, va)
pmap_t pmap;
vaddr_t va;
pmap_unwire(pmap_t pmap, vaddr_t va)
{
struct pv_entry *pv;
int s;
@ -1636,10 +1613,7 @@ pmap_unwire(pmap, va)
* virtual address is mapped. returns FALSE in not mapped.
*/
boolean_t
pmap_extract(pmap, va, pap)
pmap_t pmap;
vaddr_t va;
paddr_t *pap;
pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
{
struct pv_entry *pv;
vaddr_t off;
@ -1669,8 +1643,7 @@ pmap_extract(pmap, va, pap)
* Zeros the specified page.
*/
void
pmap_zero_page(pa)
paddr_t pa;
pmap_zero_page(paddr_t pa)
{
struct pv_entry *pv;
int s;
@ -1701,9 +1674,7 @@ pmap_zero_page(pa)
* physical address sivnce there is usually no mapping for it.
*/
void
pmap_copy_page(spa, dpa)
paddr_t spa;
paddr_t dpa;
pmap_copy_page(paddr_t spa, paddr_t dpa)
{
struct pv_entry *spv, *dpv;
int s;
@ -1732,7 +1703,7 @@ pmap_copy_page(spa, dpa)
* Given a PA and a bit, this tests and clears that bit in
* the modref information for the PA.
*/
static __inline boolean_t pmap_clear_bit __P((paddr_t, u_int));
static __inline boolean_t pmap_clear_bit(paddr_t, u_int);
static __inline boolean_t
pmap_clear_bit(paddr_t pa, u_int tlbprot_bit)
{
@ -1758,7 +1729,7 @@ pmap_clear_bit(paddr_t pa, u_int tlbprot_bit)
* Given a PA and a bit, this tests that bit in the modref
* information for the PA.
*/
static __inline boolean_t pmap_test_bit __P((paddr_t, u_int));
static __inline boolean_t pmap_test_bit(paddr_t, u_int);
static __inline boolean_t
pmap_test_bit(paddr_t pa, u_int tlbprot_bit)
{
@ -1799,8 +1770,7 @@ pmap_test_bit(paddr_t pa, u_int tlbprot_bit)
* independant page boundary.
*/
boolean_t
pmap_clear_modify(pg)
struct vm_page *pg;
pmap_clear_modify(struct vm_page *pg)
{
paddr_t pa = VM_PAGE_TO_PHYS(pg);
boolean_t ret = pmap_clear_bit(pa, TLB_DIRTY);
@ -1814,8 +1784,7 @@ pmap_clear_modify(pg)
* since the last call to pmap_clear_modify().
*/
boolean_t
pmap_is_modified(pg)
struct vm_page *pg;
pmap_is_modified(struct vm_page *pg)
{
paddr_t pa = VM_PAGE_TO_PHYS(pg);
boolean_t ret = pmap_test_bit(pa, TLB_DIRTY);
@ -1832,8 +1801,7 @@ pmap_is_modified(pg)
* the reference bit we flush all mappings for pa from the TLBs.
*/
boolean_t
pmap_clear_reference(pg)
struct vm_page *pg;
pmap_clear_reference(struct vm_page *pg)
{
paddr_t pa = VM_PAGE_TO_PHYS(pg);
boolean_t ret = pmap_clear_bit(pa, TLB_REF);
@ -1847,8 +1815,7 @@ pmap_clear_reference(pg)
* since the last call to pmap_clear_reference().
*/
boolean_t
pmap_is_referenced(pg)
struct vm_page *pg;
pmap_is_referenced(struct vm_page *pg)
{
paddr_t pa = VM_PAGE_TO_PHYS(pg);
boolean_t ret = pmap_test_bit(pa, TLB_REF);
@ -1857,10 +1824,7 @@ pmap_is_referenced(pg)
}
void
pmap_kenter_pa(va, pa, prot)
vaddr_t va;
paddr_t pa;
vm_prot_t prot;
pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot)
{
int s;
#ifdef PMAPDEBUG
@ -1891,9 +1855,7 @@ pmap_kenter_pa(va, pa, prot)
}
void
pmap_kremove(va, size)
vaddr_t va;
vsize_t size;
pmap_kremove(vaddr_t va, vsize_t size)
{
struct pv_entry *pv;
int s;
@ -1969,7 +1931,7 @@ pmap_redzone(vaddr_t sva, vaddr_t eva, int create)
* prints whole va->pa (aka HPT or HVT)
*/
void
pmap_hptdump()
pmap_hptdump(void)
{
struct hpt_entry *hpt, *ehpt;
struct pv_entry *pv;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sig_machdep.c,v 1.6 2003/09/26 12:02:56 simonb Exp $ */
/* $NetBSD: sig_machdep.c,v 1.7 2003/11/28 19:02:25 chs Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.6 2003/09/26 12:02:56 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.7 2003/11/28 19:02:25 chs Exp $");
#include "opt_compat_netbsd.h"
@ -144,10 +144,7 @@ int sigpid = 0;
* Send an interrupt to process.
*/
void
sendsig(sig, mask, code)
int sig;
const sigset_t *mask;
u_long code;
sendsig(int sig, const sigset_t *mask, u_long code)
{
struct lwp *l = curlwp;
struct proc *p = l->l_proc;
@ -276,10 +273,7 @@ sendsig(sig, mask, code)
}
int
sys___sigreturn14(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
sys___sigreturn14(struct lwp *l, void *v, register_t *retval)
{
struct sys___sigreturn14_args /* {
syscallarg(struct sigcontext *) sigcntxp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.13 2003/11/08 12:08:12 tsutsui Exp $ */
/* $NetBSD: trap.c,v 1.14 2003/11/28 19:02:25 chs Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.13 2003/11/08 12:08:12 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.14 2003/11/28 19:02:25 chs Exp $");
/* #define INTRDEBUG */
/* #define TRAPDEBUG */
@ -173,8 +173,8 @@ int trap_types = sizeof(trap_type)/sizeof(trap_type[0]);
int want_resched;
volatile int astpending;
void pmap_hptdump __P((void));
void syscall __P((struct trapframe *frame, int *args));
void pmap_hptdump(void);
void syscall(struct trapframe *, int *);
#ifdef USERTRACE
/*
@ -317,7 +317,7 @@ trap_kdebug(int type, int code, struct trapframe *frame)
* sets up a frame pointer and stores the return pointer
* and arguments in it.
*/
static void user_backtrace_raw __P((u_int, u_int));
static void user_backtrace_raw(u_int, u_int);
static void
user_backtrace_raw(u_int pc, u_int fp)
{
@ -348,7 +348,7 @@ user_backtrace_raw(u_int pc, u_int fp)
printf(" backtrace stopped with pc %08x fp 0x%08x\n", pc, fp);
}
static void user_backtrace __P((struct trapframe *, struct lwp *, int));
static void user_backtrace(struct trapframe *, struct lwp *, int);
static void
user_backtrace(struct trapframe *tf, struct lwp *l, int type)
{
@ -408,7 +408,7 @@ user_backtrace(struct trapframe *tf, struct lwp *l, int type)
struct trapframe *sanity_frame;
struct lwp *sanity_lwp;
int sanity_checked = 0;
void frame_sanity_check __P((struct trapframe *, struct lwp *));
void frame_sanity_check(struct trapframe *, struct lwp *);
void
frame_sanity_check(struct trapframe *tf, struct lwp *l)
{
@ -468,9 +468,7 @@ do { \
#endif /* DEBUG */
void
trap(type, frame)
int type;
struct trapframe *frame;
trap(int type, struct trapframe *frame)
{
struct lwp *l;
struct proc *p;
@ -852,8 +850,7 @@ if (trap_kdebug (type, va, frame))
}
void
child_return(arg)
void *arg;
child_return(void *arg)
{
struct lwp *l = arg;
struct proc *p = l->l_proc;
@ -876,9 +873,7 @@ child_return(arg)
* - register args are copied onto stack too
*/
void
syscall(frame, args)
struct trapframe *frame;
int *args;
syscall(struct trapframe *frame, int *args)
{
struct lwp *l;
struct proc *p;
@ -1148,8 +1143,7 @@ syscall(frame, args)
* Start a new LWP
*/
void
startlwp(arg)
void *arg;
startlwp(void *arg)
{
int err;
ucontext_t *uc = arg;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.7 2003/11/18 11:37:39 chs Exp $ */
/* $NetBSD: vm_machdep.c,v 1.8 2003/11/28 19:02:25 chs Exp $ */
/* $OpenBSD: vm_machdep.c,v 1.25 2001/09/19 20:50:56 mickey Exp $ */
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.7 2003/11/18 11:37:39 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.8 2003/11/28 19:02:25 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -60,11 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.7 2003/11/18 11:37:39 chs Exp $");
* Dump the machine specific header information at the start of a core dump.
*/
int
cpu_coredump(l, vp, cred, core)
struct lwp *l;
struct vnode *vp;
struct ucred *cred;
struct core *core;
cpu_coredump(struct lwp *l, struct vnode *vp, struct ucred *cred,
struct core *core)
{
struct proc *p = l->l_proc;
struct md_coredump md_core;
@ -104,9 +101,7 @@ cpu_coredump(l, vp, cred, core)
* Both addresses are assumed to reside in the Sysmap.
*/
void
pagemove(from, to, size)
caddr_t from, to;
size_t size;
pagemove(caddr_t from, caddr_t to, size_t size)
{
paddr_t pa;
boolean_t rv;
@ -128,8 +123,7 @@ pagemove(from, to, size)
}
void
cpu_swapin(l)
struct lwp *l;
cpu_swapin(struct lwp *l)
{
struct trapframe *tf = l->l_md.md_regs;
@ -148,8 +142,7 @@ cpu_swapin(l)
}
void
cpu_swapout(l)
struct lwp *l;
cpu_swapout(struct lwp *l)
{
/* Flush this LWP out of the FPU. */
@ -157,12 +150,8 @@ cpu_swapout(l)
}
void
cpu_lwp_fork(l1, l2, stack, stacksize, func, arg)
struct lwp *l1, *l2;
void *stack;
size_t stacksize;
void (*func) __P((void *));
void *arg;
cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
void (*func)(void *), void *arg)
{
struct pcb *pcbp;
struct trapframe *tf;
@ -237,29 +226,8 @@ cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
printf("cpu_setfunc not implemented\n");
}
#if 0
void
cpu_set_kpc(p, pc, arg)
struct proc *p;
void (*pc) __P((void *));
void *arg;
{
struct trapframe *tf = p->p_md.md_regs;
register_t sp = tf->tf_sp;
/*
* Overwrite normally stashed there &child_return(p)
*/
*HPPA_FRAME_CARG(1, sp) = (register_t)pc;
*HPPA_FRAME_CARG(2, sp) = (register_t)arg;
fdcache(HPPA_SID_KERNEL, (vaddr_t)sp, HPPA_FRAME_SIZE);
}
#endif
void
cpu_exit(l, proc)
struct lwp *l;
int proc;
cpu_exit(struct lwp *l, int proc)
{
(void) splsched();
uvmexp.swtch++;
@ -273,9 +241,7 @@ cpu_exit(l, proc)
* Map an IO request into kernel virtual address space.
*/
void
vmapbuf(bp, len)
struct buf *bp;
vsize_t len;
vmapbuf(struct buf *bp, vsize_t len)
{
vaddr_t uva, kva;
paddr_t pa;
@ -316,9 +282,7 @@ vmapbuf(bp, len)
* Unmap IO request from the kernel virtual address space.
*/
void
vunmapbuf(bp, len)
struct buf *bp;
vsize_t len;
vunmapbuf(struct buf *bp, vsize_t len)
{
struct pmap *pmap;
vaddr_t addr;