summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/hppa/hppa/autoconf.c18
-rw-r--r--sys/arch/hppa/hppa/db_interface.c4
-rw-r--r--sys/arch/hppa/hppa/disksubr.c4
-rw-r--r--sys/arch/hppa/hppa/in_cksum.c6
-rw-r--r--sys/arch/hppa/hppa/intr.c12
-rw-r--r--sys/arch/hppa/hppa/machdep.c36
-rw-r--r--sys/arch/hppa/hppa/mainbus.c16
-rw-r--r--sys/arch/hppa/hppa/trap.c34
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c9
9 files changed, 75 insertions, 64 deletions
diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c
index ba5f764bd49..5a987429848 100644
--- a/sys/arch/hppa/hppa/autoconf.c
+++ b/sys/arch/hppa/hppa/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.28 2003/02/18 01:45:53 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.29 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 1998-2001 Michael Shalayeff
@@ -100,7 +100,7 @@ extern int hz;
* called at boot time, configure all devices on system
*/
void
-cpu_configure()
+cpu_configure(void)
{
splhigh();
if (config_rootfound("mainbus", "mainbus") == NULL)
@@ -139,7 +139,7 @@ heartbeat(v)
int toggle, cp_mask, cp_total;
cp_total = cp_time[CP_USER] + cp_time[CP_NICE] + cp_time[CP_SYS] +
- cp_time[CP_INTR] + cp_time[CP_IDLE];
+ cp_time[CP_INTR] + cp_time[CP_IDLE];
if (!cp_total)
cp_total = 1;
cp_mask = 0xf0 >> (cp_time[CP_IDLE] - ocp_idle) * 4 /
@@ -166,7 +166,7 @@ heartbeat(v)
* Configure swap space and related parameters.
*/
void
-swapconf()
+swapconf(void)
{
struct swdevt *swp;
int nblks, maj;
@@ -193,7 +193,7 @@ swapconf()
* reduce the chance that swapping trashes it.
*/
void
-dumpconf()
+dumpconf(void)
{
extern int dumpsize;
int nblks, dumpblks; /* size of dump area */
@@ -271,7 +271,7 @@ findblkname(maj)
if (maj == nam2blk[i].maj)
return (nam2blk[i].name);
return (NULL);
-}
+}
struct device *
getdisk(str, len, defpart, devp)
@@ -365,7 +365,7 @@ gotdisk:
* That should be fixed.
*/
void
-setroot()
+setroot(void)
{
struct swdevt *swp;
struct device *dv;
@@ -672,7 +672,7 @@ hppa_mod_info(type, sv)
static char fakeid[32];
for (mi = hppa_knownmods; mi->mi_type >= 0 &&
- (mi->mi_type != type || mi->mi_sv != sv); mi++);
+ (mi->mi_type != type || mi->mi_sv != sv); mi++);
if (mi->mi_type < 0) {
sprintf(fakeid, "type %x, sv %x", type, sv);
@@ -759,7 +759,7 @@ device_register(struct device *dev, void *aux)
return;
}
- /*
+ /*
* And now check for proper target and lun values
*/
if (sl->target == PAGE0->mem_boot.pz_layers[0] &&
diff --git a/sys/arch/hppa/hppa/db_interface.c b/sys/arch/hppa/hppa/db_interface.c
index e55016952b6..f89c654c81a 100644
--- a/sys/arch/hppa/hppa/db_interface.c
+++ b/sys/arch/hppa/hppa/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.25 2002/09/17 19:15:31 mickey Exp $ */
+/* $OpenBSD: db_interface.c,v 1.26 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -222,7 +222,7 @@ kdb_trap(type, code, regs)
splx(s);
*regs = ddb_regs;
-
+
return (1);
}
diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c
index 04144f172da..2229e0920f9 100644
--- a/sys/arch/hppa/hppa/disksubr.c
+++ b/sys/arch/hppa/hppa/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.11 2003/01/14 11:03:09 mickey Exp $ */
+/* $OpenBSD: disksubr.c,v 1.12 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -649,7 +649,7 @@ readliflabel (bp, strat, lp, osdep, partoffp, cylp, spoofonly)
/* scan for LIF_DIR_FS dir entry */
for (fsoff = -1, p = &osdep->u._hppa.lifdir[0];
- fsoff < 0 && p < &osdep->u._hppa.lifdir[LIF_NUMDIR]; p++)
+ fsoff < 0 && p < &osdep->u._hppa.lifdir[LIF_NUMDIR]; p++)
if (p->dir_type == LIF_DIR_FS)
fsoff = lifstodb(p->dir_addr);
diff --git a/sys/arch/hppa/hppa/in_cksum.c b/sys/arch/hppa/hppa/in_cksum.c
index cfd291cb113..dd900c22b97 100644
--- a/sys/arch/hppa/hppa/in_cksum.c
+++ b/sys/arch/hppa/hppa/in_cksum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_cksum.c,v 1.1 2001/01/13 00:00:20 mickey Exp $ */
+/* $OpenBSD: in_cksum.c,v 1.2 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -106,10 +106,10 @@ in_cksum(m, len)
if ((4 & (u_long)w) != 0)
ADDWORD;
}
-
+
while ((mlen -= 32) >= 0)
ADD32;
-
+
mlen += 32;
if (mlen >= 16) {
ADD16;
diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c
index 4edd36ef623..d59425b7173 100644
--- a/sys/arch/hppa/hppa/intr.c
+++ b/sys/arch/hppa/hppa/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.6 2003/01/04 10:35:32 mickey Exp $ */
+/* $OpenBSD: intr.c,v 1.7 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -60,7 +60,7 @@ struct hppa_iv {
register_t kpsw = PSL_Q | PSL_P | PSL_C | PSL_D;
volatile int cpl = IPL_NESTED;
volatile u_long ipending, imask[NIPL];
-u_long cpu_mask;
+u_long cpu_mask;
struct hppa_iv *intr_list, intr_store[8*CPU_NINTS], *intr_more = intr_store;
struct hppa_iv intr_table[CPU_NINTS] = {
{ IPL_SOFTCLOCK, 0, HPPA_IV_SOFT, 0, (int (*)(void *))&softclock },
@@ -98,7 +98,7 @@ softtty(void)
}
void
-cpu_intr_init()
+cpu_intr_init(void)
{
u_long mask = cpu_mask | SOFTINT_MASK;
int level;
@@ -150,7 +150,8 @@ cpu_intr_init()
}
void *
-cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg, struct device *dv)
+cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg,
+ struct device *dv)
{
struct hppa_iv *iv, *pv = v, *ivb = pv->next;
@@ -170,7 +171,8 @@ cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg, struc
}
void *
-cpu_intr_establish(int pri, int irq, int (*handler)(void *), void *arg, struct device *dv)
+cpu_intr_establish(int pri, int irq, int (*handler)(void *), void *arg,
+ struct device *dv)
{
struct hppa_iv *iv;
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 2c288a075d4..cd23385d467 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.101 2003/02/12 21:33:40 jason Exp $ */
+/* $OpenBSD: machdep.c,v 1.102 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -418,7 +418,7 @@ hppa_init(start)
const struct hppa_cpu_typed *p;
for (p = cpu_types;
- p->arch && p->features != cpu_features; p++);
+ p->arch && p->features != cpu_features; p++);
if (!p->arch) {
printf("WARNING: UNKNOWN CPU TYPE; GOOD LUCK (%x)\n",
@@ -438,11 +438,11 @@ hppa_init(start)
extern u_int trap_ep_T_ITLBMISS[];
extern u_int trap_ep_T_ITLBMISSNA[];
- cpu_type = p->type;
- cpu_typename = p->name;
+ cpu_type = p->type;
+ cpu_typename = p->name;
cpu_ibtlb_ins = p->ibtlbins;
cpu_dbtlb_ins = p->dbtlbins;
- cpu_hpt_init = p->hptinit;
+ cpu_hpt_init = p->hptinit;
cpu_desidhash = p->desidhash;
#define LDILDO(t,f) ((t)[0] = (f)[0], (t)[1] = (f)[1])
@@ -533,7 +533,7 @@ hppa_init(start)
/* More buffer pages than fits into the buffers is senseless. */
if (bufpages > nbuf * MAXBSIZE / PAGE_SIZE)
bufpages = nbuf * MAXBSIZE / PAGE_SIZE;
-
+
v1 = v = hppa_round_page(start);
#define valloc(name, type, num) (name) = (type *)v; v = (vaddr_t)((name)+(num))
@@ -584,7 +584,7 @@ hppa_init(start)
}
void
-cpu_startup()
+cpu_startup(void)
{
vaddr_t minaddr, maxaddr;
vsize_t size;
@@ -766,7 +766,7 @@ fall(c_base, c_count, c_loop, c_stride, data)
}
void
-fcacheall()
+fcacheall(void)
{
/*
* Flush the instruction, then data cache.
@@ -780,7 +780,7 @@ fcacheall()
}
void
-ptlball()
+ptlball(void)
{
register pa_space_t sp;
register int i, j, k;
@@ -811,7 +811,7 @@ ptlball()
}
int
-desidhash_g()
+desidhash_g(void)
{
/* TODO call PDC to disable SID hashing in the cache index */
@@ -974,7 +974,7 @@ long dumplo = 0; /* blocks */
* cpu_dumpsize: calculate size of machine-dependent kernel core dump headers.
*/
int
-cpu_dumpsize()
+cpu_dumpsize(void)
{
int size;
@@ -989,7 +989,7 @@ cpu_dumpsize()
* Called from HPMC handler in locore
*/
void
-hpmc_dump()
+hpmc_dump(void)
{
printf("HPMC\n");
@@ -998,7 +998,7 @@ hpmc_dump()
}
int
-cpu_dump()
+cpu_dump(void)
{
long buf[dbtob(1) / sizeof (long)];
kcore_seg_t *segp;
@@ -1028,7 +1028,7 @@ cpu_dump()
#define BYTES_PER_DUMP NBPG
void
-dumpsys()
+dumpsys(void)
{
int psize, bytes, i, n;
register caddr_t maddr;
@@ -1062,7 +1062,7 @@ dumpsys()
dump = bdevsw[major(dumpdev)].d_dump;
/* TODO block map the whole physical memory */
for (i = 0; i < bytes; i += n) {
-
+
/* Print out how many MBs we are to go. */
n = bytes - i;
if (n && (n % (1024*1024)) == 0)
@@ -1266,9 +1266,9 @@ sendsig(catcher, sig, mask, code, type, val)
sss += HPPA_FRAME_SIZE;
zero = 0;
if (copyout(&zero, (caddr_t)scp + sss - HPPA_FRAME_SIZE,
- sizeof(register_t)) ||
+ sizeof(register_t)) ||
copyout(&zero, (caddr_t)scp + sss + HPPA_FRAME_CRP,
- sizeof(register_t)))
+ sizeof(register_t)))
sigexit(p, SIGILL);
#ifdef DEBUG
@@ -1421,7 +1421,7 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
* initialize the system console.
*/
void
-consinit()
+consinit(void)
{
static int initted;
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index a4d1aa82226..71b876855ee 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.40 2003/01/22 02:13:40 mickey Exp $ */
+/* $OpenBSD: mainbus.c,v 1.41 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -396,18 +396,18 @@ mbus_sm_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t vv, bus_size_t
}
void mbus_rrm_2(void *v, bus_space_handle_t h,
- bus_size_t o, u_int16_t*a, bus_size_t c);
+ bus_size_t o, u_int16_t*a, bus_size_t c);
void mbus_rrm_4(void *v, bus_space_handle_t h,
- bus_size_t o, u_int32_t*a, bus_size_t c);
+ bus_size_t o, u_int32_t*a, bus_size_t c);
void mbus_rrm_8(void *v, bus_space_handle_t h,
- bus_size_t o, u_int64_t*a, bus_size_t c);
+ bus_size_t o, u_int64_t*a, bus_size_t c);
void mbus_wrm_2(void *v, bus_space_handle_t h,
- bus_size_t o, const u_int16_t *a, bus_size_t c);
+ bus_size_t o, const u_int16_t *a, bus_size_t c);
void mbus_wrm_4(void *v, bus_space_handle_t h,
- bus_size_t o, const u_int32_t *a, bus_size_t c);
+ bus_size_t o, const u_int32_t *a, bus_size_t c);
void mbus_wrm_8(void *v, bus_space_handle_t h,
- bus_size_t o, const u_int64_t *a, bus_size_t c);
+ bus_size_t o, const u_int64_t *a, bus_size_t c);
void
mbus_rr_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t *a, bus_size_t c)
@@ -734,7 +734,7 @@ mbus_dmamem_alloc(void *v, bus_size_t size, bus_size_t alignment,
if (uvm_map(kernel_map, &va, size, NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_RW, UVM_PROT_RW, UVM_INH_NONE,
- UVM_ADV_RANDOM, 0))) {
+ UVM_ADV_RANDOM, 0))) {
uvm_pglistfree(&pglist);
return (ENOMEM);
}
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index 4e77a3b9770..c84de16462b 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.60 2003/02/18 09:40:43 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.61 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -199,13 +199,13 @@ trap(type, frame)
switch (type) {
case T_NONEXIST:
- case T_NONEXIST|T_USER:
+ case T_NONEXIST | T_USER:
/* we've got screwed up by the central scrutinizer */
printf("trap: elvis has just left the building!\n");
goto dead_end;
case T_RECOVERY:
- case T_RECOVERY|T_USER:
+ case T_RECOVERY | T_USER:
/* XXX will implement later */
printf("trap: handicapped");
goto dead_end;
@@ -218,7 +218,8 @@ trap(type, frame)
case T_PRIV_OP:
case T_PRIV_REG:
/* these just can't make it to the trap() ever */
- case T_HPMC: case T_HPMC | T_USER:
+ case T_HPMC:
+ case T_HPMC | T_USER:
#endif
case T_IBREAK:
case T_DATALIGN:
@@ -297,7 +298,7 @@ trap(type, frame)
sv.sival_int = va;
trapsignal(p, SIGFPE, type &~ T_USER, FPE_INTOVF, sv);
break;
-
+
case T_CONDITION | T_USER:
break;
@@ -329,13 +330,19 @@ trap(type, frame)
trapsignal(p, SIGSEGV, vftype, SEGV_ACCERR, sv);
break;
- case T_DATACC: case T_USER | T_DATACC:
+ case T_DATACC:
+ case T_DATACC | T_USER:
fault = VM_FAULT_PROTECT;
- case T_ITLBMISS: case T_USER | T_ITLBMISS:
- case T_DTLBMISS: case T_USER | T_DTLBMISS:
- case T_ITLBMISSNA: case T_USER | T_ITLBMISSNA:
- case T_DTLBMISSNA: case T_USER | T_DTLBMISSNA:
- case T_TLB_DIRTY: case T_USER | T_TLB_DIRTY:
+ case T_ITLBMISS:
+ case T_ITLBMISS | T_USER:
+ case T_DTLBMISS:
+ case T_DTLBMISS | T_USER:
+ case T_ITLBMISSNA:
+ case T_ITLBMISSNA | T_USER:
+ case T_DTLBMISSNA:
+ case T_DTLBMISSNA | T_USER:
+ case T_TLB_DIRTY:
+ case T_TLB_DIRTY | T_USER:
/*
* user faults out of user addr space are always a fail,
* this happens on va >= VM_MAXUSER_ADDRESS, where
@@ -436,7 +443,7 @@ trap(type, frame)
break;
case T_INTERRUPT:
- case T_INTERRUPT|T_USER:
+ case T_INTERRUPT | T_USER:
cpu_intr(frame);
break;
@@ -454,7 +461,8 @@ trap(type, frame)
case T_POWERFAIL:
case T_LPMC:
case T_PAGEREF:
- case T_DATAPID: case T_DATAPID | T_USER:
+ case T_DATAPID:
+ case T_DATAPID | T_USER:
if (0 /* T-chip */) {
break;
}
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index 6198eb2b0fb..f88164556d4 100644
--- a/sys/arch/hppa/hppa/vm_machdep.c
+++ b/sys/arch/hppa/hppa/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.49 2003/01/29 20:57:01 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.50 2003/02/18 19:01:50 deraadt Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -78,9 +78,10 @@ cpu_coredump(p, vp, cred, core)
cseg.c_addr = 0;
cseg.c_size = core->c_cpusize;
-#define write(vp, addr, n) vn_rdwr(UIO_WRITE, (vp), (caddr_t)(addr), (n), off, \
- UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, p)
-
+#define write(vp, addr, n) \
+ vn_rdwr(UIO_WRITE, (vp), (caddr_t)(addr), (n), off, \
+ UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, p)
+
off = core->c_hdrsize;
if ((error = write(vp, &cseg, core->c_seghdrsize)))
return error;